The File Was Renamed Three Times Before It Executed
The alert showed an executable starting from the user's Downloads folder.
That looked suspicious enough. But the file name in the alert was not the name it arrived with.
It had been renamed three times.
Agent Foskett wanted the part of the story that happened before execution.

The File Timeline
Execution was only the final event. The real investigation began by following the file backwards through every name, folder and process that touched it.
The alert started at 2:41 PM
Start with the process that actually executed
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
DeviceProcessEvents
| where Timestamp between (datetime(2026-08-25 14:30:00) .. datetime(2026-08-25 15:00:00))
| where FileName =~ "InvoiceViewer.exe"
| project Timestamp, DeviceName, AccountName,
FileName, FolderPath, SHA1,
ProcessCommandLine, InitiatingProcessFileName,
InitiatingProcessCommandLine
| order by Timestamp ascNow follow the hash backwards
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
let SuspiciousSHA1 = "REPLACE_WITH_SHA1";
DeviceFileEvents
| where Timestamp > ago(24h)
| where SHA1 == SuspiciousSHA1
| project Timestamp, DeviceName, ActionType,
FileName, FolderPath,
PreviousFileName, PreviousFolderPath,
InitiatingProcessFileName, InitiatingProcessCommandLine
| order by Timestamp ascThree names. One file.
Who performed the renames?
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
let SuspiciousSHA1 = "REPLACE_WITH_SHA1";
DeviceFileEvents
| where Timestamp > ago(24h)
| where SHA1 == SuspiciousSHA1
| summarize FirstSeen=min(Timestamp), LastSeen=max(Timestamp),
Names=make_set(FileName, 20),
Actions=make_set(ActionType, 20),
Initiators=make_set(InitiatingProcessFileName, 20)
by DeviceName, SHA1
| order by FirstSeen ascThen rebuild the process tree around execution
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
let Device = "WORKSTATION-27";
let ExecutionTime = datetime(2026-08-25 14:41:00);
DeviceProcessEvents
| where DeviceName =~ Device
| where Timestamp between (ExecutionTime - 10m .. ExecutionTime + 10m)
| project Timestamp, AccountName, FileName,
ProcessCommandLine, SHA1,
InitiatingProcessFileName,
InitiatingProcessCommandLine
| order by Timestamp asc
