Incident Response Engineering

Extend Defender Live Response with PowerShell and KQL

Built live endpoint collection and command tools, persistence checks and reusable KQL investigation functions. Enabled Defender’s native Attack Disruption for automated account containment.

UK Water UtilityResponse tooling and endpoint-control configuration2 min read

An endpoint investigation can need evidence that is not available in the EDR portal: current services, local logs, listening connections or the device’s actual security configuration. I built PowerShell tooling around Microsoft Defender for Endpoint (DfE/MDE) Live Response to retrieve that context during an investigation.

The scripts collect security logs, execute investigation commands and inspect network connections and listening services. I added a shell-like command workflow and on-demand checks for the endpoint’s live Defender status and configuration. Another script collects running services and Windows Run-registry entries for agent-assisted review of potential persistence.

I paired endpoint collection with reusable KQL functions for Microsoft Entra ID sign-in summaries, VPN IP-to-user/host attribution and Defender account actions. The functions support questions analysts need to answer repeatedly: who was behind an address, what authentication activity took place and whether Defender had already disabled an account.

I also enabled Microsoft Defender Attack Disruption for automatic account disabling. That uses Microsoft’s native containment capability. My custom contribution is the investigation and collection tooling, supported by analyst runbooks for authentication attacks, Pass-the-Ticket, unwanted software, reconnaissance and Sysmon health.

Methods, evidence & technical decisions

Collect evidence of possible persistence

I scripted collection of running services and Windows Run-registry entries, then passed the output to an agent for review. The workflow brings candidate persistence signals together for examination alongside the wider incident evidence.

Open this detail ↗
Inspect the endpoint’s live state

The Defender Live Response scripts collect security logs, run commands and examine network connections or listening services. On-demand retrieval of Defender status and configuration complements centrally available EDR telemetry with the current state reported by the device.

Open this detail ↗
Use native containment with visibility of its actions

I enabled Microsoft Defender Attack Disruption and its automatic account-disablement capability. Separately, my KQL identifies accounts that Defender has already disabled, giving the analyst evidence of response actions to include in the investigation.

Open this detail ↗
Make recurring investigation questions reusable

My KQL functions cover Entra sign-in context, VPN address attribution and Defender account actions. The accompanying runbooks explain investigation of NTLM/Kerberos brute force, Pass-the-Ticket, unwanted software, reconnaissance and Sysmon health. I also contributed investigation standards covering evidence, root cause, impact and response.

Open this detail ↗

Skills used in this work

This work connects to

Security automationSOC & incident responseSecurity engineering & assurance

Your exploration

Viewed history

Saved only in this browser.

Ask my portfolio

Ask about my work.

Ask about an investigation, a technology or my contribution. Answers link to the relevant case and technical detail.

Every answer links to the work.
How this works

When AI is connected, your question, recent questions and relevant published pages are sent to MiniMax to select supporting passages. Otherwise, this searches the site directly. Answers quote the saved website and link to their sources. This website does not save chat transcripts. Clearing or leaving the page clears this conversation.

Help improve this website

Report an issue

Spotted something broken or inaccurate? Tell me what happened and what you expected.