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.

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_024.tgz) 143f6d0343115d6ad747f2328770d13ee521004bf89eb98822d0e00e43e452d1 SHA256 checksum (ms-defender-advanced-hunting_023.tgz) 5212822b212d87534a95ea3f8f82b8b5524ecbd4bb5c7da9b5ca4cf5511b2e02 SHA256 checksum (ms-defender-advanced-hunting_021.tgz) 748e705bfb2165daf194a6dbbe088ac066a1eaaa2b27b3bf857ce3b2294a390d SHA256 checksum (ms-defender-advanced-hunting_020.tgz) 901617f347511cc00e62484492d9b9970ca9fbf383c4f4fd8d00aca6d32181a3 SHA256 checksum (ms-defender-advanced-hunting_013.tgz) 882592bfa3d90e2afd1a6445b4a65e0114ebb1769a72288f03130a1e559d0d88 SHA256 checksum (ms-defender-advanced-hunting_011.tgz) 76a9b908232e4d81157b6cce9d143ff2da2c1e4ee5de0f9e352117240e9682c6 SHA256 checksum (ms-defender-advanced-hunting_009.tgz) 811edb6d1ad102d3360270e2427753eba295c30380f12d8288e74ef43fba5f60 SHA256 checksum (ms-defender-advanced-hunting_008.tgz) 6ca26c77a5f68a5dc39180196ddd17bf4f9a3f80f7ada93f29356324efa04765 SHA256 checksum (ms-defender-advanced-hunting_007.tgz) dd4029ed50828840e618660eb840e047db00ff721f901fef82feb2f6c6c2af13 SHA256 checksum (ms-defender-advanced-hunting_006.tgz) b576ebd05b8fd5b0d88974b99bf385e36377181b72b5d06ba4e0b4d9f5ca784f
To install your download
For instructions specific to your download, click the Details tab after closing this window.

Flag As Inappropriate

splunk

MS Defender Advanced Hunting

Splunk Cloud
Overview
Details
This App can query MS Defender Advanced Hunting with their format.

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

Technical Add-on MS Defender Advanced Hunting

When updating from v0.1.x to v0.2.x, please re-setup the credentials

1. Overview

This App can use Advanced Hunting with their query format (KQL) through Microsoft Defender for Endpoint API.

Microsoft offers three APIs for Microsoft Defender Endpoint to use Advanced Hunting.

  • Microsoft Defender for Endpoint
  • Microsoft Defender XDR
  • Microsoft Graph REST API

This app can automatically recognize which API endpoint you choose, and query it.
If two or three are used in a single app, this app will give priority to "Microsoft Defender for Endpoint".

Please refer this for more detail about the endpoint.

2. Installation

  1. Create an App on Microsoft Entra ID according to one of the following. I recommend to choose "Microsoft Graph REST API".
  2. Keep a note your Directory (Tenant) ID, Application (Client) ID and Client Secret of your Azure App.
  3. Go to Splunk Configuration page.
    • App -> Configuration -> Account Settings
  4. Set a unique credential name, Directory (Tenant) ID, Application (Client) ID and Client Secret you got previous step.

2.1 Account Settings

  • Description of the Account Settings page
Label Description
Account name Required. Set unique name for this credential.
Client ID Required. Set Application (Client) ID.
Client Secret Required. Set Client Secret.
Tenant ID Required. Set Directory (Tenant) ID.
Default Credential Optional. If checked, this app use this credentail as default.
Request read timeout (in seconds) Optional. This means the read timeout for API request. Default value is 60s.
Request connection timeout (in seconds) Optional. This means the connection timeout for API request. Default value is 10s.
Request retry num Optional. This means the number of retry for API request when API returns server error. Default value is 0.

3. Usage

Command Type Description
advhunt Generating Command Fetch data using Advanced Hunting query

3.1 advhunt command

  • Returns a list of query results that you set your Advanced Hunting query.
Options Description
query Required. Set your Advanced Hunting Query
renew Optional. If it set as "True", this app will force to update an access token.
cred Optional. Set the unique credential name you want to use.
- Not set: use the default credential which is checked in setup page.
- Single value: use the specified value. e.g. cred="cred1"
- Multi value: use the specified comma separated value. e.g. cred="cred1,cred2"
- set all: use all credentials. e.g. cred="all"
  • 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
    • Force to renew the access token.
| advhunt renew=True query="AlertInfo 
  | where 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 * "
  • Example 4
    • Query to multiple tenants.
    • If you have multi tenants and want to query againt them, you can use this option.
      • Please set each credentail in setup page and use the name in cred="<here>"
| advhunt cred="tenant1_cred,tenant2_cred" query="AlertInfo"
  • Example 5
    • use subserach pattern.
| advhunt [| makeresults 
  | eval query = "DeviceFileEvents
    | where Timestamp > ago(1d)
    | limit 1"
  | return query ]
| spath

4. Note

Required privileges

  • To use this app, users need following privileges.
    • list_storage_passwords
    • admin_all_objects
  • If you don't want to grant the user "admin_all_objects", there are three workarounds:
    1. Update local.meta and grant the user "edit_storage_passwords".
      • Contents to add to local.meta
        [passwords] access = read : [*], write : [*]
    2. Create a report to update an access token for Microsoft Endpoint in passwords.conf by the user who has "admin_all_objects" every 30 minutes. This allows normal users to simply use the current valid access token in passwords.conf and it's enough for the normal user to grant only list_storage_passwords.
    3. Just stop to grant the user "admin_all_objects" and do nothing. In this case, this app try to communicate with Microsoft for getting new access token in every advhunt command. This makes the command run slower.

Differences between each Endpoint

  • If you choose "Microsoft Defender for Endpoint", you can't query againt some schema.
    • ex. AlertInfo, AlertEvidence

Restriction of Microsoft Endpoint

5. Debug

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

6. Relase History

v0.2.1

  • Add retry and timeout settings for API request

v0.2

  • Change setting GUI, password and config architecture. This change affected existing config file.
  • Add Graph API capability
  • fix bug

v0.1.2-0.1.3

  • Update splunk sdk

v0.1.1

  • Fix for the cloud compatibility check

v0.1.0

  • This is a miner version up.
  • Fix to be able to query for multiple tenants using cred option.
  • Caution: This version does not have backward compatibility. Please set your credential again.

Release Notes

Version 0.2.4
April 18, 2025
  • Fixed a bug ( retry didn't work in POST request)
Version 0.2.3
March 25, 2025

When updating from v0.1.x to v0.2, please re-setup the credentials

  • Migrated from AOB to UCC
  • Refactored
  • Fixed libraries
  • Fixed bugs (NoneType of storage_passwords and session token expired error in getting log level)
Version 0.2.1
March 9, 2025

When updating from v0.1.x to v0.2, please re-setup the credentials

  • Add retry and timeout settings for API
Version 0.2.0
Feb. 27, 2025
  • Please re-setup your credentials
  • Change setting GUI, password and config architecture. This change affected existing config file.
  • Add Graph API capability
Version 0.1.3
Dec. 15, 2024

Update Splunk SDK

Version 0.1.1
April 18, 2025

Fix for the cloud compatibility check

Version 0.0.9
Sept. 14, 2022
  • Fix error for Splunk Cloud
    • Add python version to commands.conf
    • Change logging format.
Version 0.0.8
Sept. 10, 2022

Delete a comment for Splunk Cloud environment, which cause an error.

Version 0.0.7
Aug. 16, 2022

Fix timestamp format error.

Version 0.0.6
July 4, 2022

Changed to automatically recognize plans.


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 LLC in the United States and other countries. All other brand names,product names,or trademarks belong to their respective owners.