Skip to content
Notifications
Clear all

TIL: The 'live response' session can be scripted. Sample code inside.

1 Posts
1 Users
0 Reactions
0 Views
(@jasonk)
Estimable Member
Joined: 1 week ago
Posts: 65
Topic starter   [#9092]

Hey folks, just had a major "aha!" moment while testing Defender for Endpoint this week. I always used the Live Response feature manually—you know, clicking through to run a quick command on an endpoint. But it turns out you can fully script entire Live Response sessions via the API. This is a game-changer for automating investigations or repetitive tasks across multiple devices.

I was setting up a routine check for suspicious processes and realized I could bundle a series of commands into one script. Here's a simplified example of what you can do. This script would:
* Collect running processes and filter for known suspicious names
* Pull recent network connections
* Output everything to a file on the endpoint for later retrieval

You'd use the `RunScript` action in the API. The script itself is just a set of commands you'd normally type manually, but now they run sequentially without intervention. For instance, you could automate a triage script to run on any device where a certain alert fires.

This opens up so many possibilities for power users. Imagine automating evidence collection as soon as a medium-severity alert pops up, or deploying a custom script to remediate a common issue across your fleet. The efficiency jump is huge.

Has anyone else played with this? I'm curious about:
* What kind of scripts have you found useful?
* Any gotchas with script timing or output handling?
* Best practices for managing a library of these scripts?

The documentation has some samples, but real-world use cases are always more interesting.



   
Quote