Hunting — Lateral Movement via SMB/PsExec
The prompt
In Microsoft Defender XDR advanced hunting, write and run a KQL query to identify potential lateral movement in the last 48 hours. Look for: - Remote service creation events (ServiceControlManager) - PsExec or equivalent tool usage (process name or command line contains psexec, paexec, or remcom) - Network connections on port 445 (SMB) originating from workstations (not servers) Return a table: source device, destination device, tool or method used, timestamp, and initiating user. Flag any source device that attempted lateral movement to more than 2 destinations.
How to use it
- 1Select Copy the prompt above.
- 2Paste it into Microsoft 365 Copilot.
- 3Replace anything in brackets with your own detail, then send it.
Copilot gathers and drafts. You verify and decide. Check every figure, name and date against the system it came from before you act on it.
Written for
Threat Hunter, SOC Analyst L3
More for Microsoft Copilot for Security
- First Look — Incident Summary
- Alert Triage — Is This a True Positive?
- Multi-Alert Correlation — Single Incident Thread
- Device Investigation — Rapid Scope
From the source collection in awesome-microsoft-copilot-prompts, licensed CC BY-SA 4.0.