共用方式為


使用進階搜捕集中查詢應用程控事件

Windows Defender 應用程控 (WDAC) 原則會以強制或稽核模式在 Windows 事件檢視器 本機記錄事件。 雖然 事件檢視器 有助於查看對單一系統的影響,但 IT 專業人員想要跨許多系統進行量測。

在 2018 年 11 月,我們在 適用於端點的 Microsoft Defender 中新增了功能,可讓您輕鬆地從所有連線系統集中檢視 WDAC 事件。

適用於端點的 Microsoft Defender 中的進階搜捕可讓客戶使用一組豐富的功能來查詢數據。 您可以使用開頭為 「AppControl」 的 ActionType 來查詢 WDAC 事件。 從 Windows 1607 版開始支援這項功能。

動作類型

ActionType 名稱 ETW 來源事件標識碼 描述
AppControlCodeIntegrityDriverRevoked 3023 正在驗證的驅動程式檔案不符合通過應用程控原則的需求。
AppControlCodeIntegrityImageRevoked 3036 經過驗證的已簽署檔案是由 Microsoft 或證書頒發機構單位撤銷的程式代碼簽署憑證所簽署。
AppControlCodeIntegrityPolicyAudited 3076 此事件是稽核模式原則的主要 Windows Defender 應用程控區塊事件。 指出如果強制執行 WDAC 原則,檔案會遭到封鎖。
AppControlCodeIntegrityPolicyBlocked 3077 此事件是強制執行原則的主要 Windows Defender 應用程控區塊事件。 這表示檔案未通過您的 WDAC 原則,且遭到封鎖。
AppControlExecutableAudited 8003 只有在啟用僅稽核強制模式時才套用。 指定啟用強制執行規則模式時,會封鎖 .exe 或 .dll 檔案。
AppControlExecutableBlocked 8004 無法執行 .exe 或 .dll 檔案。
AppControlPackagedAppAudited 8021 只有在啟用僅稽核強制模式時才套用。 指定如果啟用強制執行規則強制模式,將會封鎖已封裝的應用程式。
AppControlPackagedAppBlocked 8022 已封裝的應用程式遭到原則封鎖。
AppControlScriptAudited 8006 只有在啟用僅稽核強制模式時才套用。 指定如果已啟用強制執行規則模式,將會封鎖腳本或 .msi 檔案。
AppControlScriptBlocked 8007 系統管理員會限制對檔名的存取。 只有在透過 群組原則 繼承直接或間接設定強制執行規則模式時才套用。 無法執行文稿或 .msi 檔。
AppControlCIScriptAudited 8028 由腳本主機本身呼叫的 Windows 鎖定原則 (WLDP) 所產生的稽核腳本/MSI 檔案。
AppControlCIScriptBlocked 8029 封鎖由腳本主機本身呼叫的 Windows 鎖定原則 (WLDP) 所產生的腳本/MSI 檔案。
AppControlCodeIntegrityOriginAllowed 3090 因為ISG) 或安裝來源 (受管理的安裝程式) (良好的信譽,所以允許檔案。
AppControlCodeIntegrityOriginAudited 3091 ISG) 和安裝來源的信譽 ( (受控安裝程式) 稽核檔案的資訊。
AppControlCodeIntegrityOriginBlocked 3092 ISG () 和安裝來源 (受管理的安裝程式) 封鎖檔案的資訊。
AppControlCodeIntegrityPolicyLoaded 3099 表示已成功載入原則。
AppControlCodeIntegritySigningInformation 3089 簽署資訊事件與 3076 或 3077 事件相互關聯。 系統會針對檔案的每個簽章產生一個 3089 事件。
AppControlPolicyApplied 8001 指出 AppLocker 原則已成功套用至電腦。

深入瞭解 Windows) (應用程控事件識別碼

範例進階搜捕應用程控查詢

查詢範例 1:查詢依類型摘要過去七天的應用程控動作類型

以下是簡單的範例查詢,其中顯示過去七天內從受 適用於端點的 Microsoft Defender 監視的計算機產生的所有 Windows Defender 應用程控事件:

DeviceEvents
| where Timestamp > ago(7d) and
ActionType startswith "AppControl"
| summarize Machines=dcount(DeviceName) by ActionType
| order by Machines desc

查詢結果可用於與管理應用程控 Windows Defender 相關的數個重要函式,包括:

  • 評估在稽核模式中部署原則的影響,因為應用程式仍以稽核模式執行,這是查看原則中所含規則影響和正確性的理想方式。 將產生的事件與進階搜捕整合,可讓您更輕鬆地廣泛部署稽核模式原則,並查看包含的規則如何影響實際使用方式中的系統。 此稽核模式數據可協助簡化在強制執行模式中使用原則的轉換。
  • 在強制執行模式中部署原則的監視區塊,可能會封鎖無法符合任何包含之允許規則的可執行檔或腳本。 可能會封鎖合法的新應用程式和更新,或潛在的垃圾或惡意軟體。 不論是哪一種情況,進階搜捕查詢都會報告區塊以供進一步調查。

查詢範例 #2:用來判斷過去七天內稽核區塊的查詢

DeviceEvents 
| where ActionType startswith "AppControlExecutableAudited"
| where Timestamp > ago(7d)
|project DeviceId,                               // the device ID where the audit block happened
FileName,                                        // The audit blocked app's filename
FolderPath,                                      // The audit blocked app's system path without the FileName
InitiatingProcessFileName,                       // The file name of the parent process loading the executable
InitiatingProcessVersionInfoCompanyName,         // The company name of the parent process loading the executable
InitiatingProcessVersionInfoOriginalFileName,    // The original file name of the parent process loading the executable
InitiatingProcessVersionInfoProductName,         // The product name of the parent process loading the executable
InitiatingProcessSHA256,                         // The SHA256 flat hash of the parent process loading the executable
Timestamp,                                       // The event creation timestamp
ReportId,                                        // The report ID - randomly generated by MDE AH
InitiatingProcessVersionInfoProductVersion,      // The product version of the parent process loading the executable
InitiatingProcessVersionInfoFileDescription,     // The file description of the parent process loading the executable
AdditionalFields                                 // Additional fields contains FQBN for signed binaries.  These contain the CN of the leaf certificate, product name, original filename and version of the audited binary