Files
Anthropic-Cybersecurity-Skills/skills/executing-red-team-exercise/references/api-reference.md
T
mukul975 27c6414ca5 Add folder anatomy (scripts/agent.py + references/api-reference.md) for 648 cybersecurity skills
Complete skill folder anatomy across all cybersecurity skills:
- scripts/agent.py: 80-150 line Python agents using real libraries (impacket,
  boto3, azure-mgmt-*, kubernetes, pefile, yara, scapy, shodan, stix2, etc.)
- references/api-reference.md: real API documentation with method signatures
- LICENSE: MIT license for all skill folders
2026-03-10 21:02:12 +01:00

49 lines
1.7 KiB
Markdown

# API Reference: Red Team Exercise Agent
## Dependencies
| Library | Version | Purpose |
|---------|---------|---------|
| requests | >=2.28 | Download MITRE ATT&CK STIX data |
## CLI Usage
```bash
python scripts/agent.py \
--actor "APT29" \
--target "Retail Corp" \
--objectives "Access POS data" "Exfiltrate cardholder data" \
--output redteam_plan.json
```
## Functions
### `load_attack_techniques(cache_file) -> dict`
Downloads or loads cached MITRE ATT&CK Enterprise STIX bundle from GitHub (`mitre/cti`).
### `get_actor_techniques(attack_data, actor_name) -> list`
Resolves intrusion-set by name, follows `uses` relationships to collect `attack-pattern` objects. Returns list of `{id, name, tactic}`.
### `build_operation_plan(actor_name, target, objectives, attack_data) -> RedTeamOperation`
Creates a full operation plan with technique list mapped from the emulated actor's known TTPs.
### `log_technique_execution(op, technique_id, detected, notes)`
Updates a technique's status to `executed`, records detection boolean and timestamp.
### `generate_detection_gap_report(op) -> dict`
Compares executed vs. detected techniques. Outputs detection rate and missed technique recommendations.
## Data Classes
### `TechniqueExecution`
- `technique_id`, `technique_name`, `tactic`, `timestamp`, `status`, `detected`, `detection_time`, `notes`
### `RedTeamOperation`
- `operation_name`, `target_org`, `emulated_actor`, `start_date`, `objectives`, `techniques`
## MITRE ATT&CK Data Source
- URL: `https://raw.githubusercontent.com/mitre/cti/master/enterprise-attack/enterprise-attack.json`
- Format: STIX 2.0 bundle with `intrusion-set`, `attack-pattern`, and `relationship` objects
- Locally cached as `attack_enterprise.json` after first download