atomic-red-team
Skill0 starsChanged 3 days agoMITView on GitHub
Operator guide for running Atomic Red Team tests with the Invoke-AtomicRedTeam PowerShell module in an authorised lab: installing the module and atomics folder per the project wiki, Invoke-AtomicTest -ShowDetailsBrief / -ShowDetails, -CheckPrereqs / -GetPrereqs, pinning tests by -TestNumbers / -TestNames / -TestGuids, -InputArgs, -Cleanup, -ExecutionLogPath and the CSV execution log, remote runs over PSSession, pwsh on Linux/macOS, benign custom atomics in the project YAML format, AV quarantine as a blocked outcome, and mapping every run to expected Sysmon / Security / Defender telemetry and the hunt skill that should catch it. Use when asked to \"run an atomic\", \"Invoke-AtomicTest\", test T#### with Atomic Red Team, or validate a detection with an atomic test.
In this repository52 other files it gives its agents.
- adversary-emulation-planningSkill
- alert-triageSkill
- blueteam-methodologySkill
- caldera-operationsSkill
- defender-mindsetSkill
- detection-engineeringSkill
- elastic-eql-esqlSkill
- emulate-network-c2-exfilSkill
- emulate-windows-endpointSkill
- evidence-handlingSkill
- hardening-cloudSkill
- hardening-linuxSkill
- hardening-m365-entraSkill
- hardening-windows-adSkill
- hunt-ad-identity-attacksSkill
- hunt-c2-beaconingSkill
- hunt-cloud-control-planeSkill
- hunt-credential-accessSkill
- hunt-dispatchSkill
- hunt-exfiltrationSkill
- hunt-k8s-runtimeSkill
- hunt-lateral-movementSkill
- hunt-linux-persistenceSkill
- hunt-lolbinsSkill
- hunt-webshellsSkill
- hunt-windows-persistenceSkill
- incident-responseSkill
- ir-azure-entraSkill
- ir-bec-m365Skill
- ir-cloud-awsSkill
- ir-insider-threatSkill
- ir-ransomwareSkill
- ir-report-writingSkill
- kql-sentinel-defenderSkill
- linux-forensicsSkill
- logging-coverageSkill
- malware-triageSkill
- memory-forensicsSkill
- network-detection-suricata-zeekSkill
- phishing-analysisSkill
- post-incident-reviewSkill
- purple-exercise-trackingSkill
- purpleteam-methodologySkill
- purple-team-validationSkill
- sigma-rulesSkill
- spl-splunkSkill
- stratus-red-team-cloudSkill
- threat-intel-iocSkill
- timeline-analysisSkill
- vuln-prioritizationSkill
- windows-forensicsSkill
- yara-rulesSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 6 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Not for: writing new offensive tooling, chaining atomics into a stealthy intrusion, or running against systems outside a written scope.
- Distinctive: line 26
Authorisation gate, every time: Before the first command: a lab host, or a production host named in a written authorisation plus change …
- Very specific: line 38
No defence evasion: Never disable, pause or exclude EDR/AV, Sysmon, auditing or log forwarding to make a test run.
- Distinctive: line 41
Published tests only: Use the project's atomics as shipped, referenced by ATT&CK technique and test name, with the atomics version …
- Distinctive: line 58
Write the expectation: before running: telemetry (event IDs, tables), the detection that should fire, and the sibling hunt skill (table …
- Very specific: line 102
Test names in this skill are examples as of writing ("Reg Key Run" under T1547.001).
- Very specific: line 104
Read the YAML directly when in doubt: atomics\T####\T####.yaml holds atomic_tests[].name, auto_generated_guid, supported_platforms, …
- Very specific: line 108
Never copy a GUID from memory or from a blog into a test card.
- Distinctive: line 164
Keep host clocks NTP-synced.
- Distinctive: line 209
Check the wiki for what must exist on the remote host in your version (atomics folder, payload paths) before relying on remote runs …
- Distinctive: line 236
Only for proving a pipeline or a detection on a harmless marker action.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Atomic Red Team operations (Invoke-AtomicRedTeam)
When to use
- A test card (from
adversary-emulation-planning,/emulateor/purple) names an Atomic Red Team test and someone has to run it, capture the evidence and clean up. - A new or tuned detection needs a true-positive run before it is called done
(
detection-engineering). - Regression runs after an EDR agent, sensor policy, parser or rule change.
- Building a small, benign custom atomic so a log source or pipeline can be proven end to end (marker file, marker registry value).
Not for: writing new offensive tooling, chaining atomics into a stealthy intrusion, or
running against systems outside a written scope. Exercise design and scoring live in
purple-team-validation and purple-exercise-tracking; endpoint test selection per
technique in emulate-windows-endpoint. This skill is the
executor manual.
Ground rules
- Authorisation gate, every time. Before the first command: a lab host, or a production host named in a written authorisation plus change ticket that lists the techniques, test names, time window, operator and abort contact. No gate, no run.
- Inspect before execute.
-ShowDetailsfor the exact test, readexecutor.command,cleanup_commandand dependencies. If you cannot explain what the command does and how it is undone, do not run it. - Snapshot first, cleanup always. VM snapshot (lab) or confirmed backup (approved
production host); run
-Cleanupafter every test and verify the host is back to baseline (file, key, task, service, account gone). - SOC deconfliction. The SOC lead knows host, account, window and test ID, or the
test is a declared no-notice test approved by the SOC lead. Real activity outside
the test's footprint stops the exercise and goes to
alert-triage. - No defence evasion. Never disable, pause or exclude EDR/AV, Sysmon, auditing or
log forwarding to make a test run. A quarantined atomic or blocked command is a
result (
blocked), recorded with the protection event. - Published tests only. Use the project's atomics as shipped, referenced by ATT&CK technique and test name, with the atomics version (commit/tag) recorded. Custom atomics are limited to benign marker actions and are peer-reviewed.
- Evidence or it did not happen. A result needs the execution log row, the raw telemetry record and the alert ID (or the documented absence of one) for the same test ID and time window.
Workflow
- Confirm the gate (scope document, change ticket, SOC notified) and record the
test ID, e.g.
PT-2026-031. - Snapshot the lab VM; note the snapshot name in the test card.
- Inspect:
-ShowDetailsBrieffor the technique, then-ShowDetailsfor the chosen test. Confirm the local test number, name and GUID, because numbering can change between atomics versions. - Prerequisites:
-CheckPrereqs. Run-GetPrereqsonly in the lab and only after reading what it downloads or installs. - Write the expectation before running: telemetry (event IDs, tables), the detection that should fire, and the sibling hunt skill (table below).
- Execute one test with
-ExecutionLogPathpointing at the exercise log. - Observe: pull telemetry and alerts for the host and window; capture record IDs.
- Cleanup with
-Cleanup, verify the artefacts are gone, revert the snapshot. - Score (blocked / alerted / logged / not seen / inconclusive) and hand gaps to
detection-engineeringorlogging-coverage; record inpurple-exercise-tracking.
Install and layout
- Install the
Invoke-AtomicRedTeammodule and theatomicsfolder following the project's wiki (redcanaryco/invoke-atomicredteam, "Installing Invoke-AtomicRedTeam" and "Installing the atomics folder" pages). The wiki offers a PowerShell Gallery install and an install script; pick the one your change process allows. Do not copy a one-line download-and-execute cradle into tickets or runbooks. - Install only on lab hosts and approved test hosts. The atomics folder contains test payloads and tool references that AV/EDR will flag; on a monitored host that install itself produces alerts. Tell the SOC before installing.
- The usual layout is
C:\AtomicRedTeam\invoke-atomicredteam\(module) andC:\AtomicRedTeam\atomics\(one folder per technique, e.g.atomics\T1547.001\T1547.001.yaml). Confirm paths on your host; they are configurable. - Pin the atomics version: record the commit or release tag of the atomics folder in the exercise plan, and update deliberately, not on every run.
# Load the module and point it at the atomics folder (adjust paths to your install)
Import-Module "C:\AtomicRedTeam\invoke-atomicredteam\Invoke-AtomicRedTeam.psd1" -Force
$PSDefaultParameterValues = @{ "Invoke-AtomicTest:PathToAtomicsFolder" = "C:\AtomicRedTeam\atomics" }
Get-Help Invoke-AtomicTest -Full # authoritative parameter list for your installed versionListing and inspecting tests
# All tests for one technique on this OS: number, name, (and GUID in recent versions)
Invoke-AtomicTest T1547.001 -ShowDetailsBrief
# Full detail for one test: description, executor, command, input args, prereqs, cleanup
Invoke-AtomicTest T1547.001 -TestNames "Reg Key Run" -ShowDetails
# Tests for other platforms too (e.g. planning Linux tests from a Windows box); verify flag with Get-Help
Invoke-AtomicTest T1053.003 -ShowDetailsBrief -anyOS- Test names in this skill are examples as of writing ("Reg Key Run" under T1547.001);
confirm the exact local name and number with
-ShowDetailsBriefbefore every run. - Read the YAML directly when in doubt:
atomics\T####\T####.yamlholdsatomic_tests[].name,auto_generated_guid,supported_platforms,input_arguments,dependencies,executor.command,executor.cleanup_commandandexecutor.elevation_required. - Never copy a GUID from memory or from a blog into a test card; copy it from the
local YAML or
-ShowDetailsoutput.
Prerequisites
Invoke-AtomicTest T1003.001 -TestNames "<name from ShowDetailsBrief>" -CheckPrereqs # read-only check
Invoke-AtomicTest T1003.001 -TestNames "<name from ShowDetailsBrief>" -GetPrereqs # lab only: may download/install-GetPrereqsruns each dependency'sget_prereq_command, which can download third-party tools from the Internet. Read those commands first; on a host that must not reach the Internet, stage the prerequisite through your approved software channel instead.- A prerequisite blocked or quarantined by AV is itself a data point (
blockedat the tool-staging stage), but the procedure under test is theninconclusive, notdetected.
Running tests
$log = "C:\PurpleLogs\PT-2026-031.csv"
# Pin by name (preferred, survives renumbering) or by GUID copied from the local YAML
Invoke-AtomicTest T1547.001 -TestNames "Reg Key Run" -ExecutionLogPath $log
Invoke-AtomicTest T1547.001 -TestGuids "<auto_generated_guid from local YAML>" -ExecutionLogPath $log
# By number only after confirming the number on this atomics version
Invoke-AtomicTest T1053.005 -TestNumbers 1 -ExecutionLogPath $log
# Override inputs with lab values; never point arguments at real user data or shares
Invoke-AtomicTest T1074.001 -TestNumbers 1 -InputArgs @{ "output_file" = "C:\PurpleLab\stage.zip" } # arg names come from -ShowDetails
# Cleanup with the same selector, then verify by hand
Invoke-AtomicTest T1547.001 -TestNames "Reg Key Run" -Cleanup- One test per execution during validation. Running a whole technique (
T####with no selector) orAllmixes telemetry and makes scoring guesswork. -InputArgskeys must match theinput_argumentsnames shown by-ShowDetails;-PromptForInputArgsasks interactively (verify withGet-Help).- Tests marked
elevation_required: trueneed an elevated session. Record whether the run was admin or standard user: coverage often differs. -TimeoutSecondsbounds a hung test (verify default withGet-Help). A timeout isinconclusiveuntil you know what ran.
Execution logging and SIEM correlation
-ExecutionLogPathappends to a CSV via the default execution logger. If omitted, the module writes to a default path in the temp directory (verify withGet-Helpfor your version). Always pass an explicit per-exercise path.- The CSV records execution time (UTC and local), technique, test number, test name, hostname, username and GUID; exact column names vary by version, so check the header.
- Other logging modules exist (for example an Attire-format JSON logger used for VECTR
import, a syslog logger, a Windows event log logger) via
-LoggingModule; names and configuration are in the wiki, verify before use. - Keep host clocks NTP-synced; record the time zone of every timestamp in the card.
# Pull the last runs from the exercise log to build the SIEM query window
Import-Csv "C:\PurpleLogs\PT-2026-031.csv" | Select-Object -Last 5 | Format-List// Defender XDR / Sentinel: everything on the test host around one atomic run (adjust host, times)
let host = "lab-win11-03"; let t0 = datetime(2026-11-20T09:58:00Z); let t1 = datetime(2026-11-20T10:15:00Z);
union
(DeviceProcessEvents | where Timestamp between (t0 .. t1) and DeviceName startswith host
| project Timestamp, Src="proc", FileName, ProcessCommandLine, InitiatingProcessFileName, AccountName),
(DeviceRegistryEvents | where Timestamp between (t0 .. t1) and DeviceName startswith host
| project Timestamp, Src="reg", ActionType, RegistryKey, RegistryValueName, RegistryValueData),
(AlertEvidence | where Timestamp between (t0 .. t1) and DeviceName startswith host
| project Timestamp, Src="alert", Title, AlertId, Severity)
| order by Timestamp asc| comment "Splunk: Sysmon + Security events on the test host in the run window (adjust index, host, time)"
index=wineventlog (source="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" OR source="XmlWinEventLog:Security")
host="LAB-WIN11-03" earliest="11/20/2026:09:58:00" latest="11/20/2026:10:15:00"
| table _time EventCode Image CommandLine ParentImage TargetObject Details
| sort _time- Subtract harness noise:
powershell.exeloading the module, the-Sessionremoting (WinRM /wsmprovhost.exe) and prerequisite downloads are not the technique.
Remote execution over PSSession
# Windows target over WinRM (lab domain account with rights only on lab hosts)
$s = New-PSSession -ComputerName LAB-WIN11-03 -Credential (Get-Credential)
Invoke-AtomicTest T1547.001 -TestNames "Reg Key Run" -Session $s -CheckPrereqs
Invoke-AtomicTest T1547.001 -TestNames "Reg Key Run" -Session $s -ExecutionLogPath $log
Invoke-AtomicTest T1547.001 -TestNames "Reg Key Run" -Session $s -Cleanup
Remove-PSSession $s
# Linux target over SSH remoting (PowerShell 7 on both ends)
$l = New-PSSession -HostName lab-ubu-02 -UserName ptlab- Check the wiki for what must exist on the remote host in your version (atomics folder, payload paths) before relying on remote runs (verify).
- Remoting is itself telemetry (4624 type 3, WinRM operational log,
wsmprovhost.exeparent). Note it so it is not scored as lateral movement by the technique under test. - The execution log records the remote host name; confirm in the CSV.
Linux and macOS (pwsh)
- Install PowerShell 7 (
pwsh) and the module per the wiki; atomics withsupported_platforms: linuxormacosrun through thesh/bashexecutors. -ShowDetailsBrieflists only tests for the current OS; many Windows-only techniques have no Linux atomic.- Tests needing root: run
pwshwithsudoonly inside the lab VM, and record it. - Expected telemetry comes from auditd /
auditbeat, Sysmon for Linux, EDR, and/var/log/auth.logor/var/log/secure. Confirm the rules exist before blaming the detection (logging-coverage).
# Linux lab VM: inspect and run one atomic, then clean up (names from -ShowDetailsBrief)
pwsh -Command 'Invoke-AtomicTest T1136.001 -ShowDetailsBrief'
sudo pwsh -Command 'Invoke-AtomicTest T1136.001 -TestNames "<name>" -ExecutionLogPath /var/tmp/PT-2026-032.csv'
sudo pwsh -Command 'Invoke-AtomicTest T1136.001 -TestNames "<name>" -Cleanup'
getent passwd | tail -3 # verify the test account is goneWriting a benign custom atomic
Only for proving a pipeline or a detection on a harmless marker action. No payloads,
no credential access, no download, no persistence that executes anything. Keep
custom atomics in a separate folder (for example C:\PurpleLab\custom-atomics\) and
point -PathToAtomicsFolder at it; never edit the upstream atomics in place.
# custom-atomics/T1112/T1112.yaml - benign marker registry value (Modify Registry)
attack_technique: T1112
display_name: Modify Registry
atomic_tests:
- name: Purple marker registry value (benign)
description: Writes a clearly labelled marker value under HKCU\Software\PurpleTeam to prove registry telemetry and the custom detection. No execution, no persistence.
supported_platforms:
- windows
input_arguments:
test_id:
description: Exercise test ID written as the value data
type: string
default: PT-2026-033
executor:
name: powershell
elevation_required: false
command: |
New-Item -Path "HKCU:\Software\PurpleTeam" -Force | Out-Null
New-ItemProperty -Path "HKCU:\Software\PurpleTeam" -Name "Marker" -Value "#{test_id}" -PropertyType String -Force | Out-Null
cleanup_command: |
Remove-Item -Path "HKCU:\Software\PurpleTeam" -Recurse -Force -ErrorAction Ignore- A marker file variant (T1074.001, staging directory) writes a text file named after
the test ID under a lab folder and deletes it in
cleanup_command. auto_generated_guidis generated by the project's tooling for upstream tests. Do not invent one: leave it out of a local file and select the test with-TestNames(verify your module version accepts that), or let the project tooling generate it.- Review: a second person reads command and cleanup, the test runs once in the lab
with
-ShowDetails,-Cleanupis proven, and the file is versioned with the exercise plan.
Typical breakages
| Symptom | Likely cause | What to do |
| Atomics folder or payload quarantined at install | AV/EDR signatures on test payloads | Record as expected install noise; do not exclude the folder; run tests on a lab host where install was approved |
| Test errors "access denied" / process killed | Prevention control | Score blocked, capture the protection event and alert ID |
-CheckPrereqs fails | Missing tool, wrong OS build, no Internet | Stage prereq via approved channel in the lab, or mark inconclusive |
| Test "succeeds" but no telemetry | Logging gap or wrong host/time in query | Check sensor health and clock, then logging-coverage |
| Different test ran than planned | Renumbering between atomics versions | Use -TestNames / -TestGuids, pin atomics version |
| Cleanup leaves artefacts | Cleanup command incomplete or test partially ran | Remove by hand, document, revert snapshot; open an issue upstream if appropriate |
| Input path not found | Default input points to a payload not downloaded | Read -ShowDetails, run -GetPrereqs in the lab or override with -InputArgs |
Expected telemetry and matching skill
Examples for common atomics; confirm test names locally and adjust to your sensors.
| Technique (example atomic) | Expected telemetry | Hunt / detect skill |
| T1547.001 Run key ("Reg Key Run") | Sysmon 13 on ...\CurrentVersion\Run, DeviceRegistryEvents RegistryValueSet | hunt-windows-persistence |
| T1053.005 Scheduled task | Security 4698, TaskScheduler/Operational 106, Sysmon 1 schtasks.exe | hunt-windows-persistence |
| T1003.001 LSASS memory | Sysmon 10 TargetImage lsass.exe, EDR credential-theft alert | hunt-credential-access |
| T1218.x signed binary proxy execution | Sysmon 1 / Security 4688 with parent-child chain, 4104 script block | hunt-lolbins |
| T1059.001 PowerShell | PowerShell/Operational 4104, DeviceProcessEvents command line | hunt-lolbins, detection-engineering |
| T1070.001 Clear Windows event logs | Security 1102, System 104 | detection-engineering (lab only: destroys evidence) |
| T1021.002 / T1021.006 remote services | 4624 type 3, 5140/5145, WinRM operational | hunt-lateral-movement |
| T1558.003 Kerberoasting | 4769 with RC4 ticket encryption from one account to many SPNs | hunt-ad-identity-attacks |
| T1136.001 / T1053.003 on Linux | auditd useradd / crontab writes, auth log | hunt-linux-persistence |
| T1105 ingress tool transfer | Proxy/DNS logs, Zeek http.log, DeviceNetworkEvents | hunt-c2-beaconing, network-detection-suricata-zeek |
Query language for the detection: kql-sentinel-defender, spl-splunk,
elastic-eql-esql, portable rule via sigma-rules.
False positives & benign look-alikes
- Alerts on the module import, the atomics folder or prerequisite downloads are harness noise, not detection of the technique.
- Remoting artefacts of
-Sessionresemble lateral movement; score only events produced by the test's own command. - A generic "suspicious PowerShell" alert firing for every test proves telemetry, not a specific detection; score it as low-fidelity alerted.
- Software deployment tools and admins create run keys, tasks and services
legitimately; the detection under test must still distinguish them (tune in
detection-engineering, not by allowlisting the test). - Anything on hosts, accounts or times outside the test card is not "the purple team" until proven: stop and triage it.
Pitfalls
- Running
Invoke-AtomicTest T####without a selector and getting every test for the technique at once. - Trusting test numbers from a document written against another atomics version.
-GetPrereqson production or on a host with Internet access you did not approve.- Testing only as local admin with EDR in audit mode and reporting it as production coverage.
- Forgetting
-Cleanup, or not verifying it: leftover run keys, tasks or accounts become real persistence and future false incidents. - Reverting the snapshot before exporting telemetry and the execution log.
- Treating a quarantine as a failed test and "fixing" it with an exclusion.
Output
- Execution log CSV (or Attire JSON) per exercise, stored with the evidence.
- One completed test card per run: technique, test name, GUID from the local YAML, atomics version, host, account, elevation, UTC time, expected vs observed telemetry, alert ID or "none", outcome, cleanup verified (how).
- Gaps handed to
detection-engineering(logic) orlogging-coverage(telemetry), with the atomic as acceptance test; hardening gaps tohardening-windows-adorhardening-linux. - Results recorded in
purple-exercise-tracking; scorecard via/scorecard; single test cards via/emulate. Theemulation-operatoragent runs this skill.
References
- MITRE ATT&CK techniques referenced, e.g. https://attack.mitre.org/techniques/T1547/001/
- Red Canary: Atomic Red Team project (atomics YAML format, contribution guide).
- Red Canary: Invoke-AtomicRedTeam wiki (installation, execution, logging modules, remote execution, cleanup).
- Microsoft Learn: Sysmon, Defender XDR advanced hunting schema (
DeviceProcessEvents,DeviceRegistryEvents,AlertEvidence). purple-team-validationfor rules of engagement and scoring definitions.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

