← Back to Explore
splunk_escuHunting
Windows AppLocker Execution from Uncommon Locations
The following analytic identifies the execution of applications or scripts from uncommon or suspicious file paths, potentially indicating malware or unauthorized activity. It leverages Windows AppLocker event logs and uses statistical analysis to detect anomalies. By calculating the average and standard deviation of execution counts per file path, it flags paths with execution counts significantly higher than expected. This behavior is significant as it can uncover malicious activities or policy violations. If confirmed malicious, this activity could allow attackers to execute unauthorized code, leading to potential system compromise or data breaches.
MITRE ATT&CK
Detection Query
`applocker`
| spath input=UserData_Xml
| rename RuleAndFileData.* as *, Computer as dest, TargetUser AS user
| stats count min(_time) as firstTime max(_time) as lastTime
BY dest, PolicyName, RuleId,
user, TargetProcessId, FilePath,
FullFilePath
| eventstats avg(count) as avg, stdev(count) as stdev
| eval upperBound=(avg+stdev*2), anomaly=if(count > upperBound, "Yes", "No")
| where anomaly="Yes"
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `windows_applocker_execution_from_uncommon_locations_filter`Author
Michael Haag, Splunk
Created
2026-02-25
References
- https://learn.microsoft.com/en-us/windows/security/application-security/application-control/windows-defender-application-control/operations/querying-application-control-events-centrally-using-advanced-hunting
- https://learn.microsoft.com/en-us/windows/security/application-security/application-control/windows-defender-application-control/applocker/using-event-viewer-with-applocker
Tags
Windows AppLocker
Raw Content
name: Windows AppLocker Execution from Uncommon Locations
id: d57ce957-151a-4aec-ada5-5fb1eb555b6b
version: 6
date: '2026-02-25'
author: Michael Haag, Splunk
data_source: []
type: Hunting
status: production
description: The following analytic identifies the execution of applications or scripts from uncommon or suspicious file paths, potentially indicating malware or unauthorized activity. It leverages Windows AppLocker event logs and uses statistical analysis to detect anomalies. By calculating the average and standard deviation of execution counts per file path, it flags paths with execution counts significantly higher than expected. This behavior is significant as it can uncover malicious activities or policy violations. If confirmed malicious, this activity could allow attackers to execute unauthorized code, leading to potential system compromise or data breaches.
search: |-
`applocker`
| spath input=UserData_Xml
| rename RuleAndFileData.* as *, Computer as dest, TargetUser AS user
| stats count min(_time) as firstTime max(_time) as lastTime
BY dest, PolicyName, RuleId,
user, TargetProcessId, FilePath,
FullFilePath
| eventstats avg(count) as avg, stdev(count) as stdev
| eval upperBound=(avg+stdev*2), anomaly=if(count > upperBound, "Yes", "No")
| where anomaly="Yes"
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `windows_applocker_execution_from_uncommon_locations_filter`
how_to_implement: The analytic is designed to be run against Windows AppLocker event logs collected from endpoints with AppLocker enabled. If using Microsoft Defender for Endpoint (MDE), modify the analytic to use EventTypes/ActionTypes that match the block events for AppLocker. The analytic requires the AppLocker event logs to be ingested into Splunk. Note that, an additional method to reduce any false positives would be to add the specific EventCodes - 8003 or 8004 and filter from there. Upon tuning, modify to Anomaly or TTP.
known_false_positives: False positives are possible if legitimate users are executing applications from file paths that are not permitted by AppLocker. It is recommended to investigate the context of the application execution to determine if it is malicious or not. Modify the threshold as needed to reduce false positives.
references:
- https://learn.microsoft.com/en-us/windows/security/application-security/application-control/windows-defender-application-control/operations/querying-application-control-events-centrally-using-advanced-hunting
- https://learn.microsoft.com/en-us/windows/security/application-security/application-control/windows-defender-application-control/applocker/using-event-viewer-with-applocker
tags:
analytic_story:
- Windows AppLocker
asset_type: Endpoint
mitre_attack_id:
- T1218
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
security_domain: endpoint
cve: []
tests:
- name: True Positive Test
attack_data:
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562/applocker/applocker.log
sourcetype: XmlWinEventLog
source: XmlWinEventLog:Microsoft-Windows-AppLocker/MSI and Script