Forum Discussion

stade1655's avatar
stade1655
Copper Contributor
Feb 05, 2025
Solved

Advanced Hunting along with a Custom Detection Rule

Good afternoon,   I need some help setting up a KQL query in Advanced Hunting along with a Custom Detection Rule to automatically isolate devices where a virus or ransomware is detected. The rule mu...
  • luchete's avatar
    Feb 07, 2025

    Hi stade1655!

    Good morning on this side 😄!

    To create a KQL query for Advanced Hunting, you can start by using the "DeviceEvents" table to look for suspicious activity related to viruses or ransomware. Once you've crafted your query to detect the event or signature, you can set up a Custom Detection Rule in Microsoft Defender for Business. The rule can be configured to trigger at a Near Real-Time frequency and isolate the affected device automatically when a match is found. You'll need to use the "Create a custom detection rule" feature in the Microsoft 365 Defender portal to link the KQL query to the automation action for device isolation.

    Let me know if you need more details on how to achieve it. 

    Regards

Resources