Authorised use only. Isolated lab only. Run tests only on the lab machines from Stage 3, after a snapshot. See Stage 1.
Goal. By the end you can take one atomic test from start to finish: write what you expect, run it, find its telemetry, check whether a detection fired, fix the gap, retest and clean up, with evidence at every step.
Why it matters#
A detection nobody has watched fire is a guess. A rule can look right and still fail: the log is not collected, a field has a different name, the rule is disabled, or the alert lands in a queue nobody reads. The only way to know is to cause the behaviour and look. That turns "we think we detect this" into evidence.
What you will learn#
What an atomic test is#
Atomic Red Team keeps a folder per ATT&CK technique. Each folder holds small tests. A test has a name, a GUID that does not change, the platforms it runs on, any prerequisites, the command and, usually, a cleanup command. Tests are small on purpose: one procedure for a technique, not the whole technique. The runner's wiki warns that a test can leave a system in an undesirable state and that you must understand it before you run it. Always read the test first.
The validation loop#
- Pick one behaviour from your plan and write the expectation first: the telemetry and the outcome.
- Read the test and check prerequisites.
- Prepare. Baseline snapshot, clocks checked, your search ready, start time noted in UTC.
- Run it once, with an execution log.
- Capture evidence: the log, the raw events, the query, the alert, a screenshot.
- Find the telemetry.
- Check the detection. Did an alert fire, not just did a search return rows?
- Classify the result and name the gap.
- Fix, then retest with the same test.
- Clean up and record.
Worked example: a scheduled task#
The test is T1053.005 "Scheduled task Local", GUID 42f53695-ad4a-4546-abb6-7d837f644a71. It runs
SCHTASKS /Create /SC ONCE /TN spawn /TR C:\windows\system32\cmd.exe /ST 20:10, which creates a one-time task
called spawn. It needs no elevation. Its cleanup deletes the task. These are the runner's documented options:
# Read the test and check its prerequisites
Invoke-AtomicTest T1053.005 -TestGuids 42f53695-ad4a-4546-abb6-7d837f644a71 -ShowDetails
Invoke-AtomicTest T1053.005 -TestGuids 42f53695-ad4a-4546-abb6-7d837f644a71 -CheckPrereqs
# Run it once and keep an execution log (create the folder first)
Invoke-AtomicTest T1053.005 -TestGuids 42f53695-ad4a-4546-abb6-7d837f644a71 -ExecutionLogPath C:\Evidence\EMU-2026-001.csv
# Clean up
Invoke-AtomicTest T1053.005 -TestGuids 42f53695-ad4a-4546-abb6-7d837f644a71 -CleanupThe default execution log records the test name and number, the run time in UTC and local time, the user and the host name. That gives you the exact moment to search around. Now find the telemetry:
| Source | What to look for | Needs |
|---|---|---|
| Sysmon event 1 | schtasks.exe with /Create in the command line |
Sysmon with process creation on |
| Security event 4688 | The same, in the Security log | Process-creation auditing and the command-line setting |
| Security event 4698 | "A scheduled task was created", task name spawn |
The "Audit Other Object Access Events" subcategory |
Missing from your search results? That is already a finding. Next, a detection. This small Sigma rule is
written for this roadmap. SigmaHQ's own proc_creation_win_schtasks_creation.yml uses the same core
selection and adds filters for common benign activity.
title: Scheduled Task Created With schtasks.exe (lab validation)
id: 5f1c8a3e-7d42-4b9e-9c0a-2e6b4a1d3f57
status: experimental
description: >
Detects schtasks.exe being run with the /create option. Used in the Threat
Emulation roadmap as a small rule to validate against an atomic test.
references:
- https://attack.mitre.org/techniques/T1053/005/
author: RoadMaps contributors
date: 2026-11-23
tags:
- attack.execution
- attack.persistence
- attack.privilege-escalation
- attack.t1053.005
logsource:
category: process_creation
product: windows
detection:
selection_img:
Image|endswith: '\schtasks.exe'
selection_cli:
CommandLine|contains: ' /create '
condition: all of selection_*
falsepositives:
- Software installers and administration scripts that create tasks
level: lowConvert it with sigma convert:
sigma convert -t splunk -p splunk_windows schtasks_create_lab.yml
sigma convert -t kusto -p azure_monitor schtasks_create_lab.yml
sigma convert -t kusto -p microsoft_xdr schtasks_create_lab.ymlImage="*\\schtasks.exe" CommandLine="* /create *"SecurityEvent
| where NewProcessName endswith "\\schtasks.exe" and CommandLine contains " /create "DeviceProcessEvents
| where FolderPath endswith "\\schtasks.exe" and ProcessCommandLine contains " /create "These came from sigma-cli 3.1.0 with pySigma 1.5.1, the Splunk backend 2.1.0 and the Kusto backend 1.0.1, checked on 2026-11-26. Add your own index and sourcetype to the SPL. On 2026-11-22, sigma-cli 4.0.1 with pySigma 2.1.1 could not load the Kusto backend, so pin versions that work together and read each plugin's README. Save the converted search as an alert in your SIEM, run the test again, and confirm an alert appears.
Keep the evidence#
| Field | Example (invented) |
|---|---|
| Test ID and technique | EMU-2026-001, T1053.005 |
| Test | "Scheduled task Local", GUID above |
| Host and user | LAB-WIN-01, labuser |
| Run time (UTC) | 2026-11-23T14:02:11Z, from the execution log |
| Expected | Process creation with /create; event 4698; an alert within 5 minutes |
| Observed | Sysmon 1 at 14:02:12Z; no 4698; alert at 14:03:40Z |
| Result | Logged and alerted, with a visibility gap on 4698 |
| Fix | Enabled the audit subcategory (ticket LAB-12) |
| Retest | 14:40Z: 4698 present |
| Cleanup | -Cleanup run, snapshot reverted |
Reading the result#
| Result | Meaning | Usual fix |
|---|---|---|
| Not logged | No event anywhere | Visibility gap. Enable the log, or repair the agent or pipeline. |
| Logged only | Events exist, no alert | Detection gap. Write or repair a rule. |
| Alerted | A rule fired | Check the quality: severity, context, delay. |
| Prevented | A control blocked it | Confirm the block was logged. To see what telemetry the test would have made, ask your product's documentation how its audit or detect-only mode works, in the lab only. |
One test is not coverage#
The T1053.005 folder holds many tests. One of them, "Powershell Cmdlet Scheduled Task" (GUID
af9fd58f-c4ac-4bf2-a9ba-224b71ff25fd), creates a task with PowerShell cmdlets and never runs schtasks.exe.
The rule above will not see it. Event 4698 will record it if auditing is on, and PowerShell script block logging, if
enabled, will show the cmdlets. A rule tied to one tool catches one procedure. Build detections on the behaviour where
you can, and remember that a passing atomic test is a floor, not a ceiling.
Do this#
- Write the expectation sheet (15 minutes). Telemetry and outcome for the scheduled task test, before you run it.
- Run the loop with evidence (2 hours). Snapshot, run the test once, find all three events, then clean up and fill in the evidence table.
- Detect it (2 hours). Convert the Sigma rule for your SIEM, save it as an alert, run the test again and confirm an alert fires. Compare your rule with the SigmaHQ one.
- Break it on purpose (2 hours). Run the PowerShell cmdlet test. Show that your rule misses it, find the events that do see it, add a second rule or fix the logging, and retest.
- Repeat for two more rows of your stage 2 plan (4–6 hours). One evidence table each.
- Put it in Git (30 minutes). The rule, the commands and the evidence tables, in a private repository.
Resources#
Free first
- Execute atomic tests (local), check or get prerequisites, cleanup and execution logging - the runner's own pages for every command used here.
- The T1053.005 atomics - read every test in the technique before choosing one.
- Sigma documentation and sigma-cli - rule format and the converter. The SigmaHQ rules are your reading library.
- Event 4688 and event 4698 - what the fields mean and which audit setting enables each.
- Scheduled Task/Job: Scheduled Task (T1053.005) - the technique page and its detection strategy.
Paid or needs an account
- None needed for this stage.
Checkpoint#
You are ready to move on when you can:
Go deeper (optional)#
- Read the detection strategy on the T1053.005 page and compare it with your rule.
- Find two more procedures for the same technique in public reports and add them to your plan.
- Detection Engineering stage 6 covers tuning and shipping the rule you have just validated.