.claude/skills/atomic-red-team-testing/SKILL.md
Execute and validate adversary emulation tests using Atomic Red Team. Covers standard atomics, custom atomics (T9999.XXX), deployment workflows, and detection validation.
npx skillsauth add mhaggis/security-detections-mcp Atomic Red Team TestingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Required environment variables:
| Variable | Description | Example |
|----------|-------------|---------|
| $SIEM_PLATFORM | Target SIEM for validation | splunk, sentinel, elastic |
| $ATTACK_RANGE_PATH | Path to Attack Range installation | /opt/attack-range |
| $ATTACK_RANGE_VENV | Path to Attack Range Python venv | /opt/attack-range/.venv |
| $ATOMICS_PATH | Path to atomic-red-team atomics folder | /opt/atomic-red-team/atomics |
| $CUSTOM_ATOMICS_PATH | Path to custom atomics (T9999.XXX) | /opt/custom-atomics |
Target placeholders used in this guide:
<TARGET_IP> — IP address of the test endpoint<TARGET_NAME> — Hostname of the test endpoint (e.g., ar-win-1)Detection engineering is iterative. The goal is NOT to run every atomic against every target — it is to generate the specific telemetry your detection needs and confirm the detection fires.
Core principles:
# List available tests for a technique
Invoke-AtomicTest T1059.001 -ShowDetailsBrief
# Run a specific test number
Invoke-AtomicTest T1059.001 -TestNumbers 1
# Run with prerequisite check and install
Invoke-AtomicTest T1059.001 -TestNumbers 1 -GetPrereqs
Invoke-AtomicTest T1059.001 -TestNumbers 1
# Cleanup after test
Invoke-AtomicTest T1059.001 -TestNumbers 1 -Cleanup
cd "$ATTACK_RANGE_PATH"
source "$ATTACK_RANGE_VENV/bin/activate"
# Run a standard atomic remotely
python attack_range.py simulate -t T1059.001 --target <TARGET_NAME>
# Run specific test number
python attack_range.py simulate -t T1059.001 -tn 1 --target <TARGET_NAME>
ansible <TARGET_NAME> -m win_shell -a "Invoke-AtomicTest T1059.001 -TestNumbers 1" \
--extra-vars "ansible_host=<TARGET_IP>"
When no standard atomic exists for your detection scenario, create a custom atomic using the T9999.XXX numbering scheme. This avoids collisions with upstream Atomic Red Team technique IDs.
| Range | Purpose | |-------|---------| | T9999.001–T9999.099 | Windows endpoint atomics | | T9999.100–T9999.199 | Linux endpoint atomics | | T9999.200–T9999.299 | Cloud / SaaS atomics | | T9999.300–T9999.399 | Network / protocol atomics |
attack_technique: T9999.001
display_name: "Custom - Suspicious PowerShell Download Cradle"
atomic_tests:
- name: "PowerShell download cradle with Net.WebClient"
auto_generated_guid: <generate-a-uuid>
description: |
Simulates a PowerShell download cradle using Net.WebClient.
Designed to trigger detections for T1059.001 + T1105.
supported_platforms:
- windows
executor:
command: |
powershell.exe -NoProfile -Command "(New-Object Net.WebClient).DownloadString('http://127.0.0.1/test')"
name: command_prompt
elevation_required: false
$CUSTOM_ATOMICS_PATH/T9999.XXX/T9999.XXX.yamlansible <TARGET_NAME> -m win_copy \
-a "src=$CUSTOM_ATOMICS_PATH/T9999.001/ dest=C:\\AtomicRedTeam\\atomics\\T9999.001\\" \
--extra-vars "ansible_host=<TARGET_IP>"
Invoke-AtomicTest T9999.001 -TestNumbers 1
The standard workflow is: Deploy → Execute → Wait → Validate
Ensure the target has Invoke-AtomicRedTeam installed and any custom atomics are synced.
Run the atomic test (see above). Note the exact execution time.
Telemetry takes time to reach your SIEM. Typical delays:
| Data Source | Expected Delay | |-------------|---------------| | Sysmon (via UF) | 30–90 seconds | | Windows Security Events | 30–120 seconds | | EDR telemetry | 15–60 seconds | | Cloud audit logs | 1–5 minutes | | Network flow data | 1–5 minutes |
Recommendation: Wait at least 2 minutes before querying, then retry at 5 minutes if nothing appears.
Check for telemetry first, then run the detection. Commands differ by SIEM:
Splunk (SPL):
// Check raw telemetry arrived
index=* sourcetype=* "<expected_process_name>" earliest=-15m
// Run the actual detection search
| your_detection_search_here
Sentinel (KQL):
// Check raw telemetry arrived
DeviceProcessEvents
| where Timestamp > ago(15m)
| where FileName == "<expected_process_name>"
// Or for SecurityEvent-based logs
SecurityEvent
| where TimeGenerated > ago(15m)
| where Process == "<expected_process_name>"
Elastic (EQL in Dev Tools or Discover):
// Check raw telemetry arrived (via Security → Timelines or Discover)
process where process.name == "<expected_process_name>"
and @timestamp > "now-15m"
Sigma (compile first, then test in target SIEM):
# Compile to your backend
sigma convert -t splunk -p sysmon rule.yml
sigma convert -t microsoft365defender rule.yml
sigma convert -t elasticsearch rule.yml
Atomic executed
└─ Telemetry in SIEM?
├─ NO → Check: UF running? Correct sourcetype? Parsing errors?
└─ YES → Detection fires?
├─ NO → Check: Field names? Time window? Logic errors?
└─ YES → Document result ✓ → Move to next test
splunk status)elastic-agent status)systemctl status filebeat)-GetPrereqs firstSet-ExecutionPolicy Bypass -Scope Processelevation_required fieldyamllint T9999.XXX.yaml)auto_generated_guid1. Identify coverage gap (technique with no detection)
2. Write detection rule (SPL / Sigma / KQL)
3. Find or create atomic test for the technique
4. Deploy atomic to test environment
5. Execute atomic
6. Validate telemetry arrives
7. Validate detection fires
8. Document results (log_decision in knowledge graph)
9. Submit detection PR with test evidence
This workflow ensures every detection is tested before merge — not just syntactically valid but actually capable of catching the behavior it claims to detect.
testing
Expert at analyzing unstructured threat intelligence reports (CISA alerts, vendor blogs, research papers) and extracting actionable detection logic, TTPs, behavioral indicators, and MITRE ATT&CK mappings. Focuses on behaviors over IOCs. Use when provided with threat reports, security advisories, or campaign documentation.
testing
Analyze software supply chain attacks across package registries (npm, PyPI, RubyGems), CI/CD pipelines (GitHub Actions, GitLab CI), and container ecosystems. Includes detection engineering patterns for Splunk, Sentinel, Elastic, and Sigma.
testing
Optimize detection queries for performance across Splunk (SPL), Microsoft Sentinel (KQL), and Elastic Security (EQL/ES|QL). Covers search pipeline internals, common anti-patterns, and optimization techniques for detection rules on each platform.
tools
Analyze pull requests for detection coverage gaps and recommend additional detections, story alignments, and test coverage to extend PRs before merge.