icon/x Created with Sketch.

Splunk Cookie Policy

We use our own and third-party cookies to provide you with a great online experience. We also use these cookies to improve our products and services, support our marketing campaigns, and advertise to you on our website and other websites. Some cookies may continue to collect information after you have left our website. Learn more (including how to update your settings) here.
Accept Cookie Policy

We are working on something new...

A Fresh New Splunkbase
We are designing a New Splunkbase to improve search and discoverability of apps. Check out our new and improved features like Categories and Collections. New Splunkbase is currently in preview mode, as it is under active development. We welcome you to navigate New Splunkbase and give us feedback.
Log4Shell Vulnerability: Information and guidance for you. Get resources.

Accept License Agreements

This app is provided by a third party and your right to use the app is in accordance with the license provided by that third-party licensor. Splunk is not responsible for any third-party apps and does not provide any warranty or support. If you have any questions, complaints or claims with respect to this app, please contact the licensor directly.

Thank You

Downloading MS Defender Advanced Hunting
SHA256 checksum (ms-defender-advanced-hunting_005.tgz) e154b2df9525929a76a24d5698cac159b483a60cebfa11174e2baa8c2fe2814e
To install your download
For instructions specific to your download, click the Details tab after closing this window.

Flag As Inappropriate


MS Defender Advanced Hunting

This App can query MS Defender Advanced Hunting with their format.

Please feel freeeeee to contact me if you have any questions or requests.

Technical Add-on MS Defender Advanced Hunting

1. Overview

This App can query MS Defender Advanced Hunting with their query format (KQL) through Defender API.

There are two plans in Defender API and this app support both.

  • Defender for Endpoint Plan 1
  • Defender for Endpoint Plan 2

This plan is relevant when creating an app on Azure AD.

Please refer this for more detail about the plan.

2. Installation

  1. Create an App on Microsoft Azure AD with plan 1 or plan 2 following this. I recommend to use plan 2.
  2. Keep a note your Directory (Tenant) ID, Application (Client) ID and Client Secret of your Azure App.
  3. Go to Splunk setup page.
    • Apps -> Manage App -> Set up
  4. Set Directory (Tenant) ID, Application (Client) ID, Client Secret and your plan version you got previous step.

3. Usage

  • advhunt command
    • Advanced Hunting Query

3.1 advhunt command

  • Returns a list of query results that you set your Advanced Hunting query.
  • There are two following option.

    • query: Required. Set your Advanced Hunting Query
    • plan: Optional. If not set, this app use the value of setup page.
      • Defender for Endpoint Plan 1: set v1
      • Defender for Endpoint Plan 2: set v2
  • Example 1

    • If you want to search the word contains \, please use \\\\\\\ or \\\x5c in SPL.
| advhunt query="DeviceFileEvents
  | where Timestamp > ago(1d)
  | where FolderPath matches regex 'C:\\\x5cUsers' or FolderPath matches regex 'C:\\\\\\\Users'
  | project Timestamp, DeviceId, DeviceName, ActionType, FolderPath, FileName"
| spath input=_raw 
  • Example 2
    • Use Defender for Endpoint Plan 2 explicitly.
| advhunt plan=v2 query="AlertInfo | Timestamp > ago(3d) | limit 2" 
| spath input=_raw 
  • Example 3
    • Query an advanced hunting using the result of the previous SPL
| makeresults 
| eval ActionType = "AntivirusReport,HogeReport"
| makemv delim="," ActionType
| mvexpand ActionType
| mvcombine ActionType
| eval query = "('" . mvjoin(ActionType, "', '") . "')"
| map search="| advhunt query=\"DeviceEvents | where ActionType has_any $query$ \" | spath input=_raw | table * "

4. Note

5. Debug

  • Please check the internal log.
index=_internal source="*advanced_hunting*" NOT "__init__"

Release Notes

Version 0.0.5
June 8, 2022

Support Defender for Endpoint Plan 2

Subscribe Share

Are you a developer?

As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 10GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps from Splunk, our partners and our community. Find an app for most any data source and user need, or simply create your own with help from our developer portal.

Follow Us:
Splunk, Splunk>,Turn Data Into Doing, Data-to-Everything, and D2E are trademarks or registered trademarks of Splunk Inc. in the United States and other countries. All other brand names,product names,or trademarks belong to their respective owners.