Lesson 8 of 9 · 26m
Testing Detections: Atomic Tests, Purple Teaming, and Proof of Signal
How to validate rules with controlled execution, log inspection, and adversary emulation without confusing noise for capability.
A detection that has never been tested is a hypothesis. Worse, many "tests" only verify that a string appears in a log, not that the full pipeline fires an actionable alert. Honest detection work demands proof of signal: given realistic attacker behavior, did telemetry capture it, did logic match it, and did a human workflow receive it?
Test the chain, not the regex
An end-to-end test has four assertions:
- The test procedure executed.
- Expected telemetry was generated.
- Detection logic matched it.
- Alert routing and context were correct.
Atomic Red Team is useful because it encodes small procedures mapped to ATT&CK:
Invoke-AtomicTest T1059.001 -TestNumbers 1 -PathToAtomicsFolder C:\AtomicRedTeam\atomicsAfter execution, do not just ask "did the alert fire?" Inspect the raw event. If Sysmon captured the command line but the SIEM alert fired from a generic process-name rule, your behavioral detection still failed.
Build test fixtures from real procedures
Public tests are shallow by design. Mature teams keep a library of local test cases that reflect real intrusions and environment constraints:
test_id: cred-access-017
technique: T1003.001
host_class: windows-server-2019
procedure:
- execute: rundll32.exe C:\Windows\System32\comsvcs.dll, MiniDump 892 C:\ProgramData\lsass.dmp full
expectations:
telemetry:
- sysmon_event_id: 10
- file_create_path: 'C:\ProgramData\lsass.dmp'
detection:
- rule: suspicious_lsass_access
- rule: comsvcs_minidump
cleanup:
- remove_file: 'C:\ProgramData\lsass.dmp'Do not run credential theft simulations casually on production systems. Use approved windows, dedicated hosts, snapshots, and controls that prevent accidental credential exposure.
Purple teaming is calibration
The red team does not exist to "win," and the blue team does not exist to catch everything immediately. Purple teaming is calibration: execute procedures, observe what fired, tune or create detections, then re-test. The useful output is a matrix:
procedure telemetry alert triage quality action
comsvcs minidump yes yes good context isolate-ready
wmic remote create yes no missing rule tune needed
rundll32 proxy execution partial no commandline gap telemetry fixThis matrix is more valuable than a dramatic executive summary.
Beware gaming your own test
If defenders know the exact hash, filename, and time of the test, they can accidentally validate a detection that would never generalize. Vary filenames, paths, encoding, user context, and execution chain. Then ask whether the detection still fires for the behavior or only for the rehearsal artifact.
Field notes
- Keep evidence packs: commands run, timestamps, raw events, alert IDs, and screenshots when needed.
- Test negative cases too; a rule that fires on both attack and patch Tuesday is not operationally proven.
- Record failure honestly as "not detected"; near misses do not count as coverage.
- Re-test after parser, schema, sensor, or rule changes — detection regressions are routine.
Was this lesson helpful?