Every program running on a computer was started by another program. That relationship, parent and child, is recorded by the operating system and captured by endpoint detection and response (EDR) tools. Strung together, the relationships form a process tree. For an analyst looking at an endpoint alert, the tree is often the single most useful view, because it turns an isolated event into a story with a beginning.

What normal looks like on Windows

You cannot spot an odd tree without knowing a normal one. Windows boots in a predictable way, and the core system processes have stable parents:

  • The session manager (smss.exe) starts early and launches the processes that set up each session.
  • wininit.exe starts the service control manager (services.exe) and the local security authority (lsass.exe), which handles logons and holds credential material in memory. There should be one lsass.exe, and its parent should be wininit.exe.
  • Service host processes (svchost.exe) are many, but their parent should be services.exe, and they should run from the Windows System32 folder.
  • When a user logs on, winlogon.exe runs userinit.exe, which starts explorer.exe (the desktop shell) and then exits. Programs a user opens from the Start menu or desktop are therefore normally children of explorer.exe.

Resources such as the SANS “Hunt Evil” poster summarise these expectations, and they are worth learning thoroughly.

Four patterns that should make you look twice

The wrong parent. A svchost.exe whose parent is not services.exe, or a second lsass.exe, suggests something is impersonating a system process.

The right name in the wrong place. A process called svchost.exe running from a user’s temporary folder or downloads directory is not Windows’ service host. Near-miss names such as swapping two letters are a related trick that relies on tired eyes.

Applications spawning shells. Word, Excel, Outlook, PDF readers and browsers rarely have a legitimate reason to launch a command prompt, PowerShell or a scripting host. This one pattern catches a large share of malicious document attacks.

Servers spawning shells. A web server or database process starting a command shell often indicates a web shell or exploitation of the application.

One caveat: parent process information can be deliberately falsified by attackers using a technique known as parent PID spoofing. Good EDR tools record the real creator separately, but analysts should know the parent field is not infallible.

Walking an alert from top to bottom

Suppose an EDR alert fires with the title “Suspicious PowerShell execution” on a sales laptop at an illustrative pharmaceutical distributor in Ahmedabad. A disciplined triage looks like this.

1. Read the alert itself. What rule fired, with what severity, and which ATT&CK technique does the vendor map it to? Was the activity blocked or only detected? This decides urgency.

2. Go up the tree. PowerShell’s parent was excel.exe, whose parent was outlook.exe. So the user opened a spreadsheet attachment that started PowerShell. The origin is now clear: email.

3. Read the command line. The PowerShell command is encoded and, decoded, attempts to fetch content from an unfamiliar domain. This is no longer ambiguous.

4. Go down the tree. Did PowerShell start anything else? Here it wrote a file to the user’s AppData folder and launched it, and that child process made repeated outbound connections. The attack progressed beyond the first step.

5. Look sideways. Check the file and registry changes made by these processes: a new scheduled task or run key means persistence. Check the hash, signature and prevalence of the dropped file: if it exists on only this one machine in the whole fleet, that is significant.

6. Widen the scope. Who else received the email? Did any other endpoint contact the same domain? Did this user’s account log in anywhere unusual after the event?

7. Act. Isolate the host through the EDR (most tools can cut its network access while keeping the management connection), block the domain and hash, pull the email from other mailboxes, and reset the user’s credentials if there is any chance they were exposed.

When the tree looks suspicious but is not

Plenty of legitimate software creates strange trees. Accounting packages run macros that launch helper programs. IT management agents run PowerShell under the SYSTEM account at odd hours. Developer tools spawn shells constantly. Some Excel add-ins legitimately call scripts.

The deciding evidence is usually in the details around the tree: whether the binaries are signed by a known vendor, whether the same pattern appears across hundreds of machines every day (prevalence), whether the command line matches a known management script, and whether there is any network or persistence activity a legitimate tool would not need. An alert closed as a false positive should leave behind a note explaining which of those facts proved it benign, so the next analyst, or a tuning rule, can reuse the reasoning.

Reading process trees well is one of the most transferable SOC skills. It works across EDR products because the underlying operating system behaviour is the same, and it rewards the analyst who has taken the time to learn what healthy machines look like.

Written by the RP Strativa Team. The company and alert in the example are illustrative.

Leave a Reply

Trending