Detection rules › Splunk
Windows AppLocker Block Events
The following analytic detects attempts to bypass application restrictions by identifying Windows AppLocker policy violations. It leverages Windows AppLocker event logs, specifically EventCodes 8007, 8004, 8022, 8025, 8029, and 8040, to pinpoint blocked actions. This activity is significant for a SOC as it highlights potential unauthorized application executions, which could indicate malicious intent or policy circumvention. If confirmed malicious, this activity could allow an attacker to execute unauthorized applications, potentially leading to further system compromise or data exfiltration.
Known false positives
- Administrators may legitimately use AppLocker to allow applications.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Telemetry coverage
Rule body
name: Windows AppLocker Block Events
id: e369afe8-cd35-47a3-9c1e-d813efc1f7dd
version: 10
creation_date: '2024-04-17'
modification_date: '2026-05-13'
author: Michael Haag, Splunk
status: production
type: Anomaly
description: The following analytic detects attempts to bypass application restrictions by identifying Windows AppLocker policy violations. It leverages Windows AppLocker event logs, specifically EventCodes 8007, 8004, 8022, 8025, 8029, and 8040, to pinpoint blocked actions. This activity is significant for a SOC as it highlights potential unauthorized application executions, which could indicate malicious intent or policy circumvention. If confirmed malicious, this activity could allow an attacker to execute unauthorized applications, potentially leading to further system compromise or data exfiltration.
data_source: []
search: |-
`applocker` EventCode IN (8007, 8004, 8022, 8025, 8029, 8040)
| spath input=UserData_Xml
| rename RuleAndFileData.* as *, TargetUser as user, Computer as dest
| stats count min(_time) as firstTime max(_time) as lastTime
BY dest, PolicyName, RuleId,
user, TargetProcessId, FilePath,
FullFilePath, EventCode
| lookup applockereventcodes EventCode OUTPUT Description
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `windows_applocker_block_events_filter`
how_to_implement: To implement this analytic, you must be ingesting Windows AppLocker logs into Splunk. Ensure proper logging is setup for AppLocker and data is being ingested into Splunk.
known_false_positives: Administrators may legitimately use AppLocker to allow applications.
references:
- https://attack.mitre.org/techniques/T1218
- https://learn.microsoft.com/en-us/windows/security/application-security/application-control/windows-defender-application-control/applocker/using-event-viewer-with-applocker
- 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
intermediate_findings:
entities:
- field: dest
type: system
score: 20
message: An instance of AppLocker policy violation has been detected on $dest$.
analytic_story:
- Windows AppLocker
asset_type: Endpoint
mitre_attack_id:
- T1218
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
Stages and Predicates
Stage 1: search
`applocker` EventCode IN (8007, 8004, 8022, 8025, 8029, 8040)
Stage 2: spath
| spath input=UserData_Xml
Stage 3: rename
| rename RuleAndFileData.* as *, TargetUser as user, Computer as dest
Stage 4: stats
| stats count min(_time) as firstTime max(_time) as lastTime
BY dest, PolicyName, RuleId,
user, TargetProcessId, FilePath,
FullFilePath, EventCode
Stage 5: lookup
| lookup applockereventcodes EventCode OUTPUT Description
Stage 6: search
| `security_content_ctime(firstTime)`
Stage 7: search
| `security_content_ctime(lastTime)`
Stage 8: search
| `windows_applocker_block_events_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | in |
| field:"EventID" kind:in |