Lesson 1 of 9 · 24m
Windows Process Anatomy for Security Work
Read process creation, parentage, command lines, image paths, and user context the way an incident responder does.
The first time you investigate a compromised Windows host, the process list will look like noise. Then you learn the shape of normal: System has no parent in the usual sense, smss.exe starts session processes, wininit.exe starts services, and almost everything user-facing descends from explorer.exe or a service host. Attackers count on defenders not knowing that shape.
Start with lineage, not the process name
A process name is cosmetic. powershell.exe can be a legitimate admin shell, a malware stager, or a renamed copy in a temporary directory. Parentage, image path, command line, user, session, and start time are what make it meaningful:
Get-CimInstance Win32_Process |
Select-Object ProcessId,ParentProcessId,Name,ExecutablePath,CommandLine |
Format-ListWin32_Process is convenient but lossy. For serious analysis, compare it with Process Explorer, Process Hacker, or event telemetry. Command lines can be missing, access can be denied, and short-lived processes may already be gone.
Know the core boot chain
A simplified workstation tree looks like this:
System
smss.exe -> csrss.exe + wininit.exe + winlogon.exe
wininit.exe -> services.exe + lsass.exe + svchost.exe trees
winlogon.exe -> userinit.exe -> explorer.exeExact lineage varies with sessions, fast user switching, RDP, and modern Windows features. What matters is noticing impossible relationships. winword.exe spawning cmd.exe, which spawns powershell.exe, which spawns rundll32.exe is not automatically malicious — but it is absolutely a story that needs explaining.
Paths tell on lazy attackers
A legitimate binary usually lives where Windows expects it:
C:/Windows/System32/lsass.exe
C:/Windows/System32/svchost.exe
C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exeA binary named svchost.exe in %TEMP%, %APPDATA%, C:/ProgramData, or a user-writable directory is suspicious until proven otherwise. Conversely, the correct path does not prove innocence. Signed binaries can be abused, DLLs can be side-loaded, and command lines can be hidden behind packed or encoded launchers.
Command lines are evidence, not truth
Attackers can spawn processes with misleading command lines, use living-off-the-land binaries, or execute inside another process after creation. Still, command lines remain one of the highest-value artifacts:
Get-CimInstance Win32_Process -Filter "Name='powershell.exe'" |
Select-Object ProcessId,ParentProcessId,CommandLineLook for -enc or -encodedcommand, download cradles, hidden windows, bypass flags, unusual execution policies, and paths with spaces deliberately abused to invoke unintended binaries.
Field notes
- Never close a case because the process name is a Microsoft name. Verify path, signer, parent, and behavior.
- A missing parent PID often means the parent exited; do not invent a conspiracy before checking process start times.
svchost.exeshould normally be launched byservices.exewith-k; anything else deserves scrutiny.- User processes belong to interactive sessions; service processes usually run in session 0. Session context is a useful clue.
- Correlate before killing. You get one chance to capture memory, network connections, and handles before remediation destroys them.
Was this lesson helpful?