Query Details
//Highlight actions performed remotely by a compromised account. DeviceProcessEvents | where Timestamp >= ago(7d) | where InitiatingProcessAccountSid == "SID" // Insert the compromised account SID here | where IsInitiatingProcessRemoteSession == "True" | project InitiatingProcessFileName, InitiatingProcessAccountSid, InitiatingProcessCommandLine, FileName, ProcessCommandLine
This query is designed to identify and highlight actions performed remotely by a compromised account on devices. Here's a simple breakdown of what it does:
DeviceProcessEvents, which contains information about processes on devices."SID" with the actual SID of the compromised account.InitiatingProcessFileName: The name of the file that started the process.InitiatingProcessAccountSid: The SID of the account that started the process.InitiatingProcessCommandLine: The command line used to start the initiating process.FileName: The name of the file associated with the process.ProcessCommandLine: The command line used to start the process.In summary, this query helps you find and review actions taken remotely by a compromised account within the last week.

Rod Trent
Released: August 5, 2024
Tables
Keywords
Operators