7.3 KiB
title, description, keywords, ms.assetid, ms.prod, ms.mktglfcycl, ms.sitesec, ms.pagetype, ms.localizationpriority, audience, author, ms.reviewer, ms.author, manager, ms.topic, ms.date, ms.technology
title | description | keywords | ms.assetid | ms.prod | ms.mktglfcycl | ms.sitesec | ms.pagetype | ms.localizationpriority | audience | author | ms.reviewer | ms.author | manager | ms.topic | ms.date | ms.technology |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows Defender Application Control Wizard WDAC Event Parsing | Creating WDAC policy rules from the WDAC event logs and the MDE Advanced Hunting WDAC events. | WDAC event parsing, allow listing, block listing, security, malware | 8d6e0474-c475-411b-b095-1c61adb2bdbb | windows-client | deploy | library | security | medium | ITPro | jgeurten | jsuther1974 | vinpa | aaroncz | conceptual | 02/01/2023 | itpro-security |
Creating WDAC Policy Rules from WDAC Events in the Wizard
Applies to
- Windows 10
- Windows 11
- Windows Server 2016 and above
Note
Some capabilities of Windows Defender Application Control are only available on specific Windows versions. Learn more about the Windows Defender Application Control feature availability.
As of version 2.2.0.0, the WDAC Wizard supports creating WDAC policy rules from the following event log types:
- WDAC event log events on the system
- Exported WDAC events (EVTX files) from any system
- Exported WDAC events from MDE Advanced Hunting
WDAC Event Viewer Log Parsing
To create rules from the WDAC event logs on the system:
-
Select Policy Editor from the WDAC Wizard main page.
-
Select Convert Event Log to a WDAC Policy.
-
Select the Parse Event Logs button under the Parse Event Logs from the System Event Viewer to Policy header.
The Wizard will parse the relevant audit and block events from the CodeIntegrity (WDAC) Operational and AppLocker MSI and Script logs. You'll see a notification when the Wizard successfully finishes reading the events.
-
Select the Next button to view the audit and block events and create rules.
WDAC Event Log File Parsing
To create rules from the WDAC .EVTX
event logs files on the system:
-
Select Policy Editor from the WDAC Wizard main page.
-
Select Convert Event Log to a WDAC Policy.
-
Select the Parse Log File(s) button under the Parse Event Log evtx Files to Policy header.
-
Select the WDAC CodeIntegrity Event log EVTX file(s) from the disk to parse.
The Wizard will parse the relevant audit and block events from the selected log files. You'll see a notification when the Wizard successfully finishes reading the events.
-
Select the Next button to view the audit and block events and create rules.
MDE Advanced Hunting WDAC Event Parsing
To create rules from the WDAC events in MDE Advanced Hunting:
-
Navigate to the Advanced Hunting section within the MDE console and query the WDAC events. The Wizard requires the following fields in the Advanced Hunting csv file export:
| project Timestamp, DeviceId, DeviceName, ActionType, FileName, FolderPath, SHA1, SHA256, IssuerName, IssuerTBSHash, PublisherName, PublisherTBSHash, AuthenticodeHash, PolicyId, PolicyName
The following Advanced Hunting query is recommended:
DeviceEvents // Take only WDAC events | where ActionType startswith 'AppControlCodeIntegrity' // SigningInfo Fields | extend IssuerName = parsejson(AdditionalFields).IssuerName | extend IssuerTBSHash = parsejson(AdditionalFields).IssuerTBSHash | extend PublisherName = parsejson(AdditionalFields).PublisherName | extend PublisherTBSHash = parsejson(AdditionalFields).PublisherTBSHash // Audit/Block Fields | extend AuthenticodeHash = parsejson(AdditionalFields).AuthenticodeHash | extend PolicyId = parsejson(AdditionalFields).PolicyID | extend PolicyName = parsejson(AdditionalFields).PolicyName // Keep only required fields for the WDAC Wizard | project Timestamp,DeviceId,DeviceName,ActionType,FileName,FolderPath,SHA1,SHA256,IssuerName,IssuerTBSHash,PublisherName,PublisherTBSHash,AuthenticodeHash,PolicyId,PolicyName
-
Export the WDAC event results by selecting the Export button in the results view.
-
Select Policy Editor from the WDAC Wizard main page.
-
Select Convert Event Log to a WDAC Policy.
-
Select the Parse Log File(s) button under the "Parse MDE Advanced Hunting Events to Policy" header.
-
Select the WDAC MDE Advanced Hunting export CSV files from the disk to parse.
The Wizard will parse the relevant audit and block events from the selected Advanced Hunting log files. You'll see a notification when the Wizard successfully finishes reading the events.
-
Select the Next button to view the audit and block events and create rules.
Creating Policy Rules from the Events
On the "Configure Event Log Rules" page, the unique WDAC log events will be shown in the table. Event Ids, filenames, product names, the policy name that audited or blocked the file, and the file publisher are all shown in the table. The table can be sorted alphabetically by clicking on any of the headers.
To create a rule and add it to the WDAC policy:
-
Select an audit or block event in the table by selecting the row of interest.
-
Select a rule type from the dropdown. The Wizard supports creating Publisher, Path, File Attribute, Packaged App and Hash rules.
-
Select the attributes and fields that should be added to the policy rules using the checkboxes provided for the rule type.
-
Select the Add Allow Rule button to add the configured rule to the policy generated by the Wizard. The "Added to policy" label will be added to the selected row confirming that the rule will be generated.
-
Select the Next button to output the policy. Once generated, the event log policy should be merged with your base or supplemental policies.
Warning
It is not recommended to deploy the event log policy on its own, as it likely lacks rules to authorize Windows and may cause blue screens.