Unit 1: Detection lifecycle and ATT&CK coverage · Lesson 4 of 7 · 16 min
Read what ATT&CK says to watch
Follow a technique to its detection strategy and analytic to see which log sources ATT&CK expects you to collect.
mission
- You are
- You are researching DR-101, the LSASS memory dump rule.
- Situation
- Before writing or reviewing a rule you need to know which events can show the behaviour. Since v18, ATT&CK links each technique to detection strategies, and each strategy to analytics that name log sources.
- Goal
- Walk from T1003.001 to its analytic and list the events it uses.
- Hand in
- The detection strategy ID and the Sysmon event IDs it relies on.
From technique to log source
- attack-patternT1003.001 LSASS Memory
- relationship: detectsPoints from a strategy to the technique
- x-mitre-detection-strategyDET0363, the plan
- x-mitre-analyticAN1030, the Windows version of the plan
- log source referencesWhich events and channels to collect
Find the detection strategy
Three jq calls: get the technique's STIX id, find the detects relationship that points at it and save the strategy id to a file, then print the strategy. --arg passes a shell value into jq, and --rawfile reads a whole file into a jq variable.
T=$(jq -r '.objects[] | select(.type=="attack-pattern" and .external_references[0].external_id=="T1003.001") | .id' attack/enterprise-attack.json)
jq -r --arg t "$T" '.objects[] | select(.type=="relationship" and .relationship_type=="detects" and .target_ref==$t) | .source_ref' attack/enterprise-attack.json > /tmp/det.txt
jq -r --rawfile d /tmp/det.txt '.objects[] | select(.id==($d|rtrimstr("\n"))) | .external_references[0].external_id + " " + .name' attack/enterprise-attack.json
DET0363 Detection of Credential Dumping from LSASS Memory via Access and Dump Sequence
you should see DET0363, detection of credential dumping from LSASS memory via access and dump sequence.
jq- Picks fields out of JSON and reshapes it. Install with sudo apt install jq, or brew install jq on a Mac.
Read its analytic and log sources
The strategy holds a list of analytic ids. IN($a[]) keeps the analytics in that list.
jq -r --rawfile d /tmp/det.txt '(.objects[] | select(.id==($d|rtrimstr("\n"))) | .x_mitre_analytic_refs) as $a | .objects[] | select(.type=="x-mitre-analytic" and (.id | IN($a[]))) | .external_references[0].external_id, (.x_mitre_platforms | join(",")), (.x_mitre_log_source_references[] | " " + .name + " " + .channel)' attack/enterprise-attack.json
AN1030
Windows
WinEventLog:Sysmon EventCode=10
WinEventLog:Sysmon EventCode=1
WinEventLog:Sysmon EventCode=11
WinEventLog:Security EventCode=4673
WinEventLog:Sysmon EventCode=13, 14
you should see One Windows analytic, AN1030, using Sysmon events 10, 1, 11, 13 and 14 and Security event 4673.
Read the analytic description
fold -s -w 100 wraps long lines at spaces.
jq -r '.objects[] | select(.type=="x-mitre-analytic" and .external_references[0].external_id=="AN1030") | .description' attack/enterprise-attack.json | fold -s -w 100
A non-privileged or abnormal process attempts to open a handle with full access (0x1F0FFF) to
lsass.exe and subsequently invokes memory dump, file creation, or registry modification indicative
of credential scraping. This behavior chain reflects staged credential theft activity.
you should see Process access to lsass.exe followed by a dump, file write or registry change.
fold- Wraps long lines of text to a set width. Built into Linux and macOS.
What a defender takes away
- 1Detection strategies and analytics tell you which logs a technique leaves.
- 2Check your log sources against them before writing the rule.
- 3One technique usually needs more than one rule to be well covered.
Questions
0 of 2 solved
Answer each one from what you find on your lab machine.