Coder Social home page Coder Social logo

m365dplaybooks's Introduction

M365 Defender Custom Playbooks

M365 Defender SOC Playbooks - "Ransomware Recovery โ€œSOC โ€“ Automated Restore Playbook"

A power automate playbook that integrate as connected application to Microsoft Defender for Endpoint and OneDrive for business to allow SOC to recover from ransomware files/data disruption via an automated process. Noting that the playbook trigger can be replaced with a recurrence schedule instead of MDE alert base.

Pre-reqs:

  • Microsoft Defender for Endpoint.
  • Concerned machines are already conbaored and synced with OneDrive For business.
  • POwer Automate / Azure Logic Apps.

Please note this is just a sample - PoC. Below are the main configuration & setup steps:

First you need to create app registeration under your M365 Defender tenant, make sure to consent the folowing application permissions under "Microsoft Graph" API permissions:

OneDrive App REg MDE permissoon

Then follow the following steps to import the Power automate playbook, you can alos leverge the same Power automate playbook steps to be used in an Azure Logic App:

  1. Attached the Power Automate playbook, you can import it and connect as MDE application for more details please check https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/api-microsoft-flow?view=o365-worldwide
  2. Ensure of adding the following ransomware activites as MDE custom detection rules in addition to https://learn.microsoft.com/en-us/microsoft-365/security/defender/advanced-hunting-find-ransomware?view=o365-worldwide: (you might consolidate all activites into one custom detection rule as well):
  • Open http://security.microsoft.com portal
  • Open Advanced hunting blade, copy and paste the below detection KQL query and validate if there is no any syntax errors:

union DeviceFileEvents, DeviceProcessEvents | where ActionType == "FileCreated" and InitiatingProcessFileName contains "python" and InitiatingProcessCommandLine contains "encrypt" | project Timestamp, ReportId, DeviceId, DeviceName, ActionType,FileName, FolderPath, SHA1, SHA256, MD5, FileSize, ProcessId, ProcessCommandLine,ProcessTokenElevation, ProcessCreationTime

  • Then save the query as custom detection rule, you might use the following attributes value as a sample:

Detection Name: Ransomware - python encryption script interpreter process was created by powershell.exe Frequency: you can define it Alert title: Ransomware - python encryption script interpreter process was created by powershell Severity: define it Category: Ransomware Description: Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries. These interfaces and languages provide ways of interacting with computer systems and are a common feature across many different platforms. T1059.006: Python and T1059: Command and Scripting Interpreter Recommended actions: Investigate and check the encrypted files and confirm if it's malicious and ransom activity then use native OneDrive Defender recovery feature.

MDEOneDriveRansomwareRecovery-part2-New

m365dplaybooks's People

Contributors

hesaad avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.