Event ID 8004: EXE or DLL was prevented from running (block)
Written when AppLocker in enforcement mode blocks an executable or DLL. The file did not run.
- Channel
- Microsoft-Windows-AppLocker/EXE and DLL
- Logged by default
- No
- Written on
- Any host
- Volume
- Moderate
- Provider
- Microsoft-Windows-AppLocker
- Needs a SACL
- No
To have this event
- An AppLocker policy with EXE/DLL rules in enforce mode and the AppIDSvc service running
Key fields
Exact XML field names, as they appear in <Data Name="…"> and in SIEM field extractions.
| Field | What it tells you |
|---|---|
| FilePath | Full path of the blocked executable or DLL |
| FileHash | Hash of the blocked file |
| Fqbn | Fully qualified binary name; '-' for unsigned files |
| TargetUser | SID of the user whose run attempt was blocked |
Analyst notes
- 018004 is an enforced block and evidence an attacker tried to run untrusted code on this host; the FilePath shows where tooling was staged.
- 02Repeated 8004 for the same hash across hosts indicates a tool being pushed broadly; pivot on FileHash.
Pull this event
Retrieval queries for a live host, a collected .evtx file and common SIEMs. Filter further on the key fields above.
Get-WinEvent -LogName 'Microsoft-Windows-AppLocker/EXE and DLL' -FilterXPath "*[System[(EventID=8004)]]" -MaxEvents 50 |
Select-Object TimeCreated, Id, MachineName, Message-FilterXPath supports exact matches only. For substring matching, filter in Where-Object.
ATT&CK mapping
Techniques this event can help detect. Most of these depend on specific field values; the event alone does not mean the technique happened.
Also relevant, depending on field values
Related events
Common questions
- What does Windows event ID 8004 mean?
- Written when AppLocker in enforcement mode blocks an executable or DLL. The file did not run. It is written to the AppLocker log (Microsoft-Windows-AppLocker/EXE and DLL).
- Is event 8004 logged by default?
- No. It must be enabled before it is recorded.
- Where is event 8004 recorded?
- In the Microsoft-Windows-AppLocker/EXE and DLL channel on the any host.
Decode a real event
Paste the XML and every value gets explained. Nothing leaves your browser.
Open decoderWritten when AppLocker in enforcement mode blocks an executable or DLL. The file did not run. Key fields, logging requirements, ATT&CK mapping and ready-to-run queries.