Goal. By the end you can read a Windows process tree and run hunts for common endpoint techniques: execution, persistence, credential theft, movement between hosts and tampering with defences.
Why it matters#
Intruders rarely need custom malware for every step. They use PowerShell, scheduled tasks, services and remote administration that your own staff use daily. What gives them away is usually context: who started the program, from where, with which arguments, and what happened next. Learning to read that context is the most transferable hunting skill.
What you will learn#
Reading a process tree#
Every process has a parent, the process that started it. A chain of these is a process tree. Read it from the top and ask five questions of each step.
| Question | What to look at |
|---|---|
| Who started it? | Parent and grandparent: is this a normal pairing? |
| What is it really? | Full path, signer and hash, not just the name |
| What was it told to do? | Command line: encoded text, download addresses, unusual switches |
| Who ran it? | Account, logon type, integrity level |
| What did it do next? | Child processes, files written, registry changes, network connections |
An invented example:
WINWORD.EXE user opens invoice.docm from an email
└─ cmd.exe a document editor starting a shell is unusual
└─ powershell.exe -nop -w hidden -enc <long text>
├─ connects to 203.0.113.20:443
└─ writes C:\Users\alex\AppData\Roaming\upd.exeNo single line is proof. Together they are worth escalating.
Two cautions. Process IDs are reused, so join parent to child with the process GUID (Sysmon) or the process ID plus creation time. And a parent can be faked: an attacker may create a process that claims a different parent, so treat a tree as evidence, not certainty.
Learn what is normal first. On Windows, services.exe starts services, explorer.exe starts what the user
double-clicks, and there should be one lsass.exe, started by wininit.exe. A look-alike name in the wrong
folder is a technique of its own
(T1036.005).
The hunts#
IDs are from ATT&CK v20.1 as listed on the live site on 2026-11-23. Event numbers are Sysmon (S) or Windows Security (W).
| Technique | Hunt for | Data | Common harmless causes |
|---|---|---|---|
| PowerShell (T1059.001) | Encoded or hidden commands, download-and-run, unusual parents | S1, W4688, PowerShell 4104 | Management tools, installers, login scripts |
| System binary proxy execution (T1218) | mshta, rundll32, regsvr32 loading from web addresses or user folders |
S1, S7, S3 | Old line-of-business software |
| Scheduled task (T1053.005) | Actions that run scripts or user-writable paths | W4698, S1 | Backup and patch agents |
| Windows service (T1543.003) | New services with odd paths, script commands or random names | System 7045, W4697, S13 | Software installs |
| Run keys and Startup folder (T1547.001) | New entries pointing to user-writable folders | S13, S11 | Chat and cloud-sync clients |
| WMI event subscription (T1546.003) | Any new permanent subscription | S19, S20, S21 | A few management products |
| LSASS memory (T1003.001) | Unusual processes opening or dumping lsass.exe |
S10, S11, EDR | Security products, which are noisy |
| Kerberoasting (T1558.003) | One account requesting tickets for many services | W4769 on domain controllers | Scanners, some applications |
| Remote services (T1021) | New source-to-destination pairs for RDP, SMB or WinRM | W4624, S3 | Administrators, jump hosts |
| Clear Windows event logs (T1685.005) | Log clearing | W1102, System 104, S1 | Rare; confirm with the owner |
| Disable or modify tools (T1685) | Security services stopped, exclusions added | Product audit logs, S1, S13 | Support work, upgrades |
| Inhibit system recovery (T1490) | Backups or shadow copies deleted | S1 | Backup software rotation |
| Remote access tools (T1219) | Remote-support software you did not approve | S1, S3, DNS | Approved helpdesk tools |
Hunt 1: script interpreters with unusual parents#
Hypothesis: if a user opened a malicious document, we would see an Office program start a script interpreter.
DeviceProcessEvents
| where Timestamp > ago(30d)
| where InitiatingProcessFileName in~ ("winword.exe", "excel.exe", "powerpnt.exe", "outlook.exe")
| where FileName in~ ("cmd.exe", "powershell.exe", "pwsh.exe", "wscript.exe", "cscript.exe", "mshta.exe")
| summarize Count = count(), Hosts = dcount(DeviceName), Example = any(ProcessCommandLine)
by InitiatingProcessFileName, FileNameIllustrative: test it in your lab before relying on it.
Pivot from each hit to the user, the file opened, the children and the network connections in the next few minutes. It misses documents that run code inside the Office process, and chains that pass through another program first.
Hunt 2: persistence that runs from user-writable places#
index=endpoint EventCode=13 TargetObject="*\\CurrentVersion\\Run*"
| regex Details="(?i)(\\\\appdata\\\\|\\\\temp\\\\|\\\\users\\\\public\\\\|\\\\programdata\\\\)"
| stats dc(host) AS hosts, min(_time) AS first_seen, values(Image) AS written_by BY Details
| convert ctime(first_seen)
| sort hostsIllustrative: test it in your lab before relying on it. It only sees what your Sysmon configuration records for event 13.
Apply the same idea to task actions and service paths. Stacking (stage 4) works well here.
Hunt 3: service ticket bursts#
Kerberoasting means requesting Kerberos service tickets in order to crack service account passwords offline.
index=wineventlog EventCode=4769 Service_Name!="*$" Service_Name!="krbtgt" earliest=-7d
| bin _time span=10m
| stats dc(Service_Name) AS services, values(Ticket_Encryption_Type) AS enc BY _time, Account_Name, Client_Address
| where services>=10Illustrative: test it in your lab before relying on it. Field names depend on your add-on. A patient
attacker who requests one ticket a day will not appear, so also stack the accounts and services that use weaker
RC4 encryption (type 0x17).
Hunt 4: new paths between hosts#
Movement shows up as a relationship that did not exist before: this workstation has never signed in to that server. Use first-seen on the pair of source and destination.
let history = DeviceLogonEvents
| where Timestamp between (ago(30d) .. ago(1d)) and LogonType in ("Network", "RemoteInteractive")
| distinct AccountName, RemoteDeviceName, DeviceName;
DeviceLogonEvents
| where Timestamp > ago(1d) and LogonType in ("Network", "RemoteInteractive") and ActionType == "LogonSuccess"
| where isnotempty(RemoteDeviceName)
| join kind=leftanti history on AccountName, RemoteDeviceName, DeviceNameIllustrative: test it in your lab before relying on it. Expect many new pairs after any change to your estate. Narrow to administrator accounts and critical servers first.
Then look on the destination for what ran. A new service created moments after the logon suggests
service execution; a process started by wmiprvse.exe suggests
WMI.
Memory-only activity#
Some techniques, such as process injection, run code inside a legitimate process. Sysmon events 8 and 10 and EDR memory alerts give leads, but they are noisy and incomplete. If your hypothesis depends on seeing inside memory, say in the result that logs alone cannot refute it. SOC & Incident Response stage 6 covers deeper collection.
Do this#
- Draw three process trees (2 hours). Pick a normal logon, a software install and a recorded attack from a public dataset. Note what differs.
- Run hunts 1 to 4 in a lab (6 hours). Generate harmless test activity for each, confirm you find it, and record the harmless noise.
- Test with known behaviour (4 hours). On an isolated test machine you own, run one persistence test from Atomic Red Team, find it, then run its cleanup. Read Threat Emulation stage 1 first.
- Write one hunt card to completion (2 hours). Include what the result does not cover.
Resources#
Free first
- LOLBAS - built-in Windows programs that attackers abuse, by function.
- Sysmon - event reference for the table above.
- Event 4769 - field meanings for Kerberos service ticket requests.
- Hunt Evil poster (free account may be needed) - SANS's summary of normal Windows processes and their parents.
- Atomic Red Team - small tests mapped to ATT&CK, for lab use.
Paid or needs an account
- None needed for this stage.
Checkpoint#
You are ready to move on when you can:
Go deeper (optional)#
- Detection Engineering stage 5 turns a repeatable hunt into a rule.