The Process Tree Told The Real Story
The antivirus alert never triggered.
The file looked legitimate. Signed by Microsoft.
No malware verdict. No obvious warning.
```
But one process launched another.
Then another.
Then PowerShell spawned silently in the background.
The dashboard looked quiet.
The process tree told the real story.
This Agent Foskett investigation explores how defenders use Microsoft Defender XDR, DeviceProcessEvents and KQL to follow parent and child processes, uncover suspicious execution chains and investigate what really happened on an endpoint.
```
Briefing summary
A single process can look harmless. The real story appears when defenders follow what launched it, what it launched next and whether the execution chain matches normal user behaviour.
Why process trees matter in Microsoft Defender XDR
First hunt: suspicious process chains
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
DeviceProcessEvents | where Timestamp > ago(7d) | where FileName in~ ("powershell.exe", "cmd.exe", "wscript.exe", "cscript.exe", "mshta.exe", "rundll32.exe") | project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine, InitiatingProcessParentFileName | order by Timestamp desc
Second hunt: encoded PowerShell and command-line indicators
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
DeviceProcessEvents | where Timestamp > ago(7d) | where FileName in~ ("powershell.exe", "pwsh.exe", "cmd.exe") | where ProcessCommandLine has_any ("-enc", "encodedcommand", "bypass", "downloadstring", "invoke-webrequest", "iex") | project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine | order by Timestamp desc
When legitimate Microsoft-signed processes become suspicious
Third hunt: Office or browser spawning scripting tools
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
DeviceProcessEvents | where Timestamp > ago(14d) | where InitiatingProcessFileName in~ ("winword.exe", "excel.exe", "outlook.exe", "teams.exe", "chrome.exe", "msedge.exe") | where FileName in~ ("powershell.exe", "cmd.exe", "wscript.exe", "mshta.exe", "rundll32.exe") | project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, FileName, ProcessCommandLine, InitiatingProcessCommandLine | order by Timestamp desc
Fourth hunt: build a simple endpoint timeline
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
DeviceProcessEvents | where Timestamp between (datetime(2026-05-28T00:00:00Z) .. datetime(2026-05-28T23:59:59Z)) | where DeviceName == "DEVICE-NAME-HERE" | project Timestamp, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine | order by Timestamp asc
What the process tree can prove
The Agent Foskett investigator mindset
How GEMXIT approaches endpoint investigations
Final thought
A file signature can give false comfort.
A quiet dashboard can make everything feel fine.
But the chain remembers.
What launched first. What spawned next. Which user context was used. Which command line ran. Which tool reached out.
The process tree told the real story.
It is: “What did the process tree reveal?”
Continue the investigation with The Process Was Signed By Microsoft, rundll32 Looked Legitimate, The PowerShell Never Triggered An Alert, Microsoft Defender KQL Threat Hunting Complete Guide, KQL Threat Hunting Guide, Cyber Security Has Moved Beyond Basic Antivirus, Microsoft Defender and the GEMXIT Security Review.
Develop IT. Protect IT.GEMXIT PTY LTD | GEMXIT UK LTD