├── SigmaTopLogSources.png
├── TopSecurityEventIDs.png
├── YamatoSecurityLogo.png
├── WindowsEventsWithSigmaRules.png
├── .gitignore
├── YamatoSecurityConfigureWinEventLogs.bat
├── README-Japanese.md
├── README.md
├── LICENSE
├── ConfiguringSecurityLogAuditPolicies-Japanese.md
└── ConfiguringSecurityLogAuditPolicies.md
/SigmaTopLogSources.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Yamato-Security/EnableWindowsLogSettings/HEAD/SigmaTopLogSources.png
--------------------------------------------------------------------------------
/TopSecurityEventIDs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Yamato-Security/EnableWindowsLogSettings/HEAD/TopSecurityEventIDs.png
--------------------------------------------------------------------------------
/YamatoSecurityLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Yamato-Security/EnableWindowsLogSettings/HEAD/YamatoSecurityLogo.png
--------------------------------------------------------------------------------
/WindowsEventsWithSigmaRules.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Yamato-Security/EnableWindowsLogSettings/HEAD/WindowsEventsWithSigmaRules.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | /samples
3 | *.test
4 | /.vscode/
5 | .DS_Store
6 | test_*
7 | .env
8 | /logs
9 | *.csv
10 | *.json
11 | *.jsonl
12 | hayabusa*
13 | *.html
14 | *.htm
15 | *.css
--------------------------------------------------------------------------------
/YamatoSecurityConfigureWinEventLogs.bat:
--------------------------------------------------------------------------------
1 | :: Yamato Security's Configure Windows Event Logs Batch File
2 | :: Author: Zach Mathis (@yamatosecurity), Sachiel Archangel
3 | :: This script is based off the work of Sachiel Archangel's WinEventEnable.bat
4 | :: https://github.com/Sachiel-archangel/WinEventEnable/blob/main/WinEventEnable.bat
5 | ::
6 | :: Warning: Use this batch script as a template and understand what you are enabling!
7 | :: You will need to customize this file to fit your environment.
8 | :: Make sure you test this out thoroughly beforing using in production!!
9 | ::
10 | :: You need to run this with local Administrator or SYSTEM privileges.
11 |
12 | :: Increase or decrease the log sizes as you see fit (in bytes of 64kb blocks):
13 | :: 2 GB: 2147483648
14 | :: 1 GB: 1073741824
15 | :: 512 MB: 536870912
16 | :: 256 MB: 268435456
17 | :: 128 MB: 134217728
18 |
19 | :: Set Security and PowerShell-related logs' maximum file size to 1 GB
20 | :: Note: you should also increase the max. size of the Sysmon log to 1 GB if you use Sysmon.
21 | wevtutil sl Security /ms:1073741824
22 | wevtutil sl Microsoft-Windows-PowerShell/Operational /ms:1073741824
23 | wevtutil sl "Windows PowerShell" /ms:1073741824
24 | wevtutil sl PowerShellCore/Operational /ms:1073741824
25 | ::wevtutil sl Microsoft-Windows-Sysmon/Operational /ms:1073741824
26 |
27 | :: Set all other important logs to 128 MB. Increase or decrease to fit your environment.
28 | wevtutil sl System /ms:134217728
29 | wevtutil sl Application /ms:134217728
30 | wevtutil sl "Microsoft-Windows-Windows Defender/Operational" /ms:134217728
31 | wevtutil sl "Microsoft-Windows-Bits-Client/Operational" /ms:134217728
32 | wevtutil sl "Microsoft-Windows-Windows Firewall With Advanced Security/Firewall" /ms:134217728
33 | wevtutil sl "Microsoft-Windows-NTLM/Operational" /ms:134217728
34 | wevtutil sl "Microsoft-Windows-Security-Mitigations/KernelMode" /ms:134217728
35 | wevtutil sl "Microsoft-Windows-Security-Mitigations/UserMode" /ms:134217728
36 | wevtutil sl "Microsoft-Windows-PrintService/Admin" /ms:134217728
37 | wevtutil sl "Microsoft-Windows-Security-Mitigations/UserMode" /ms:134217728
38 | wevtutil sl "Microsoft-Windows-PrintService/Operational" /ms:134217728
39 | wevtutil sl "Microsoft-Windows-SmbClient/Security" /ms:134217728
40 | wevtutil sl "Microsoft-Windows-AppLocker/MSI and Script" /ms:134217728
41 | wevtutil sl "Microsoft-Windows-AppLocker/EXE and DLL" /ms:134217728
42 | wevtutil sl "Microsoft-Windows-AppLocker/Packaged app-Deployment" /ms:134217728
43 | wevtutil sl "Microsoft-Windows-AppLocker/Packaged app-Execution" /ms:134217728
44 | wevtutil sl "Microsoft-Windows-CodeIntegrity/Operational" /ms:134217728
45 | wevtutil sl "Microsoft-Windows-Diagnosis-Scripted/Operational" /ms:134217728
46 | wevtutil sl "Microsoft-Windows-DriverFrameworks-UserMode/Operational" /ms:134217728
47 | wevtutil sl "Microsoft-Windows-WMI-Activity/Operational" /ms:134217728
48 | wevtutil sl "Microsoft-Windows-TerminalServices-LocalSessionManager/Operational" /ms:134217728
49 | wevtutil sl "Microsoft-Windows-TaskScheduler/Operational" /ms:134217728
50 |
51 | :: Enable any logs that need to be enabled
52 | wevtutil sl Microsoft-Windows-TaskScheduler/Operational /e:true
53 | wevtutil sl Microsoft-Windows-DriverFrameworks-UserMode/Operational /e:true
54 |
55 | :: Enable PowerShell Module logging
56 | reg add HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ModuleLogging /v EnableModuleLogging /f /t REG_DWORD /d 1
57 | reg add HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ModuleLogging\ModuleNames /f /v ^* /t REG_SZ /d ^*
58 |
59 | :: Enable PowerShell Script Block logging
60 | reg add HKLM\SOFTWARE\WOW6432Node\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging /v EnableScriptBlockLogging /f /t REG_DWORD /d 1
61 |
62 | ::
63 | :: Configure Security log
64 | :: Note: subcategory IDs are used instead of the names in order to work in any OS language.
65 |
66 | :: Account Logon
67 | :::: Credential Validation
68 | auditpol /set /subcategory:{0CCE923F-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
69 | :::: Kerberos Authentication Service (disable for clients)
70 | auditpol /set /subcategory:{0CCE9242-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
71 | :::: Kerberos Service Ticket Operations (disable for clients)
72 | auditpol /set /subcategory:{0CCE9240-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
73 |
74 | :: Account Management
75 | :::: Computer Account Management
76 | auditpol /set /subcategory:{0CCE9236-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
77 | :::: Other Account Management Events
78 | auditpol /set /subcategory:{0CCE923A-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
79 | :::: Security Group Management
80 | auditpol /set /subcategory:{0CCE9237-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
81 | :::: User Account Management
82 | auditpol /set /subcategory:{0CCE9235-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
83 |
84 | :: Detailed Tracking
85 | :::: Plug and Play
86 | auditpol /set /subcategory:{0cce9248-69ae-11d9-bed3-505054503030} /success:enable /failure:enable
87 | :::: Process Creation
88 | auditpol /set /subcategory:{0CCE922B-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
89 | :::: Enable command line auditing (Detailed Tracking)
90 | reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit /v ProcessCreationIncludeCmdLine_Enabled /f /t REG_DWORD /d 1
91 | :::: Process Termination (default: disabled)
92 | :: auditpol /set /subcategory:{0CCE922C-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
93 | :::: RPC Events
94 | auditpol /set /subcategory:{0CCE922E-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
95 | :::: Audit Token Right Adjustments (default: disabled)
96 | :: auditpol /set /subcategory:{0CCE924A-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
97 |
98 | :: DS Access
99 | :::: Directory Service Access (disable for clients)
100 | auditpol /set /subcategory:{0CCE923B-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
101 | :::: Directory Service Changes (disable for clients)
102 | auditpol /set /subcategory:{0CCE923C-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
103 |
104 | :: Logon/Logoff
105 | :::: Account Lockout
106 | auditpol /set /subcategory:{0CCE9217-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
107 | :::: Group Membership (disabled due to noise)
108 | :: auditpol /set /subcategory:{0CCE9249-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
109 | :::: Logoff
110 | auditpol /set /subcategory:{0CCE9216-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
111 | :::: Logon
112 | auditpol /set /subcategory:{0CCE9215-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
113 | :::: Network Policy Server (currently disabled while testing)
114 | :: auditpol /set /subcategory:{0CCE9243-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
115 | :::: Other Logon/Logoff Events
116 | auditpol /set /subcategory:{0CCE921C-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
117 | :::: Special Logon
118 | auditpol /set /subcategory:{0CCE921B-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
119 |
120 | :: Object Access
121 | :::: Application Generated (currently disabled while testing)
122 | :: auditpol /set /subcategory:{0CCE9222-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
123 | :::: Certification Services (disable for client OSes)
124 | auditpol /set /subcategory:{0CCE9221-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
125 | :::: Detailed File Share (disabled due to noise)
126 | :: auditpol /set /subcategory:{0CCE9244-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
127 | :::: File Share (disable if too noisy)
128 | auditpol /set /subcategory:{0CCE9224-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
129 | :::: File System (disabled due to noise)
130 | :: auditpol /set /subcategory:{0CCE921D-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
131 | :::: Filtering Platform Connection (disable if too noisy)
132 | auditpol /set /subcategory:{0CCE9226-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
133 | :::: Filtering Platform Packet Drop (disabled due to noise)
134 | :: auditpol /set /subcategory:{0CCE9225-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
135 | :::: Kernel Object (disabled due to noise)
136 | :: auditpol /set /subcategory:{0CCE921F-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
137 | :::: Other Object Access Events
138 | auditpol /set /subcategory:{0CCE9227-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
139 | :::: Registry (currently disabled due to noise)
140 | :: auditpol /set /subcategory:{0CCE921E-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
141 | :::: Removable Storage
142 | auditpol /set /subcategory:{0CCE9245-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
143 | :::: SAM
144 | auditpol /set /subcategory:{0CCE9220-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
145 |
146 | :: Policy Change
147 | :::: Audit Policy Change
148 | auditpol /set /subcategory:{0CCE922F-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
149 | :::: Authentication Policy Change
150 | auditpol /set /subcategory:{0CCE9230-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
151 | :::: Authorization Policy Change (currently disabled while testing)
152 | :: auditpol /set /subcategory:{0CCE9231-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
153 | :::: Filtering Platform Policy Change (currently disabled while testing)
154 | :: auditpol /set /subcategory:{0CCE9233-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
155 | :::: MPSSVC Rule-Level Policy Change (currently disabled while testing)
156 | :: auditpol /set /subcategory:{0CCE9232-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
157 | :::: Other Policy Change Events
158 | auditpol /set /subcategory:{0CCE9234-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
159 |
160 | :: Privilege Use
161 | :::: Sensitive Privilege Use (disable if too noisy)
162 | auditpol /set /subcategory:{0CCE9228-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
163 |
164 | :: System
165 | :::: Other System Events (needs testing)
166 | auditpol /set /subcategory:{0CCE9214-69AE-11D9-BED3-505054503030} /success:disable /failure:enable
167 | :::: Security State Change
168 | auditpol /set /subcategory:{0CCE9210-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
169 | :::: Security System Extension
170 | auditpol /set /subcategory:{0CCE9211-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
171 | :::: System Integrity
172 | auditpol /set /subcategory:{0CCE9212-69AE-11D9-BED3-505054503030} /success:enable /failure:enable
173 |
--------------------------------------------------------------------------------
/README-Japanese.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 大和セキュリティによる、DFIRと脅威ハンティングのためのWindowsイベントログ設定のガイド
7 |
8 | [
English] | [
日本語]
9 |
10 |
11 |
12 | Windowsのイベントログの設定と監視に関するガイドで、Sigmaルールが何かを検出するために、また正しいDFIR調査のために適切なログを有効にすることに重点を置いています。
13 |
14 | # TLDR
15 |
16 | * Windowsのデフォルトの監査設定では[sigma](https://github.com/SigmaHQ/sigma)ルールの10~20%程度しか利用できません。
17 | * Windowsのログが有効になっていても、デフォルトではログの最大サイズがたった1〜20MBなので、すぐに証拠が上書きされてしまう可能性が高いです。
18 | * Sigmaルールの約75%まで利用可能にし、必要なだけログを保持するように[YamatoSecurityConfigureWinEventLogs.bat](YamatoSecurityConfigureWinEventLogs.bat)もしくは[WELA (Windows Event Log Auditor)](https://github.com/Yamato-Security/WELA/blob/main/README-Japanese.md)の導入で適切な監査設定を行いましょう。
19 | - **注意: 必要に応じてスクリプトをカスタマイズし、本番環境で導入する前に必ずテストしてください!**
20 | * 100%のSigmaルールを利用したい方は、[sysmon](https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon)を導入する必要があります。(お勧め!)
21 |
22 | # 関連プロジェクト
23 |
24 | * [Hayabusa](https://github.com/Yamato-Security/hayabusa/blob/main/README-Japanese.md) - Sigmaベースの脅威ハンティングと、Windowsイベントログのファストフォレンジックタイムライン生成ツール。
25 | * [Hayabusa Rules](https://github.com/Yamato-Security/hayabusa-rules/blob/main/README-Japanese.md) - Hayabusaのための検知ルール。
26 | * [Hayabusa Sample EVTXs](https://github.com/Yamato-Security/hayabusa-sample-evtx) - Hayabusa/Sigma検出ルールをテストするためのサンプルevtxファイル。
27 | * [Takajo](https://github.com/Yamato-Security/takajo/blob/main/README-Japanese.md) - Hayabusa結果の解析ツール。
28 | * [WELA (Windows Event Log Auditor)](https://github.com/Yamato-Security/WELA/blob/main/README-Japanese.md) - Windowsイベントログ設定の監査ツール。
29 |
30 | ## 目次
31 |
32 | - [TLDR](#tldr)
33 | - [関連プロジェクト](#関連プロジェクト)
34 | - [目次](#目次)
35 | - [作者](#作者)
36 | - [コントリビュータ](#コントリビュータ)
37 | - [Acknowledgements](#acknowledgements)
38 | - [デフォルトの Windows ログ設定の問題](#デフォルトの-windows-ログ設定の問題)
39 | - [注意: 端末の設定変更は自己責任で!](#注意-端末の設定変更は自己責任で)
40 | - [重要な Windowsイベントログ](#重要な-windowsイベントログ)
41 | - [Sigmaのトップログソース](#sigmaのトップログソース)
42 | - [上位のSigmaログソース](#上位のsigmaログソース)
43 | - [上位のSecurityイベントID](#上位のsecurityイベントid)
44 | - [最大ファイル サイズの増加](#最大ファイル-サイズの増加)
45 | - [オプション 1: イベントビューアー(手動)](#オプション-1-イベントビューアー手動)
46 | - [オプション 2: Windowsビルトインツール](#オプション-2-windowsビルトインツール)
47 | - [オプション 3: PowerShell](#オプション-3-powershell)
48 | - [オプション 4: グループポリシー](#オプション-4-グループポリシー)
49 | - [ログ設定を改善するスクリプト](#ログ設定を改善するスクリプト)
50 | - [ログ設定の改善](#ログ設定の改善)
51 | - [Sysmonログ (Sigmaルール1382件)](#sysmonログ-sigmaルール1382件)
52 | - [Securityログ (Sigmaルール 1045件(process creationルール903件 + その他ルール142件))](#securityログ-sigmaルール-1045件process-creationルール903件--その他ルール142件)
53 | - [Powershellログ (Sigmaルール 175件)](#powershellログ-sigmaルール-175件)
54 | - [モジュールログ (Sigmaルール 30件)](#モジュールログ-sigmaルール-30件)
55 | - [モジュールログの有効化](#モジュールログの有効化)
56 | - [オプション 1: グループポリシーによる有効化](#オプション-1-グループポリシーによる有効化)
57 | - [オプション 2: レジストリによる有効化](#オプション-2-レジストリによる有効化)
58 | - [スクリプトブロックログ (Sigmaルール 134件)](#スクリプトブロックログ-sigmaルール-134件)
59 | - [スクリプトブロックログの有効化](#スクリプトブロックログの有効化)
60 | - [オプション 1: グループポリシーによる有効化](#オプション-1-グループポリシーによる有効化-1)
61 | - [オプション 2: レジストリによる有効化](#オプション-2-レジストリによる有効化-1)
62 | - [トランスクリプションログ](#トランスクリプションログ)
63 | - [トランスクリプションログの有効化](#トランスクリプションログの有効化)
64 | - [オプション 1: グループポリシーによる有効化](#オプション-1-グループポリシーによる有効化-2)
65 | - [オプション 2: レジストリによる有効化](#オプション-2-レジストリによる有効化-2)
66 | - [参考記事](#参考記事)
67 | - [Systemログ (Sigmaルール 55件)](#systemログ-sigmaルール-55件)
68 | - [Applicationログ (Sigmaルール 16件)](#applicationログ-sigmaルール-16件)
69 | - [Windows Defender Operationalログ (Sigmaルール 10件)](#windows-defender-operationalログ-sigmaルール-10件)
70 | - [Bits-Client Operationalログ (Sigmaルール 6件)](#bits-client-operationalログ-sigmaルール-6件)
71 | - [Firewallログ (Sigmaルール 6件)](#firewallログ-sigmaルール-6件)
72 | - [NTLM Operationalログ (Sigmaルール 3件)](#ntlm-operationalログ-sigmaルール-3件)
73 | - [Security-Mitigations KernelModeとUserModeログ (Sigmaルール 2件)](#security-mitigations-kernelmodeとusermodeログ-sigmaルール-2件)
74 | - [PrintServiceログ (Sigmaルール 2件)](#printserviceログ-sigmaルール-2件)
75 | - [Adminログ (Sigmaルール 1件)](#adminログ-sigmaルール-1件)
76 | - [Operationalログ (Sigmaルール 1件)](#operationalログ-sigmaルール-1件)
77 | - [SMBClient Securityログ (Sigmaルール 2件)](#smbclient-securityログ-sigmaルール-2件)
78 | - [AppLockerログ (Sigmaルール 1件)](#applockerログ-sigmaルール-1件)
79 | - [CodeIntegrity Operationalログ (Sigmaルール 1件)](#codeintegrity-operationalログ-sigmaルール-1件)
80 | - [Diagnosis-Scripted Operationalログ (Sigmaルール 1件)](#diagnosis-scripted-operationalログ-sigmaルール-1件)
81 | - [DriverFrameworks-UserMode Operationalログ (Sigmaルール 1件)](#driverframeworks-usermode-operationalログ-sigmaルール-1件)
82 | - [WMI-Activity Operationalログ (Sigmaルール 1件)](#wmi-activity-operationalログ-sigmaルール-1件)
83 | - [TerminalServices-LocalSessionManager Operationalログ (Sigmaルール 1件)](#terminalservices-localsessionmanager-operationalログ-sigmaルール-1件)
84 | - [TaskScheduler Operationalログ (Sigmaルール 1件)](#taskscheduler-operationalログ-sigmaルール-1件)
85 |
86 | # 作者
87 |
88 | 田中ザック (Zaku / [@yamatosecurity](https://twitter.com/yamatosecurity))。
89 | より多くの研究とテストを行い、(検知ルールとドキュメンテーションの)改善の余地があるため、定期的に更新していく予定です。
90 | PRは歓迎され、喜んでコントリビューターとして追加させていただきます。
91 |
92 | もし、このガイドが役に立つのであれば、GitHubで星を付けてください。更新し続けるモチベーションが上がります。
93 |
94 | # コントリビュータ
95 |
96 | * DustInDark: 日本語版の修正。
97 | * Fukusuke Takahashi (fukusuket): 和訳と修正。
98 | * LasseKrache: Batchスクリプトのバグの指摘。
99 |
100 | # Acknowledgements
101 |
102 | 多くの情報はマイクロソフトの[詳細なセキュリティ監査に関するFAQ](https://learn.microsoft.com/ja-jp/windows/security/threat-protection/auditing/advanced-security-auditing-faq), [sigma](https://github.com/SigmaHQ/sigma)ルール, [ACSCのガイド](https://www.cyber.gov.au/acsc/view-all-content/publications/windows-event-logging-and-forwarding)、そして私自身の調査/テストから得たものです。特に[Sigmaコミュニティ](https://github.com/SigmaHQ/sigma/graphs/contributors)には、世の中のすべての防衛者のために脅威検知能力をオープンソースかつフリーにしてくれたことに感謝しています。
103 |
104 | # デフォルトの Windows ログ設定の問題
105 |
106 | デフォルトでは、Windows は悪意のあるアクティビティの検出と、フォレンジック調査の実行に必要な多くのイベントをログに記録しません。
107 | また、イベントファイルのデフォルトの最大サイズは、クラッシックイベントログ(`Security`、`System`、`Application`)ではわずか20MB、PowerShellでは15MB、その他のほとんどすべてのログではわずか1MBであるため、証拠がすぐ上書きされる可能性が高くなります。
108 | システム管理者が Windows端末を簡単に設定できるように、このリポジトリにはシンプルな[バッチスクリプト](YamatoSecurityConfigureWinEventLogs.bat)が用意されており、インシデントが発生したときに必要なログを取得できます。
109 | 大規模なネットワークの場合は、このドキュメントを参照として使用し、グループポリシーやInTuneを使用して端末を設定することをお勧めします。
110 |
111 | # 注意: 端末の設定変更は自己責任で!
112 |
113 | Windowsのデフォルトのイベントログ設定を改善することを強く推奨します。設定を改善することで最も正確な情報を提供できるようになります。
114 | しかし、あまりにも多くのログを有効にすることによる悪影響や、このリポジトリ内の何かの正確性について、一切の責任を負いません。
115 | 本番環境に導入する前に、設定変更を十分理解した上で、テスト端末で十分テストすることは、システム管理者の責任です。
116 | 環境を模倣したテスト端末で、少なくとも1週間はできるだけ多くのログ記録を有効にしてから、ノイズが多すぎるイベントがないか、必要なイベントが記録されているかどうかを確認することをお勧めします。
117 |
118 | [Hayabusa](https://github.com/Yamato-Security/hayabusa)のイベントID集計機能を使用して、evtxファイル内のイベントIDの総数と割合を確認できます。
119 |
120 | 例:`hayabusa.exe eid-metrics -f path/to/Security.evtx`
121 |
122 | # 重要な Windowsイベントログ
123 |
124 | 1. 有効にするべき最も重要なイベントログは、おそらく`Process Creation`(プロセス作成)のイベントで、システムで実行されているプロセスを追跡するものです。
125 | 現在、Sigmaルールの約半分がこのイベントに依存しています。
126 | Sysmonをインストールして、イベントID`1`を有効にするか、ビルトインログ (SecurityイベントID`4688`)を有効にすることで記録できます。
127 | `Sysmon 1`に、実行ファイルのハッシュ値やメタデータなどの詳細情報も記録されるので理想的ですが、Sysmonをインストールできない場合は、Windowsのビルトインログの`Security 4688`が使えます。
128 | ただし、多くの検知ルールがコマンドライン情報にあるシグネチャを探すため、コマンドライン情報も記録されるように設定すべきです。
129 | 残念ながら`Security 4688`は、Sysmonプロセス作成ログほど詳細な情報は記録されないので、`Security 4688`に対応していない`Process Creation`検知ルールもあります。
130 | 2. 2番目に重要なイベントログは、適切に設定されたSecurityログです。
131 | 3. 攻撃者はPowerShellを悪用することが多いため、3番目に重要なのはおそらくPowerShellモジュールログとスクリプトブロックログです。
132 | 4. 4番目は、おそらく他のすべてのSysmonイベントです。
133 | 5. これらの他に、「アプリケーションとサービスログ」フォルダには、非常に重要な他の多くのログもあります:
134 | AppLocker, Bits-Client, NTLM, PowerShell, PrintService, Security-Mitigations, Windows Defender, Windows Firewall With Advanced Security, WMI-Activity等々。
135 |
136 | ## Sigmaのトップログソース
137 |
138 | 
139 |
140 | デフォルトのWindows監査設定で使用できるSigmaルールは、約10〜20%です。
141 |
142 | ### 上位のSigmaログソース
143 |
144 | 
145 |
146 | ### 上位のSecurityイベントID
147 |
148 | 
149 |
150 | # 最大ファイル サイズの増加
151 |
152 | ## オプション 1: イベントビューアー(手動)
153 |
154 | これを大規模に行うのは現実的ではありませんが、ログの有効、無効を変更し、最大ファイル サイズを確認および構成する最も簡単な方法は、イベントビューアーでログを右クリックし、`プロパティ`を開くことです。
155 |
156 | ## オプション 2: Windowsビルトインツール
157 |
158 | ビルトインツールのwevtutilコマンドを使用できます。
159 |
160 | 例: `wevtutil sl Security /ms:1073741824` (セキュリティログの最大ファイルサイズを1GBに増やす)
161 |
162 | ## オプション 3: PowerShell
163 |
164 | 例:
165 | ```powershell
166 | $sysmon = Get-WinEvent -ListLog Microsoft-Windows-Sysmon/Operational
167 | $sysmon.MaximumSizeInBytes = 2048000000 #2GB
168 | $sysmon.SaveChanges()
169 | ```
170 |
171 | ## オプション 4: グループポリシー
172 |
173 | `Security`、`System`、`Application`などのクラッシックイベントログの最大ファイルサイズを増やすのは簡単ですが、他のイベントログの最大ファイルサイズを変更するには、残念ながら、管理用テンプレートをインストールするか、レジストリを直接変更する必要があります。
174 | 起動時に`.bat`スクリプトを使用して最大ファイルサイズを増やした方が簡単な場合があります。
175 |
176 | # ログ設定を改善するスクリプト
177 |
178 | 最大ファイルサイズを増やして適切なログを有効にするスクリプトが、[YamatoSecurityConfigureWinEventLogs.bat](YamatoSecurityConfigureWinEventLogs.bat)で提供されています。
179 |
180 | # ログ設定の改善
181 |
182 | ## Sysmonログ (Sigmaルール1382件)
183 |
184 | ファイル: `Microsoft-Windows-Sysmon%4Operational.evtx`
185 |
186 | デフォルトの設定: `インストールされていない`
187 |
188 | sysmonをインストールして設定することは、Windows端末での可視性を高めるための最善の方法ですが、計画、テスト、およびメンテナンスが必要になります。
189 |
190 | Sysmonはそれ自体大きなトピックなので、現時点ではこのドキュメントの範囲外です。
191 | 次のリソースを確認することをお勧めします。
192 |
193 | * [TrustedSecのSysmonコミュニティガイド](https://github.com/trustedsec/SysmonCommunityGuide)
194 | * [Sysmon Modular](https://github.com/olafhartong/sysmon-modular)
195 | * [Florian Roth氏によるSwift On SecurityのSysmon設定ファイルを更新しているフォーク](https://github.com/Neo23x0/sysmon-config)
196 | * [Ion-storm氏によるSwift On SecurityのSysmon設定ファイルを更新しているフォーク](https://github.com/ion-storm/sysmon-config)
197 | * [Cyb3rWard0g氏のsysmon設定ファイル](https://github.com/OTRF/Blacksmith/blob/master/resources/configs/sysmon/sysmon.xml)
198 |
199 | ## Securityログ (Sigmaルール 1045件(process creationルール903件 + その他ルール142件))
200 |
201 | ファイル: `Security.evtx`
202 |
203 | デフォルトの設定: `一部有効`
204 |
205 | Securityログの設定が最も複雑なため、別のドキュメントを用意しました: [ConfiguringSecurityLogAuditPolicies-Japanese.md](ConfiguringSecurityLogAuditPolicies-Japanese.md)
206 |
207 | ## Powershellログ (Sigmaルール 175件)
208 |
209 | ファイル: `Microsoft-Windows-PowerShell%4Operational.evtx`
210 |
211 | ### モジュールログ (Sigmaルール 30件)
212 |
213 | モジュールログを有効にすると、イベントID`4103`が記録されます。
214 | モジュールログには、古いOSやバージョンのPowerShellでも動作する利点がある: PowerShell 3.0 (Win 7+)。
215 | また、実行したPowerShellコマンドとその結果の両方をログに残すことができるのも利点です。
216 | デメリットは、イベント数が極端に多くなってしまうことです。
217 | 例えば、攻撃者がMimikatzを実行した場合、2000以上のイベントを含む7MBのログが作成されます!
218 |
219 | #### モジュールログの有効化
220 |
221 | デフォルトの設定: `監査なし`
222 |
223 | ##### オプション 1: グループポリシーによる有効化
224 |
225 | グループポリシーエディター(`gpedit.msc`)で、`コンピューターの構成 > 管理用テンプレート > Windowsコンポーネント > Windows PowerShell`を開き、`モジュールログを有効にする`を有効にします。
226 | `オプション`ペインで、`表示...`ボタンをクリックすると、ログを記録するモジュールを設定できます。
227 | すべてのモジュールを記録するには、`値`テキストボックスに`*`を入力します。
228 |
229 | ##### オプション 2: レジストリによる有効化
230 |
231 | ```
232 | HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ModuleLogging → EnableModuleLogging = 1
233 | HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ModuleLogging\ModuleNames → * = *
234 | ```
235 |
236 | ### スクリプトブロックログ (Sigmaルール 134件)
237 |
238 | デフォルトの設定: `Win 10/2016以降では、PowerShellスクリプトがAMSIによって疑わしいと判定された場合、警告レベルでログに記録されるが、その他のログは記録されない`
239 |
240 | スクリプトブロックログを有効にすると、イベントID`4104`が記録されます。`スクリプトブロックの呼び出し開始/停止イベントをログに記録する`も有効にすると イベントID`4105`と`4106`も有効になりますが、ノイズが増えるだけなので推奨されません。
241 | PowerShell 5.0+ (Win 10+)ではデフォルトでサポートされていますが、.NET 4.5とWMF 4.0+をインストールすれば、古いOS (Win 7+)でも有効にすることができます。
242 | 残念ながら、1つのWindowsイベントログの最大サイズは32KBなので、これより大きいPowerShellスクリプトは32KBサイズのブロックに分割されます。
243 | もし、元々の`PowerShell Operational.evtx`ファイルがあれば、[block-parser](https://github.com/matthewdunwoody/block-parser)ツールを使って、これらのログを読みやすい一つのテキストファイルにもとめることができます。
244 | スクリプトブロックログの良い点は、悪意のあるスクリプトがXOR、Base 64、ROT13などで難読化されていても、解読されたスクリプトが記録されるため、解析が非常に容易になる点です。
245 | 攻撃者がMimikatzを実行した場合、7MBで2000以上のイベントが発生するのに比べ、5MBで約100件のイベントが発生するだけなので、モジュールログよりも解析しやすいです。
246 | ただし、スクリプトブロックログでは、コマンドの出力は記録されません。
247 |
248 | #### スクリプトブロックログの有効化
249 |
250 | #### オプション 1: グループポリシーによる有効化
251 |
252 | グループポリシーエディターで、`コンピューターの構成 > 管理用テンプレート > Windowsコンポーネント > Windows PowerShell`を開き、`PowerShellスクリプトブロックのログ記録を有効にする`を有効にします。
253 |
254 | #### オプション 2: レジストリによる有効化
255 |
256 | `HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging → EnableScriptBlockLogging = 1`
257 |
258 | ### トランスクリプションログ
259 |
260 | デフォルトの設定: `監査なし`
261 |
262 | トランスクリプションログを有効にすることでPowerShellログをローカル端末のテキストファイルに保存することも可能です。
263 | 攻撃者は通常、アンチフォレンジックのためにトランスクリプションログを簡単に削除することができますが、攻撃者がすべてのイベントログを消去しても、トランスクリプションログを検索して削除しないシナリオもあるかもしれません。
264 | そのため、可能であればトランスクリプションログも有効にすることをお勧めします。
265 | デフォルトでは、ユーザのドキュメントフォルダに保存されます。
266 | 理想的には、トランスクリプトログは書き込み専用のネットワークファイル共有に保存されるべきであるが、実際にはこれを実施することは難しいです。
267 | トランスクリプションログの利点は、各コマンドのタイムスタンプとメタデータを含み、Mimikatz実行時に6KB以下と非常にストレージ効率が良いことです。
268 | 欠点は、トランスクリプションログがPowerShellのターミナルに表示されるテキストしか記録されないことです。
269 |
270 | #### トランスクリプションログの有効化
271 |
272 | ##### オプション 1: グループポリシーによる有効化
273 |
274 | グループポリシーエディターで、`コンピューターの構成 > 管理用テンプレート > Windowsコンポーネント > Windows PowerShell`を開き、`PowerShellトランスクリプションを有効にする`を有効にします。
275 | その後、出力ディレクトリを指定します。
276 |
277 | ##### オプション 2: レジストリによる有効化
278 |
279 | ```
280 | HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\Transcription → EnableTranscripting = 1
281 | HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\Transcription → EnableInvocationHeader = 1
282 | HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\Transcription → OutputDirectory = “” (パスを入力する。空白の場合はデフォルトのパス。)
283 | ```
284 |
285 | ### 参考記事
286 |
287 | * [Mandiant Blog: Greater Visibility Through PowerShell Logging](https://www.mandiant.com/resources/blog/greater-visibilityt)
288 |
289 | ## Systemログ (Sigmaルール 55件)
290 |
291 | ファイル: `System.evtx`
292 |
293 | デフォルトの設定: `有効。20 MB`
294 |
295 | マルウェアはしばしば、永続化、ローカル特権昇格などのためにサービスをインストールします。その痕跡がこのログに残ります。
296 | また、このログから様々な脆弱性が悪用されていることを検出することが可能です。
297 |
298 | ## Applicationログ (Sigmaルール 16件)
299 |
300 | ファイル: `Application.evtx`
301 |
302 | デフォルトの設定: `有効。20 MB`
303 |
304 | このログはほとんどノイズですが、ここに重要な証拠を見つけることができるかもしれません。
305 | 注意点としては、異なるベンダーが異なるイベントに同じイベントIDを使用するため、イベントIDだけでなくプロバイダ名でもフィルタリングする必要があることです。
306 |
307 | ## Windows Defender Operationalログ (Sigmaルール 10件)
308 |
309 | ファイル: `Microsoft-Windows-Windows Defender%4Operational.evtx`
310 |
311 | デフォルトの設定: `有効。1 MB`
312 |
313 | (重要な監視項目の)Windows Defenderのアラートだけでなく、除外項目が追加された、改ざん防止機能が無効になった、履歴が削除された、などのイベントも検出できます。
314 |
315 | ## Bits-Client Operationalログ (Sigmaルール 6件)
316 |
317 | ファイル: `Microsoft-Windows-Bits-Client%4Operational.evtx`
318 |
319 | デフォルトの設定: `有効。1 MB`
320 |
321 | Bitsadmin.exeは、攻撃者がマルウェアのダウンロードや実行に悪用する一般的な[lolbin](https://lolbas-project.github.io/lolbas/Binaries/Bitsadmin/)です。
322 | このログを見れば、その証拠が見つかるかもしれません。
323 | ただし、誤検出が多いので、注意が必要です。
324 |
325 | ## Firewallログ (Sigmaルール 6件)
326 |
327 | ファイル: `Microsoft-Windows-Windows Firewall With Advanced Security%4Firewall.evtx`
328 |
329 | デフォルトの設定: `有効? 1 MB`
330 |
331 | ファイアウォールのルールが追加/変更/削除された形跡は、こちらで確認できます。
332 | マルウェアはしばしば、C2サーバと通信できるようにファイアウォールルールを追加したり、横展開するためにプロキシルールを追加したりします。
333 |
334 | ## NTLM Operationalログ (Sigmaルール 3件)
335 |
336 | ファイル: `Microsoft-Windows-NTLM%4Operational.evtx`
337 |
338 | デフォルトの設定: `ログ自体は有効になっているが、監査設定は無効になっている。1 MB`
339 |
340 | NTLM認証を無効にしたい場合、このログを有効にすることをお勧めします。
341 | NTLMを無効にすると、ほとんどの場合、一部の端末が接続できなくなるため、まずDCや他のサーバでこのログを監視して、誰がまだNTLMを使用しているかを確認し、それらのユーザから徐々にNTLMを無効にしてから、グローバルに無効にすることを推奨します。
342 | 4624などのログオンイベントで、内向きの接続にNTLMが使用されていることを確認できますが、誰がNTLMで外向きに接続をしているかを監視したい場合は、このログを有効にする必要があります。
343 |
344 | 監査設定を有効にするために、グループポリシーで`コンピューターの構成 > Windowsの設定 > セキュリティの設定 > ローカルポリシー > セキュリティオプション`配下の`ネットワークセキュリティ: NTLMを制限する:`の様々な設定を正しく設定する必要があります。
345 |
346 | 参考記事: [Farewell NTLM](https://www.scip.ch/en/?labs.20210909)
347 |
348 | ## Security-Mitigations KernelModeとUserModeログ (Sigmaルール 2件)
349 |
350 | ファイル: `Microsoft-Windows-Security-Mitigations%4KernelMode.evtx`, `Microsoft-Windows-Security-Mitigations%4UserMode.evtx`
351 |
352 | デフォルトの設定: `有効。1 MB`
353 |
354 | 現時点では、これらのログに対して2件のSigmaルールしかありませんが、エクスプロイト保護、ネットワーク保護、コントロールされたフォルダーアクセス、攻撃面の縮小(ASR)のすべてのログ(約40以上のイベントID)を収集し、監視すべきです。
355 | 残念ながら、攻撃面の縮小(ASR)のログ(以前はWDEG(Windows Defender Exploit Guard)とEMET)は複数のログに分散しており、検索するには複雑なXMLクエリが必要です。
356 |
357 | 詳細: [攻撃面の縮小機能を理解して使用する](https://learn.microsoft.com/ja-jp/microsoft-365/security/defender-endpoint/overview-attack-surface-reduction?view=o365-worldwide)
358 |
359 | ## PrintServiceログ (Sigmaルール 2件)
360 |
361 | 印刷スプーラーへの攻撃を検知するために、Operationalログを有効にすることを推奨します。(例: PrintNightmare等々)
362 |
363 | ### Adminログ (Sigmaルール 1件)
364 |
365 | ファイル: `Microsoft-Windows-PrintService%4Admin.evtx`
366 |
367 | デフォルトの設定: `有効。1 MB`
368 |
369 | ### Operationalログ (Sigmaルール 1件)
370 |
371 | ファイル: `Microsoft-Windows-PrintService%4Operational.evtx`
372 |
373 | デフォルトの設定: `無効。1 MB`
374 |
375 | ## SMBClient Securityログ (Sigmaルール 2件)
376 |
377 | ファイル: `Microsoft-Windows-SmbClient%4Security.evtx`
378 |
379 | デフォルトの設定: `有効。8 MB`
380 |
381 | PrintNightmare攻撃 (ルール: `Suspicious Rejected SMB Guest Logon From IP`)や隠し共有をマウントするユーザを検出できます。
382 |
383 | ## AppLockerログ (Sigmaルール 1件)
384 |
385 | ファイル: `Microsoft-Windows-AppLocker%4MSI and Script.evtx`, `Microsoft-Windows-AppLocker%4EXE and DLL.evtx`, `Microsoft-Windows-AppLocker%4Packaged app-Deployment.evtx`, `Microsoft-Windows-AppLocker%4Packaged app-Execution.evtx`
386 |
387 | デフォルトの設定: `AppLockerが有効の場合、有効? 1 MB`
388 |
389 | AppLockerを使用している場合、有効になっているか確認し、監視することが重要です。
390 |
391 | ## CodeIntegrity Operationalログ (Sigmaルール 1件)
392 |
393 | ファイル: `Microsoft-Windows-CodeIntegrity%4Operational.evtx`
394 |
395 | デフォルトの設定: `有効。1 MB`
396 |
397 | このログを確認すると、Windowsのコード整合性チェックでブロックされたドライバーのロードイベントを検出することができます。そのため、ロードに失敗した悪意のあるドライバーを示すことがあります。
398 |
399 | ## Diagnosis-Scripted Operationalログ (Sigmaルール 1件)
400 |
401 | ファイル: `Microsoft-Windows-Diagnosis-Scripted%4Operational.evtx`
402 |
403 | デフォルトの設定: `有効。1 MB`
404 |
405 | diagcabパッケージが悪用された証拠は、こちらで確認できます。
406 |
407 | ## DriverFrameworks-UserMode Operationalログ (Sigmaルール 1件)
408 |
409 | ファイル: `Microsoft-Windows-DriverFrameworks-UserMode%4Operational.evtx`
410 |
411 | デフォルトの設定: `監査なし。1 MB`
412 |
413 | 接続されたUSBデバイスの痕跡がここで記録されます。
414 |
415 | ## WMI-Activity Operationalログ (Sigmaルール 1件)
416 |
417 | ファイル: `Microsoft-Windows-WMI-Activity%4Operational.evtx`
418 |
419 | デフォルトの設定: `Win10以降では有効になっている。1 MB`
420 |
421 | 攻撃者はしばしばWMIを悪用して永続化や横展開するので、このログを監視することは重要です。
422 |
423 | ## TerminalServices-LocalSessionManager Operationalログ (Sigmaルール 1件)
424 |
425 | ファイル: `Microsoft-Windows-TerminalServices-LocalSessionManager%4Operational.evtx`
426 |
427 | デフォルトの設定: `有効。1 MB`
428 |
429 | リバースプロキシツールであるngrokが、ファイアウォールを迂回するためにローカルRDPポートに通信を転送した場合に検出します。
430 |
431 | リンク: [Bypassing Network Restrictions Through RDP Tunneling](https://www.mandiant.com/resources/blog/bypassing-network-restrictions-through-rdp-tunneling)
432 |
433 | ## TaskScheduler Operationalログ (Sigmaルール 1件)
434 |
435 | ファイル: `Microsoft-Windows-TaskScheduler%4Operational.evtx`
436 |
437 | デフォルトの設定: `無効。1 MB`
438 |
439 | 攻撃者は、しばしば永続化や横展開するためにタスクを悪用するので、このログを有効にした方が良いです。
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
Yamato Security's Windows Event Log Configuration Guide For DFIR And Threat Hunting
6 | [
English ] | [
日本語]
7 |
8 |
9 |
10 | This is yet another guide on properly configuring and monitoring Windows event logs with an emphasis on logging for [sigma](https://github.com/SigmaHQ/sigma) rules.
11 |
12 | > This is a work in progress, so check back please periodically for updates.
13 |
14 | # TLDR
15 |
16 | * You can only use around 10~20% of [sigma](https://github.com/SigmaHQ/sigma) detection rules with the default Windows audit settings.
17 | * Even if a Windows log is enabled, by default, the maximum size for logs is between 1~20 MB so there is a good chance that evidence gets quickly overwritten.
18 | * Enable the proper audit settings with [YamatoSecurityConfigureWinEventLogs.bat](YamatoSecurityConfigureWinEventLogs.bat) or [WELA (Windows Event Log Auditor)](https://github.com/Yamato-Security/WELA) to use up to around 75% of sigma rules and retain logs for as long as you need them.
19 | - **Warning: make sure you customize the script to your needs and test before using in production!**
20 | * Install [sysmon](https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon) to get full coverage. (**Highly recommended!**)
21 |
22 | # Companion Projects
23 |
24 | * [Hayabusa](https://github.com/Yamato-Security/hayabusa) - sigma-based threat hunting and fast forensics timeline generator for Windows event logs.
25 | * [Hayabusa Rules](https://github.com/Yamato-Security/hayabusa-rules) - detection rules for hayabusa.
26 | * [Hayabusa Sample EVTXs](https://github.com/Yamato-Security/hayabusa-sample-evtx) - Sample evtx files to use for testing hayabusa/sigma detection rules.
27 | * [Takajo](https://github.com/Yamato-Security/takajo) - Analyzer for hayabusa results.
28 | * [WELA (Windows Event Log Auditor)](https://github.com/Yamato-Security/WELA) - A tool for auditing Windows event log settings.
29 |
30 | # Table of Contents
31 |
32 | - [TLDR](#tldr)
33 | - [Companion Projects](#companion-projects)
34 | - [Table of Contents](#table-of-contents)
35 | - [Author](#author)
36 | - [Contributors](#contributors)
37 | - [Acknowledgements](#acknowledgements)
38 | - [Problems with the default Windows log settings](#problems-with-the-default-windows-log-settings)
39 | - [Warning: Make changes to your systems at your own risk!](#warning-make-changes-to-your-systems-at-your-own-risk)
40 | - [Important Windows event logs](#important-windows-event-logs)
41 | - [Sigma's top log sources](#sigmas-top-log-sources)
42 | - [Top sigma log sources](#top-sigma-log-sources)
43 | - [Top Security Event IDs](#top-security-event-ids)
44 | - [Increasing the maximum file size](#increasing-the-maximum-file-size)
45 | - [Option 1: Manually through Event Viewer](#option-1-manually-through-event-viewer)
46 | - [Option 2: Windows built-in tool](#option-2-windows-built-in-tool)
47 | - [Option 3: PowerShell](#option-3-powershell)
48 | - [Option 4: Group Policy](#option-4-group-policy)
49 | - [Configuration script](#configuration-script)
50 | - [Configuring log settings](#configuring-log-settings)
51 | - [Sysmon log (1382 sigma rules)](#sysmon-log-1382-sigma-rules)
52 | - [Security log (1045 sigma rules (903 process creation rules + 142 other rules))](#security-log-1045-sigma-rules-903-process-creation-rules--142-other-rules)
53 | - [Powershell logs (175 sigma rules)](#powershell-logs-175-sigma-rules)
54 | - [Module logging (30 sigma rules)](#module-logging-30-sigma-rules)
55 | - [Enabling module logging](#enabling-module-logging)
56 | - [Option 1: Enabling through group policy](#option-1-enabling-through-group-policy)
57 | - [Option 2: Enabling through the registry](#option-2-enabling-through-the-registry)
58 | - [Script Block Logging (134 sigma rules)](#script-block-logging-134-sigma-rules)
59 | - [Enabling Script Block logging](#enabling-script-block-logging)
60 | - [Option 1: Enabling through group policy](#option-1-enabling-through-group-policy-1)
61 | - [Option 2: Enabling through the registry](#option-2-enabling-through-the-registry-1)
62 | - [Transcription logging](#transcription-logging)
63 | - [Enabling Transcription logging](#enabling-transcription-logging)
64 | - [Option 1: Enabling through group policy](#option-1-enabling-through-group-policy-2)
65 | - [Option 2: Enabling through the registry](#option-2-enabling-through-the-registry-2)
66 | - [References](#references)
67 | - [System log (55 sigma rules)](#system-log-55-sigma-rules)
68 | - [Application log (16 sigma rules)](#application-log-16-sigma-rules)
69 | - [Windows Defender Operational log (10 sigma rules)](#windows-defender-operational-log-10-sigma-rules)
70 | - [Bits-Client Operational log (6 sigma rules)](#bits-client-operational-log-6-sigma-rules)
71 | - [Firewall log (6 sigma rules)](#firewall-log-6-sigma-rules)
72 | - [NTLM Operational log (3 sigma rules)](#ntlm-operational-log-3-sigma-rules)
73 | - [Security-Mitigations KernelMode and UserMode logs (2 sigma rules)](#security-mitigations-kernelmode-and-usermode-logs--2-sigma-rules)
74 | - [PrintService logs (2 sigma rules)](#printservice-logs-2-sigma-rules)
75 | - [Admin (1 sigma rule)](#admin-1-sigma-rule)
76 | - [Operational (1 sigma rule)](#operational-1-sigma-rule)
77 | - [SMBClient Security log (2 sigma rules)](#smbclient-security-log-2-sigma-rules)
78 | - [AppLocker logs (1 sigma rule)](#applocker-logs-1-sigma-rule)
79 | - [CodeIntegrity Operational log (1 sigma rule)](#codeintegrity-operational-log-1-sigma-rule)
80 | - [Diagnosis-Scripted Operational log (1 sigma rule)](#diagnosis-scripted-operational-log-1-sigma-rule)
81 | - [DriverFrameworks-UserMode Operational log (1 sigma rule)](#driverframeworks-usermode-operational-log--1-sigma-rule)
82 | - [WMI-Activity Operational log (1 sigma rule)](#wmi-activity-operational-log--1-sigma-rule)
83 | - [TerminalServices-LocalSessionManager Operational log (1 sigma rule)](#terminalservices-localsessionmanager-operational-log--1-sigma-rule)
84 | - [TaskScheduler Operational log (1 sigma rule)](#taskscheduler-operational-log--1-sigma-rule)
85 |
86 | # Author
87 |
88 | Zach Mathis ([@yamatosecurity](https://twitter.com/yamatosecurity)). As I do more research and testing, I plan on periodically updating this as there is much room for improvement (both in the documentation as well as in creating more detection rules.) PRs are welcome and will gladly add you as a contributor. If you find any errors in this documentation, please let me know and I will fix them as soon as possible.
89 |
90 | If you find any of this useful, please give a star on GitHub as it will probably help motivate me to continue updating this.
91 |
92 | # Contributors
93 |
94 | * DustInDark (hitenkoku): Japanese translation fixes.
95 | * Fukusuke Takahashi (fukusuket): Japanese translations and fixes.
96 | * LasseKrache: Pointing out a bug in the batch script.
97 |
98 | # Acknowledgements
99 |
100 | Most of the information comes from Microsoft's [Advanced security auditing FAQ](https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/advanced-security-auditing-faq), [sigma](https://github.com/SigmaHQ/sigma) rules, the [ACSC Event Logging Guide](https://www.cyber.gov.au/acsc/view-all-content/publications/windows-event-logging-and-forwarding) and my own research/testing. I would like to thank the [sigma community](https://github.com/SigmaHQ/sigma/graphs/contributors) in particular for making threat detection open source and free for the benefit of all of the defenders out there.
101 |
102 | # Problems with the default Windows log settings
103 |
104 | By default, Windows will not log many events necessary for detecting malicious activity and performing forensics investigations.
105 | Also, the default maxium size for event files is only 20 MB for the classic event logs (`Security`, `System`, `Application`), 15 MB for PowrShell and a mere 1 MB for almost all of the other logs so there is a good chance that evidence is overwritten over time.
106 | A simple [batch script](YamatoSecurityConfigureWinEventLogs.bat) in this repository have been provided to let systems administrators easily configure their Windows machines so that they will have the logs that they need when an incident occurs. For large networks, you probably want to use this document as a reference and configure your endpoints with Group Policy and/or InTune.
107 |
108 | # Warning: Make changes to your systems at your own risk!
109 |
110 | I highly recommend to improve the default Windows event logging settings and try my best to provide the most accurate information. However, I do not take any responsibility for any adverse effects of enabling too much logging or the accuracy of anything in this repository.
111 | It is your responsibility to understand and test out any changes you make to your systems on test machines before rolling out to production.
112 | I recommend turning on as much logging as possible on test machines that mimic your environment for at least a week and then confirm if there are any events that are generating too much noise or if there are events that you want but are not being generated.
113 |
114 | You can view the total number and percent of Event IDs in an `evtx` file with [Hayabusa](https://github.com/Yamato-Security/hayabusa)'s event ID metrics command.
115 |
116 | Example: `hayabusa.exe eid-metrics -f path/to/Security.evtx`
117 |
118 | # Important Windows event logs
119 |
120 | 1. The most important event log to turn on is probably `Process Creation` which tracks what processes are run on a system.
121 | Currently, about half of [Sigma](https://github.com/SigmaHQ/sigma)'s detection rules rely on this event.
122 | This can be accomplished by installing Sysmon (Event ID `1`) or enabling the built-in Security log Event ID `4688`.
123 | `Sysmon 1` will provide detailed information such as hashes and metadata of the executable so is ideal but in the case that Sysmon cannot be installed it is possible use built-in `Security 4688` logs. However, it is important that command line logging is also enabled as many detection rules rely on this. Unfortunately `Security 4688` does not provide as detailed information as the Sysmon process creation logs, so not all `Process Creation` rules work with `Security 4688`.
124 | 2. The second most important event log is a properly tuned Security log.
125 | 3. The third most important are probably PowerShell Module logging and ScriptBlock logging as attackers will often abuse PowerShell.
126 | 4. The forth are probably all of the other Sysmon events.
127 | 5. After these, there are many other logs under the "Application and Services Logs" folder that are also very important: AppLocker, Bits-Client, NTLM, PowerShell, PrintService, Security-Mitigations, Windows Defender, Windows Firewall With Advanced Security, WMI-Activity, etc...
128 |
129 | ## Sigma's top log sources
130 |
131 | 
132 |
133 | Approximately only 10~20% of sigma rules can be used with the default Windows audit settings!
134 |
135 | ### Top sigma log sources
136 |
137 | 
138 |
139 | ### Top Security Event IDs
140 |
141 | 
142 |
143 | # Increasing the maximum file size
144 |
145 | ## Option 1: Manually through Event Viewer
146 |
147 | This is not practical to do at scale, but the easiest way to enable/disable logs and check and/or configure their maximum file size is by right-clicking on the log in Event Viewer and opening up `Properties`.
148 |
149 | ## Option 2: Windows built-in tool
150 |
151 | You can use the built-in `wevtutil` command.
152 |
153 | Example: `wevtutil sl Security /ms:1073741824` to increase the maximum file size for the Security log to 1 GB.
154 |
155 | ## Option 3: PowerShell
156 |
157 | Example:
158 | ```powershell
159 | $sysmon = Get-WinEvent -ListLog Microsoft-Windows-Sysmon/Operational
160 | $sysmon.MaximumSizeInBytes = 2048000000 #2GB
161 | $sysmon.SaveChanges()
162 | ```
163 |
164 | ## Option 4: Group Policy
165 |
166 | It is straightforward to increase the maximum file size for the classic event logs such as `Security`, `System`, and `Application`, however, unfortunately you need to install Administrative Templates and/or directly modify the registry in order to change the maximum file size for the other logs. It may just be easier to increase the file size with a batch or PowerShell script on startup.
167 |
168 | # Configuration script
169 |
170 | A script to increase the maximum file size and enable the proper logs has been provided here: [YamatoSecurityConfigureWinEventLogs.bat](YamatoSecurityConfigureWinEventLogs.bat)
171 |
172 | # Configuring log settings
173 |
174 | ## Sysmon log (1382 sigma rules)
175 |
176 | File: `Microsoft-Windows-Sysmon%4Operational.evtx`
177 |
178 | Default settings: `Not installed`
179 |
180 | Installing and configuring sysmon is the single best thing you can do to increase your visibility on Windows endpoints but it will require planning, testing and maintenance.
181 | This is a big topic in itself so it is out of scope of this document at the moment.
182 | Please check out the following resources:
183 | * [TrustedSec Sysmon Community Guide](https://github.com/trustedsec/SysmonCommunityGuide)
184 | * [Sysmon Modular](https://github.com/olafhartong/sysmon-modular)
185 | * [Florian Roth's updated fork of the Swift On Security's sysmon config file](https://github.com/Neo23x0/sysmon-config)
186 | * [Ion-storm's updated fork of the Swift On Security's sysmon config file](https://github.com/ion-storm/sysmon-config)
187 | * [Cyb3rWard0g's sysmon config file](https://github.com/OTRF/Blacksmith/blob/master/resources/configs/sysmon/sysmon.xml)
188 |
189 | ## Security log (1045 sigma rules (903 process creation rules + 142 other rules))
190 |
191 | File: `Security.evtx`
192 |
193 | Default settings: `Partially enabled`
194 |
195 | The Security log is the most complex to configure so I have created a seperate document for it: [ConfiguringSecurityLogAuditPolicies.md](ConfiguringSecurityLogAuditPolicies.md)
196 |
197 | ## Powershell logs (175 sigma rules)
198 |
199 | File: `Microsoft-Windows-PowerShell%4Operational.evtx`
200 |
201 | ### Module logging (30 sigma rules)
202 |
203 | Turning on module logging will enable event ID `4103`.
204 | Module logging has the advantage that it can run on older OSes and versions of PowerShell: PowerShell 3.0 (Win 7+).
205 | Another benefit is that it logs both the PowerShell command executed as well as the results.
206 | The disadvantage is that it will create an extremely high number of events.
207 | For example, if an attacker runs Mimikatz, it will create 7 MB of logs with over 2000 events!
208 |
209 | #### Enabling module logging
210 |
211 | Default settings: `No Auditing`
212 |
213 | ##### Option 1: Enabling through group policy
214 | In the Group Policy editor (`gpedit.msc`), open `Computer Configuration > Administrative Templates > Windows Components > Windows PowerShell` and enable `Turn on Module Logging`.
215 | In the `Options` pane, click the `Show...` button to configure what modules to log.
216 | Enter `*` in the `Value` textbox to record all modules.
217 |
218 | ##### Option 2: Enabling through the registry
219 | ```
220 | HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ModuleLogging → EnableModuleLogging = 1
221 | HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ModuleLogging\ModuleNames → * = *
222 | ```
223 |
224 | ### Script Block Logging (134 sigma rules)
225 |
226 | Default settings: `On Win 10/2016+, if a PowerShell script is flagged as suspicious by AMSI, it will be logged with a level of Warning.`
227 |
228 | Turning on Script Block logging will enable event ID `4104`. If you enable `Log script block invocation start / stop events`, EID `4105` and `4106` will also be enabled, however, this is not recommended as it will just create noise.
229 | Script Block logging is supported by default in PowerShell 5.0+ (Win 10+), however you can enable this on older OSes (Win 7+) if you install .NET 4.5 and WMF 4.0+.
230 | Unfortunately, the maximum size of a single Windows event log is 32 KB so any PowerShell scripts greater than this will be fragmented in 32 KB sized blocks.
231 | If you have the original `PowerShell Operational.evtx` file, you can use the [block-parser](https://github.com/matthewdunwoody/block-parser) tool to un-fragment these logs into a single easily readable text file.
232 | One good thing about Script Block logging is that even if a malicious script is obfuscated with XOR, Base 64, ROT13, etc... the decoded script will be logged making analysis much easier.
233 | The logs are more reasonable to work with than module logging as if an attacker runs Mimikatz, only 5 MB and 100 events will generated compared to the 7 MB and over 2000 events.
234 | However, the output of the commands are not recorded with Script Block logging.
235 |
236 | #### Enabling Script Block logging
237 |
238 | #### Option 1: Enabling through group policy
239 |
240 | In the Group Policy editor, open `Computer Configuration > Administrative Templates > Windows Components > Windows PowerShell` and enable `Turn on PowerShell Script Block Logging`.
241 |
242 | #### Option 2: Enabling through the registry
243 |
244 | `HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging → EnableScriptBlockLogging = 1`
245 |
246 | ### Transcription logging
247 |
248 | Default settings: `No Auditing`
249 |
250 | It is possible to also save PowerShell logs to text files on the local computer with transcription logs.
251 | While an attacker can usually easily delete the transcription logs for anti-forensics, there may be scenarios where the attacker clears all of the event logs but does not search for transcription logs to delete.
252 | Therefore, it is recommended to also enable transcription logs if possible.
253 | By default, they are saved to the user's documents folder.
254 | Ideally transcript logs should be saved to a write-only network file share, however, this may be difficult to implement in practice.
255 | A benefit of transcription logs is they include the timestamp and metadata for each command and are very storage efficient with less than 6 KB for Mimikatz execution.
256 | The downside is that the transcription logs only record what appears in the PowerShell terminal.
257 |
258 | #### Enabling Transcription logging
259 |
260 | ##### Option 1: Enabling through group policy
261 |
262 | In the Group Policy editor, open `Computer Configuration > Administrative Templates > Windows Components > Windows PowerShell` and enable `Turn on PowerShell Transcription`.
263 | Then, specify the output directory.
264 |
265 | ##### Option 2: Enabling through the registry
266 | ```
267 | HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\Transcription → EnableTranscripting = 1
268 | HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\Transcription → EnableInvocationHeader = 1
269 | HKLM\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\Transcription → OutputDirectory = “” (Enter path. Empty = default)
270 | ```
271 |
272 | ### References
273 |
274 | * [Mandiant Blog: Greater Visibility Through PowerShell Logging](https://www.mandiant.com/resources/blog/greater-visibilityt)
275 |
276 | ## System log (55 sigma rules)
277 |
278 | File: `System.evtx`
279 |
280 | Default settings: `Enabled. 20 MB`
281 |
282 | Recommended settings: `Enabled. 128 MB+`
283 |
284 | Malware will often install services for persistence, local privilege esclation, etc... which can be found in this log.
285 | It is also possible to detect various vulnerabilities being exploited here.
286 |
287 | > **Note: One thing to watch out specific to the System log is that parameters in fields are sometimes translated to the local language so signatures that use only English may not detect on non-English systems. For example, on an English system in the parameters for EID 7045, it will record `Enabled` while in Japanese it might record `有効`.**
288 |
289 | > **Note: Just like the `Application` log, multiple providers will log to the same event ID so you may need to filter on provider name as well as the channel. An example is event ID `1` which gets used by various providers for different events.**
290 |
291 | Important Event IDs:
292 |
293 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
294 | | :---: | :---: | :---: | :---: | :---: | :---: |
295 | | 1 | System Sleep/Hibernation | 0 | Not Yet. | Info | Provider: `Power-Troubleshooter` |
296 | | 1 | System Time Changed | 0 | Not Yet. | Info | Provider: `Kernel-General` |
297 | | 12 | OS Startup | 0 | Not Yet. | Info | |
298 | | 13 | OS Shutdown | 0 | Not Yet. | Info | |
299 | | 16 | Registry Hive Access History Cleared | 2 | Not Yet. | High~Crit | Password dumpers may clear access history after dumping passwords hashes from the SAM registry key. This also happens normally though so need to filter out FPs. |
300 | | 55 | NTFS Filesystem Corrupted | 1 | No | High | Can detect attacks against NTFS vulnerabilities. |
301 | | 104 | System Event Log Cleared | 1 | Yes | Med | |
302 | | 6005 | Event Log Service Started | 0 | Yes | Info | |
303 | | 6006 | Event Log Service Stopped | 0 | Yes | Info | |
304 | | 6008 | Unexpected Shutdown | 0 | Yes | Info | |
305 | | 6038 | NTLMv1 Was Used | 1 | No | Low | |
306 | | 7031 | Service Crashed | 0 | Yes | Low | |
307 | | 7034 | Service Crashed | 0 | Yes | Low | |
308 | | 7036 | Service Started/Stopped | 2 | Yes | Info~High | Can be used to detect someone stopping Defender, etc... |
309 | | 7040 | Service Startup Type Changed | 0 | Yes | Info | Can indicate an attacker disabled a service. |
310 | | 7045 | Service Installation | 37 | Yes | Info~Crit | This is the most important System event ID as malware often installs itself as a service or abuses services. |
311 | | 20001 | New PNP Device | 0 | Yes | Info~? | Level will depend on if USB devices are allowed or not. Logs only the first time a device has been plugged in. Non-USB PNP device events are very noisy so should probably be filtered out. |
312 |
313 | ## Application log (16 sigma rules)
314 |
315 | This log is mostly noise but you may be able to find some important evidence here.
316 | Some 3rd-party anti-virus software will log to here.
317 | One thing to be careful about with the Application log is that different vendors will use the same event IDs for different events so you should also filter on not just Event IDs but Provider Names as well.
318 |
319 | File: `Application.evtx`
320 |
321 | Default settings: `Enabled. 20 MB`
322 |
323 | Recommended settings: `Enabled. 128 MB+`
324 |
325 | Important Event IDs:
326 |
327 | | Event ID | Provider | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
328 | | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
329 | | 1 | `Audit-CVE`, `Microsoft-Windows-Audit-CVE` | Known Vulnerability (CVE) Exploit Attempt | 1 | No | Critical | Detects events generated by user-mode applications when they call the CveEventWrite API when a known vulnerability is trying to be exploited. MS started using this log in 2020/01 with CVE-2020-0601 (a Windows CryptoAPI vulnerability). Unfortunately, that is about the only instance of CVEs being written to this log. |
330 | | 325 | `ESENT` | ESE DB Created | 2 | No | Info~Crit | Detects when a process creates an ESE database. This is used by a variety of things such as for Exchange, AD, Certificate Services, SRUM, etc... The most important ESE DB for security is NTDS.dit, the file of all domain users' password hashes located on domain controllers. There are two sigma rules to detect dumping of NTDS.dit, however, it may be a false positive if an administrator uses ntdsutil for backups or when shadow copies are created. |
331 | | 326 | `ESENT` | ESE DB Attached | 1 | No | Info~Crit | May be able to detect access to NTDS.dit. |
332 | | 1000, 1001 | `Application Error`, `Windows Error Reporting` | Application Error | 1 | No | Info~High | |
333 | | 1034, 11724 | `MsiInstaller` | Application Uninstalled | 1 | No | Info~Low | |
334 | | 1040 | `MsiInstaller` | Application Installation | 1 | No | Info~Med | |
335 | | 33205 | `MSSQLSERVER` | SQL Audit Event | 6 | No | Info~High | Can detect MSSQL backdoors, SQL/command injection, etc... |
336 |
337 |
338 | ## Windows Defender Operational log (10 sigma rules)
339 |
340 | File: `Microsoft-Windows-Windows Defender%4Operational.evtx`
341 |
342 | Default settings: `Enabled. 1 MB`
343 |
344 | Recommended settings: `Enabled. 128 MB+`
345 |
346 | You can detect not only Windows Defender alerts (which are important to monitor), but also exclusions being added, tamper protection being disabled, history deleted, etc...
347 |
348 | ## Bits-Client Operational log (6 sigma rules)
349 |
350 | File: `Microsoft-Windows-Bits-Client%4Operational.evtx`
351 |
352 | Default settings: `Enabled. 1 MB`
353 |
354 | Recommended settings: `Enabled. 128 MB+`
355 |
356 | Bitsadmin.exe is a popular [lolbin](https://lolbas-project.github.io/lolbas/Binaries/Bitsadmin/) that attackers will abuse for downloading and executing malware.
357 | You may find evidence of that in this log, although there will be a lot of false positives to watch out for.
358 |
359 | ## Firewall log (6 sigma rules)
360 |
361 | File: `Microsoft-Windows-Windows Firewall With Advanced Security%4Firewall.evtx`
362 |
363 | Default settings: `Enabled? 1 MB`
364 |
365 | Recommended settings: `Enabled. 256 MB+`
366 |
367 | You can find evidence of firewall rules being added/modified/deleted here.
368 | Malware will often add firewall rules to make sure they can communicate with their C2 server, add proxy rules for lateral movement, etc...
369 |
370 | ## NTLM Operational log (3 sigma rules)
371 |
372 | File: `Microsoft-Windows-NTLM%4Operational.evtx`
373 |
374 | Default settings: `Enabled but Auditing is disabled. 1 MB`
375 |
376 | This log is recommended to enable if you want to disable NTLM authentication.
377 | Disabling NTLM will most likely break some communication, so you can monitor this log on the DCs and other servers to see who is still using NTLM and disable NTLM gradually starting with those users before disabling it globally.
378 | It is possible to detect NTLM being used for incoming connections in logon events such as 4624 but you need to enable this log if you want to monitor who is making outgoing NTLM connections.
379 |
380 | To enable auditing, in Group Policy open `Computer Configuration > Policies > Windows Settings > Security Settings > Local Policies > Security Options` and configure the proper various `Network security: Restrict NTLM:` settings.
381 |
382 | Reference: [Farewell NTLM](https://www.scip.ch/en/?labs.20210909)
383 |
384 | ## Security-Mitigations KernelMode and UserMode logs (2 sigma rules)
385 |
386 | Files: `Microsoft-Windows-Security-Mitigations%4KernelMode.evtx`, `Microsoft-Windows-Security-Mitigations%4UserMode.evtx`
387 |
388 | Default settings: `Enabled. 1 MB`
389 |
390 | Recommended settings: `Enabled. 128 MB+`
391 |
392 | At the moment there are only 2 sigma rules for these logs but you should probably be collecting and monitoring all of the Exploit Protection, Network Protection, Controlled Folder Access and Attack Surface Reduction logs (About 40+ Event IDs).
393 |
394 | Unfortunately the Attack Surface Reduction logs (previously WDEG(Windows Defender Exploit Guard) and EMET) are spread across multiple logs and require complex XML queries to search them.
395 |
396 | Details: [Understand and use attack surface reduction capabilities](https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/overview-attack-surface-reduction?view=o365-worldwide)
397 |
398 | ## PrintService logs (2 sigma rules)
399 |
400 | It is recommended to enable the Operational log as well to detect Print Spooler attackers. (Ex: PrintNightmare, etc...)
401 |
402 | ### Admin (1 sigma rule)
403 |
404 | File: `Microsoft-Windows-PrintService%4Admin.evtx`
405 |
406 | Default settings: `Enabled. 1 MB`
407 |
408 | Recommended settings: `Enabled. 128 MB+`
409 |
410 | ### Operational (1 sigma rule)
411 |
412 | File: `Microsoft-Windows-PrintService%4Operational.evtx`
413 |
414 | Default settings: `Disabled. 1 MB`
415 |
416 | Recommended settings: `Enabled. 128 MB+`
417 |
418 | ## SMBClient Security log (2 sigma rules)
419 |
420 | File: `Microsoft-Windows-SmbClient%4Security.evtx`
421 |
422 | Default settings: `Enabled. 8 MB`
423 |
424 | Recommended settings: `Enabled. 128 MB+`
425 |
426 | Used to attempt to detect PrintNightmare (Suspicious Rejected SMB Guest Logon From IP) and users mounting hidden shares.
427 |
428 | ## AppLocker logs (1 sigma rule)
429 |
430 | Files: `Microsoft-Windows-AppLocker%4MSI and Script.evtx`, `Microsoft-Windows-AppLocker%4EXE and DLL.evtx`, `Microsoft-Windows-AppLocker%4Packaged app-Deployment.evtx`, `Microsoft-Windows-AppLocker%4Packaged app-Execution.evtx`
431 |
432 | Default settings: `Enabled if AppLocker is enabled? 1 MB`
433 |
434 | Recommended settings: `Enabled. 256 MB+`
435 |
436 | This is important to make sure is enabled and monitored if you are using AppLocker.
437 |
438 | ## CodeIntegrity Operational log (1 sigma rule)
439 |
440 | File: `Microsoft-Windows-CodeIntegrity%4Operational.evtx`
441 |
442 | Default settings: `Enabled. 1 MB`
443 |
444 | Recommended settings: `Enabled. 128 MB+`
445 |
446 | Check this log to detect driver load events that get blocked by Windows code integrity checks, which may indicate a malicious driver that faild to load.
447 |
448 | ## Diagnosis-Scripted Operational log (1 sigma rule)
449 |
450 | File: `Microsoft-Windows-Diagnosis-Scripted%4Operational.evtx`
451 |
452 | Default settings: `Enabled. 1 MB`
453 |
454 | Recommended settings: `Enabled. 128 MB+`
455 |
456 | Evidence of diagcab packages being used for exploitation may be found here.
457 |
458 | ## DriverFrameworks-UserMode Operational log (1 sigma rule)
459 |
460 | Files: `Microsoft-Windows-DriverFrameworks-UserMode%4Operational.evtx`
461 |
462 | Default settings: `No Auditing. 1 MB`
463 |
464 | Recommended settings: `Enabled. 128 MB+`
465 |
466 | Detects plugged in USB devices.
467 |
468 | ## WMI-Activity Operational log (1 sigma rule)
469 |
470 | File: `Microsoft-Windows-WMI-Activity%4Operational.evtx`
471 |
472 | Default settings: `Enabled on Win10/2016+. 1 MB`
473 |
474 | Recommended settings: `Enabled. 128 MB+`
475 |
476 | This is important to monitor as attackers will often exploit WMI for persistence and lateral movement.
477 |
478 | ## TerminalServices-LocalSessionManager Operational log (1 sigma rule)
479 |
480 | File: `Microsoft-Windows-TerminalServices-LocalSessionManager%4Operational.evtx`
481 |
482 | Default settings: `Enabled. 1 MB`
483 |
484 | Recommended settings: `Enabled. 128 MB+`
485 |
486 | Detects when ngrok, a reverse proxy tool, forwards traffic to the local RDP port to bypass firewalls.
487 |
488 | Link: [Bypassing Network Restrictions Through RDP Tunneling](https://www.mandiant.com/resources/blog/bypassing-network-restrictions-through-rdp-tunneling)
489 |
490 | ## TaskScheduler Operational log (1 sigma rule)
491 |
492 | File: `Microsoft-Windows-TaskScheduler%4Operational.evtx`
493 |
494 | Default settings: `Disabled. 1 MB`
495 |
496 | Recommended settings: `Enabled. 128 MB+`
497 |
498 | Attackers will often abuse tasks for persistence and lateral movement so this should be enabled.
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/ConfiguringSecurityLogAuditPolicies-Japanese.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Securityログ設定について
7 |
8 | [
English] | [
日本語]
9 |
10 |
11 | # 目次
12 |
13 | - [目次](#目次)
14 | - [セキュリティログ監査の設定に関する注意事項](#セキュリティログ監査の設定に関する注意事項)
15 | - [SecurityイベントログのカテゴリとイベントID](#securityイベントログのカテゴリとイベントid)
16 | - [1. アカウントログオン](#1-アカウントログオン)
17 | - [1.1 資格情報の確認](#11-資格情報の確認)
18 | - [1.2 Kerberos認証サービス](#12-kerberos認証サービス)
19 | - [1.3 Kerberosサービスチケット操作](#13-kerberosサービスチケット操作)
20 | - [2. アカウントの管理](#2-アカウントの管理)
21 | - [2.1 コンピュータアカウントの管理](#21-コンピュータアカウントの管理)
22 | - [2.2 その他のアカウント管理イベント](#22-その他のアカウント管理イベント)
23 | - [2.3 セキュリティグループの管理](#23-セキュリティグループの管理)
24 | - [2.4 ユーザアカウントの管理](#24-ユーザアカウントの管理)
25 | - [3. 詳細追跡](#3-詳細追跡)
26 | - [3.1 PNPアクティビティ](#31-pnpアクティビティ)
27 | - [3.2 プロセス作成](#32-プロセス作成)
28 | - [3.3 プロセス終了](#33-プロセス終了)
29 | - [3.4 RPCイベント](#34-rpcイベント)
30 | - [3.5 トークン権限の調整](#35-トークン権限の調整)
31 | - [4. DS (ディレクトリサービス) アクセス](#4-ds-ディレクトリサービス-アクセス)
32 | - [4.1 ディレクトリサービスアクセス](#41-ディレクトリサービスアクセス)
33 | - [4.2 ディレクトリサービスの変更](#42-ディレクトリサービスの変更)
34 | - [5. ログオン/ログオフ](#5-ログオンログオフ)
35 | - [5.1 アカウントロックアウト](#51-アカウントロックアウト)
36 | - [5.2 グループメンバーシップ](#52-グループメンバーシップ)
37 | - [5.3 ログオフ](#53-ログオフ)
38 | - [5.4 ログオン](#54-ログオン)
39 | - [5.5 その他のログオン/ログオフイベント](#55-その他のログオンログオフイベント)
40 | - [5.6 特殊なログオン](#56-特殊なログオン)
41 | - [6. オブジェクトアクセス](#6-オブジェクトアクセス)
42 | - [6.1 証明書サービス](#61-証明書サービス)
43 | - [6.2 詳細なファイル共有](#62-詳細なファイル共有)
44 | - [6.3 ファイル共有](#63-ファイル共有)
45 | - [6.4 ファイルシステム](#64-ファイルシステム)
46 | - [6.5 フィルタリングプラットフォームの接続](#65-フィルタリングプラットフォームの接続)
47 | - [6.6 フィルタリングプラットフォームパケットの破棄](#66-フィルタリングプラットフォームパケットの破棄)
48 | - [6.7 ハンドル操作](#67-ハンドル操作)
49 | - [6.8 カーネルオブジェクト](#68-カーネルオブジェクト)
50 | - [6.9 その他のオブジェクトアクセスイベント](#69-その他のオブジェクトアクセスイベント)
51 | - [6.10 レジストリ](#610-レジストリ)
52 | - [6.11 リムーバブル記憶域](#611-リムーバブル記憶域)
53 | - [6.12 SAM (セキュリティアカウントマネージャー)](#612-sam-セキュリティアカウントマネージャー)
54 | - [7. ポリシーの変更](#7-ポリシーの変更)
55 | - [7.1 監査ポリシーの変更](#71-監査ポリシーの変更)
56 | - [7.2 認証ポリシーの変更](#72-認証ポリシーの変更)
57 | - [7.3 承認ポリシーの変更](#73-承認ポリシーの変更)
58 | - [7.4 フィルタリングプラットフォームポリシーの変更](#74-フィルタリングプラットフォームポリシーの変更)
59 | - [7.5 MPSSVCルールレベルポリシーの変更](#75-mpssvcルールレベルポリシーの変更)
60 | - [7.6 その他のポリシー変更イベント](#76-その他のポリシー変更イベント)
61 | - [8. 特権の使用](#8-特権の使用)
62 | - [8.1 重要でない特権の使用](#81-重要でない特権の使用)
63 | - [8.2 重要な特権の使用](#82-重要な特権の使用)
64 | - [9. システム](#9-システム)
65 | - [9.1 その他のシステムイベント](#91-その他のシステムイベント)
66 | - [9.2 セキュリティ状態の変更](#92-セキュリティ状態の変更)
67 | - [9.3 セキュリティシステムの拡張](#93-セキュリティシステムの拡張)
68 | - [9.4 システムの整合性](#94-システムの整合性)
69 | - [10. グローバルオブジェクトアクセス](#10-グローバルオブジェクトアクセス)
70 | - [デフォルト設定のログ](#デフォルト設定のログ)
71 |
72 | # セキュリティログ監査の設定に関する注意事項
73 |
74 | * 組織レベルでは、グループポリシーまたはInTuneを使用して、Securityログの監査ポリシーを設定することができます。スタンドアロン端末の場合は、ローカルセキュリティポリシーエディタ(`gpedit.msc`)で設定できます。また、PowerShellスクリプトや`auditpol`などのビルトインコマンドを組み込んだBatchスクリプトを使用して、スタンドアロン端末およびスタートアップスクリプトで組織レベルの端末を設定することもできます。
75 | * Securityログ監査は、大まかなカテゴリレベルではなく、より細かい設定ができるサブカテゴリレベル(グループポリシーの`コンピュータの構成 > Windowsの設定 > セキュリティの設定 > セキュリティ監査ポリシーの詳細設定 > システム監査ポリシー`)で有効にすべきです。カテゴリレベルで設定してしまうと、多くの不要のイベントが記録され、サブカテゴリレベルで行った詳細な設定が上書きされるリスクがあります。
76 | * このドキュメントでは、そもそも実際に記録されていないイベントIDや監視・DFIR調査に役に立たないサブカテゴリとイベントIDについては記載していません。有効化すべきもののみ記載しています。
77 | * 特定のイベントIDの有効化・無効化はできず、最も細かい設定レベルはサブカテゴリになります。たまにいくつかのノイズが多いイベントIDが記録されますが、サブカテゴリ全体を無効にしない限り、無効にできないのが残念です。
78 | * Sigmaルールの数は、2022/09/24で取得しました。あるイベントについてSigmaルールが少ないとしても、そのイベントが重要でないことを意味するわけではないことに注意して下さい。
79 |
80 | # SecurityイベントログのカテゴリとイベントID
81 |
82 | ## 1. アカウントログオン
83 |
84 | ### 1.1 資格情報の確認
85 |
86 | ボリューム: `NTLMの使用による。ドメインコントローラでは高`
87 |
88 | デフォルトの設定: `クライアントOS: 監査なし` | `サーバOS: 成功`
89 |
90 | 推奨設定: `クライアントOSとサーバOS: 成功と失敗`
91 |
92 | Sigmaルールの例:
93 | * `Metasploit SMB Authentication`: MetasploitのSMB攻撃の検知
94 | * `Valid Users Failing to Authenticate from Single Source Using NTLM`: パスワード推測攻撃
95 | * `Invalid Users Failing To Authenticate From Single Source Using NTLM`: ユーザ名の推測
96 | * `Failed Logins with Different Accounts from Single Source System`: パスワードスプレー攻撃
97 |
98 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
99 | | :---: | :---: | :---: | :---: | :---: | :---: |
100 | | 4776 | ローカルユーザアカウントのNTLM認証 | 5 | あり | Info~High | 元のイベントメッセージにはDCのみと書かれているが、このイベントはクライアントOSのローカル認証でもログに記録される。 |
101 |
102 | ### 1.2 Kerberos認証サービス
103 |
104 | **注意:ドメインコントローラのみ有効**
105 |
106 | ボリューム: `高`
107 |
108 | デフォルトの設定: `クライアントOS: 監査なし` | `サーバOS: 成功`
109 |
110 | 推奨設定: `クライアントOS: 監査なし` | `サーバOS: 成功と失敗`
111 |
112 | Sigmaルールの例:
113 | * `(4768) (High) PetitPotam Suspicious Kerberos TGT Request`
114 | * `(4768) (Med) Disabled Users Failing To Authenticate From Source Using Kerberos`
115 | * `(4768) (Med) Invalid Users Failing To Authenticate From Source Using Kerberos`: ユーザ名の推測
116 | * `(4771) (Med) Valid Users Failing to Authenticate From Single Source Using Kerberos`: パスワード推測攻撃
117 |
118 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
119 | | :---: | :---: | :---: | :---: | :---: | :---: |
120 | | 4768 | TGTが要求された | 3 | あり | Info~High | |
121 | | 4771 | 事前認証に失敗した | 1 | 現在はなし | Info~Med | |
122 | | 4772 | Kerberos認証チケット要求が失敗した | 0 | なし | None | 実際は使われていない。代わりにイベントID 4768の失敗イベントが使われている。 |
123 |
124 | ### 1.3 Kerberosサービスチケット操作
125 |
126 | **注意:ドメインコントローラのみ有効**
127 |
128 | ボリューム: `高`
129 |
130 | デフォルトの設定: `クライアントOS: 監査なし` | `サーバOS: 成功`
131 |
132 | 推奨設定: `クライアントOS: 監査なし` | `サーバOS: 成功と失敗`
133 |
134 | Sigmaルールの例:
135 | * `(4769) (Med) Suspicious Kerberos RC4 Ticket Encryption`: RC4暗号化を用いたサービスチケットリクエストの検知。 これはレガシーな暗号化を利用した古いシステムもしくはKerberoasting(パスワードクラッキング)の可能性がある
136 |
137 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
138 | | :---: | :---: | :---: | :---: | :---: | :---: |
139 | | 4769 | Kerberosサービスチケットが要求された | 1 | あり | Info~Med | |
140 | | 4770 | Kerberosサービスチケットが更新された | 0 | 現在はなし | Info | |
141 | | 4773 | Kerberosサービスチケット要求が失敗した | 0 | なし | None | 実際は使われていない。代わりに4769が使われている。 |
142 |
143 | ## 2. アカウントの管理
144 |
145 | ### 2.1 コンピュータアカウントの管理
146 |
147 | > **注意: 以下のイベントは、ドメインコントローラのみで生成される**
148 |
149 | ボリューム: `低`
150 |
151 | デフォルトの設定: `クライアントOS: 監査なし` | `サーバOS: 成功のみ`
152 |
153 | 推奨設定: `成功と失敗`
154 |
155 | Sigmaルールの例:
156 | * `(4742) (Med) Possible DC Shadow`: 新規SPNによるDCShadow攻撃の検知
157 |
158 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
159 | | :---: | :---: | :---: | :---: | :---: | :---: |
160 | | 4741 | コンピュータアカウントが作成された | 0 | 1 | Info | |
161 | | 4742 | コンピュータアカウントが変更された | 2 | 現在はなし | Info~Med | |
162 | | 4743 | コンピュータアカウントが削除された | 0 | 現在はなし | Info | |
163 |
164 | ### 2.2 その他のアカウント管理イベント
165 |
166 | ボリューム: `低`
167 |
168 | デフォルトの設定: `監査なし`
169 |
170 | 推奨設定: `成功と失敗`
171 |
172 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
173 | | :---: | :---: | :---: | :---: | :---: | :---: |
174 | | 4782 | アカウントのパスワードハッシュがアクセスされた | 0 | 現在はなし | Info | AD Migration Toolkitを使用したアカウントのパスワード移行時、または攻撃者がパスワードハッシュにアクセスしようとした際にDC上で生成される。おそらく稀なイベント。 |
175 | | 4793 | パスワードポリシーチェックAPIが呼び出された | 0 | 現在はなし | Low | パスワードリセット時や攻撃者がパスワードポリシーをチェックする際に生成される。おそらく稀なイベント。 |
176 |
177 | ### 2.3 セキュリティグループの管理
178 |
179 | 「セキュリティが有効なグループ」とはアクセス権(ACL)を付与することができるグループのことです。「セキュリティが無効なグループ」はアクセス権を割り当てられない「ディストリビューショングループ」です。セキュリティが有効なグループが最も一般的であるため、ここでは単に「グループ」と呼ぶことにします。例えば、「セキュリティが有効なローカルグループが作成された」の代わりに、「ローカルグループが作成された」というイベントタイトルにしました。
180 |
181 | ドメインローカルグループは、ユニバーサルグループ、グローバルグループ、自ドメインの他のドメインローカルグループ、およびフォレスト内の任意のドメインのアカウントを含むことができるセキュリティまたは配布グループです。ドメインローカルセキュリティグループには、ドメインローカルグループが配置されている同じドメイン内にのみ存在するリソースに対するアクセス許可と権限を与えることができます。
182 |
183 | グローバルグループは、自身のドメイン、ドメインのサーバと端末、および信頼するドメインで使用することができるグループです。それらのすべての場所で、グローバルグループに権限を与え、グローバルグループはローカルグループのメンバーになることができます。ただし、グローバルグループには、そのドメインに所属するユーザアカウントのみを含めることができます。
184 |
185 | ユニバーサルグループは、そのフォレスト内の任意のドメインのユーザ、グループ、および端末をメンバーとして含むセキュリティまたは配布グループです。ユニバーサルセキュリティグループには、フォレスト内のどのドメイン内のリソースに対してもアクセス許可と権限を与えることができます。
186 |
187 | ボリューム: `低`
188 |
189 | デフォルトの設定: `成功`
190 |
191 | 推奨設定: `成功と失敗`
192 |
193 | Sigmaルールの例:
194 | * `(4732) (Med) User Added to Local Administrators`
195 | * `(4799) (High) Operation Wocao Activity`: 中国政府によるスパイ活動の検知
196 |
197 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
198 | | :---: | :---: | :---: | :---: | :---: | :---: |
199 | | 4727 | グローバルグループが作成された | 0 | 現在はなし | Info | |
200 | | 4728 | グローバルグループにメンバーが追加された | 0 | あり | Info | |
201 | | 4729 | グローバルグループからメンバーが削除された | 0 | 現在はなし | Info | |
202 | | 4730 | グローバルグループが削除された | 0 | 現在はなし | Info |
203 | | 4731 | ローカルグループが作成された | 0 | 現在はなし | Info | |
204 | | 4732 | ローカルグループにメンバーが追加された | 1 | あり | Info~Med | |
205 | | 4733 | ローカルグループからメンバーが削除された | 0 | 現在はなし | Info | |
206 | | 4734 | ローカルグループが削除された | 0 | 現在はなし | Info | |
207 | | 4737 | グローバルグループが変更された | 0 | 現在はなし | Info | |
208 | | 4754 | ユニバーサルグループが作成された | 0 | 現在はなし | Info |
209 | | 4755 | ユニバーサルグループが変更された | 0 | 現在はなし | Info |
210 | | 4756 | ユニバーサルグループにメンバーが追加された | 0 | 現在はなし | Info |
211 | | 4757 | ユニバーサルグループからメンバーが削除された | 0 | 現在はなし | Info |
212 | | 4758 | ユニバーサルグループが削除された | 0 | 現在はなし | Info |
213 | | 4764 | グループの種類が変更された | 0 | 現在はなし | Info | |
214 | | 4799 | ローカルグループメンバーシップが列挙された | 1 | 現在はなし | Info~High | これは、多くの誤検知を生む「4672」管理者ログオンイベントとおそらくほぼ同じくらいノイズの多い。 |
215 |
216 | ### 2.4 ユーザアカウントの管理
217 |
218 | ボリューム: `低`
219 |
220 | デフォルトの設定: `成功`
221 |
222 | 推奨設定: `成功と失敗`
223 |
224 | Sigmaルールの例:
225 | * `(4720) (High) Hidden Local User Creation`: バックドアアカウントとして使用されている可能性が高い隠しユーザアカウントを検出した
226 | * `(4720) (High) Suspicious Windows ANONYMOUS LOGON Local Account Created`
227 | * `(4720) (Low) Local User Creation`
228 | * `(4738) (High) Active Directory User Backdoors`
229 | * `(4738) (High) Weak Encryption Enabled and Kerberoast`
230 | * `(4765, 4766, 4738) (Med) Addition of SID History to Active Directory Object`: 攻撃者が追加の権限を得るためにSID履歴を用いた可能性がある
231 | * `(5145, 4738) (Med) Possible Remote Password Change Through SAMR`: SAMR APIのSamiChangePasswordUser() または SamSetInformationUser()を通して、NTLMハッシュの変更が遠隔で行われた可能性がある
232 | * `(4781) (High) Suspicious Computer Account Name Change CVE-2021-42287`: CVE-2021-42287に対しての攻撃に見られる$シンボルが含まれていない既存コンピュータアカウントの変更を検知する
233 | * `(4794) (High) Password Change on Directory Service Restore Mode (DSRM) Account`: ドメインコントローラにおいてディレクトリサービス復元モード(DSRM) アカウントがローカル管理者アカウントとして存在している。攻撃者が永続化を行うためにパスワードを変更した可能性がある
234 |
235 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
236 | | :---: | :---: | :---: | :---: | :---: | :---: |
237 | | 4720 | ユーザアカウントが作成された | 3 | あり | Info~High | |
238 | | 4722 | ユーザアカウントが有効になった | 0 | 現在はなし | Info |
239 | | 4723 | パスワードを変更しようとした | 0 | 現在はなし | Info |
240 | | 4724 | パスワードのリセットが試行された | 0 | 現在はなし | Info |
241 | | 4725 | ユーザアカウントが無効になった | 0 | 現在はなし | Info |
242 | | 4726 | ユーザアカウントが削除された | 0 | 現在はなし | Info |
243 | | 4738 | ユーザアカウントが変更された | 4 | 現在はなし | Info~High | |
244 | | 4740 | ユーザアカウントがロックアウトされた | 0 | 現在はなし | Med | おそらく稀なイベント。 |
245 | | 4765 | SID履歴がアカウントに追加された | 1 | 現在はなし | Info~Med | |
246 | | 4766 | アカウントにSID履歴を追加する試みは失敗した | 0 | 現在はなし | Info~Med | |
247 | | 4767 | ユーザアカウントのロックが解除された | 0 | 現在はなし | Info |
248 | | 4780 | 管理者グループのメンバーであるアカウントにACLが設定された | 0 | 現在はなし | Info | |
249 | | 4781 | アカウントの名前が変更された | 1 | 現在はなし | Info |
250 | | 4794 | DSRM管理者のパスワード設定 | 1 | 現在はなし | Info~High | |
251 | | 4798 | ユーザローカルグループメンバーシップが列挙された | 0 | 現在はなし | Info |
252 | | 5376 | 資格情報マネージャの資格情報がバックアップされた | 0 | 現在はなし | Info |
253 | | 5377 | 資格情報マネージャの資格情報がバックアップから復元された | 0 | 現在はなし | Info |
254 |
255 | ## 3. 詳細追跡
256 |
257 | ### 3.1 PNPアクティビティ
258 |
259 | 物理的な攻撃(Rubber Ducky攻撃など)や、誰かがUSBデバイスを介してデータを流出させたことを追跡したい場合に重要です。
260 |
261 | ボリューム: `通常、低い`
262 |
263 | デフォルトの設定: `監査なし`
264 |
265 | 推奨設定: `成功と失敗`
266 |
267 | Sigmaルールの例:
268 | * `(6416) External Disk Drive Or USB Storage Device`
269 |
270 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
271 | | :---: | :---: | :---: | :---: | :---: | :---: |
272 | | 6416 | 新規外部デバイスが認識された | 1 | 現在はなし | Info~Low | |
273 | | 6419 | デバイスを無効にする要求 | 0 | なし | Info | |
274 | | 6420 | デバイスが無効にされた | 0 | なし | Info | |
275 | | 6421 | デバイスを有効にする要求 | 0 | なし | Info | |
276 | | 6422 | デバイスが有効にされた | 0 | なし | Info | |
277 | | 6423 | デバイスのインストールが拒否された | 0 | なし | Info | |
278 | | 6424 | 以前拒否されたデバイスのインストールが許可された | 0 | なし | Info | |
279 |
280 | ### 3.2 プロセス作成
281 |
282 | 注意: 非常に重要なコマンドライン情報のログを取るには、別の設定を有効にする必要があります。グループポリシーでは `コンピュータの構成 > Windowsの設定 > 管理用テンプレート > システム > プロセス作成の監査 > プロセス作成イベントにコマンドラインを含める` の手順で有効にすることが出来ます。
283 |
284 | Sigmaルールの約半分は、コマンドラインオプションを有効にしたプロセス作成に依存しています。Sysmonをインストールし、プロセス作成を監視するように設定していない場合は、Securityログでプロセス作成イベントを有効にした方が良いです。
285 |
286 | ボリューム: `高`
287 |
288 | デフォルトの設定: `監査なし`
289 |
290 | 推奨設定: Sysmonがインストールされていない場合は`成功と失敗`
291 |
292 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
293 | | :---: | :---: | :---: | :---: | :---: | :---: |
294 | | 4688 | プロセス作成 | 1000+ | あり | Info~Crit | |
295 | | 4696 | プライマリトークンがプロセスに割り当てされた | 0 | なし | Info | Win 7/2008 R2 からこのイベントは非推奨になっている。そのため、Vista/2008 でのみ生成される。|
296 |
297 | ### 3.3 プロセス終了
298 |
299 | ファイル容量を節約するために、無効にしておくと良いでしょう。
300 |
301 | ボリューム: `高`
302 |
303 | デフォルトの設定: `監査なし`
304 |
305 | 推奨設定: プロセスのライフスパンを追跡したいのでなければ`監査なし`
306 |
307 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
308 | | :---: | :---: | :---: | :---: | :---: | :---: |
309 | | 4689 | プロセス終了 | 1 | 現在はなし | Info | |
310 |
311 | ### 3.4 RPCイベント
312 |
313 | ボリューム: `RPCサーバでは高い` (Microsoftによると)
314 |
315 | デフォルトの設定: `監査なし`
316 |
317 | 推奨設定: `不明。テストが必要。`
318 |
319 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
320 | | :---: | :---: | :---: | :---: | :---: | :---: |
321 | | 5712 | RPCの試行 | 0 | 現在はなし | ? | RPC要求の受信が行われたときに記録される。 |
322 |
323 | ### 3.5 トークン権限の調整
324 |
325 | ボリューム: `不明`
326 |
327 | デフォルトの設定: `監査なし`
328 |
329 | 推奨設定: `不明。テストが必要。`
330 |
331 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
332 | | :---: | :---: | :---: | :---: | :---: | :---: |
333 | | 4703 | ユーザ権利の調整 | 0 | 現在はなし | Info | おそらく稀なイベント。 |
334 |
335 | ## 4. DS (ディレクトリサービス) アクセス
336 |
337 | **注意:ドメインコントローラのみ有効**
338 |
339 | ### 4.1 ディレクトリサービスアクセス
340 |
341 | ボリューム: `高`
342 |
343 | デフォルトの設定: `クライアントOS: 監査なし` | `サーバOS: 成功`
344 |
345 | 推奨設定: `クライアントOS: 監査なし` | `ADDS Server: 成功と失敗`
346 |
347 | Sigmaルールの例:
348 | * `(4662) (Crit) AD Object WriteDAC Access`
349 | * `(4662) (Crit) Active Directory Replication from Non Machine Account`
350 | * `(4662) (Med) AD User Enumeration`: マシンアカウントでないアカウントからドメインユーザに対してのアクセスを検知する("Everyone"プリンシパルに対するユーザオブジェクトで「すべてのプロパティの読み取り」権限が必要)
351 | * `(4662) (High) DPAPI Domain Backup Key Extraction`: ドメインコントローラからLSAシークレットDPAPIドメインバックアップキーがツールによって取り出されたことを検知する
352 | * `(4662) (Med) WMI Persistence`: WMIを通じたautostartsマルウェアを検知する
353 |
354 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
355 | | :---: | :---: | :---: | :---: | :---: | :---: |
356 | | 4661 | オブジェクトハンドル要求 | 2 | 現在はなし | Info~Crit | |
357 | | 4662 | オブジェクトに対する操作 | 6 | 現在はなし | Info~Crit | |
358 |
359 | ### 4.2 ディレクトリサービスの変更
360 |
361 | ボリューム: `高`
362 |
363 | デフォルトの設定: `監査なし`
364 |
365 | 推奨設定: `クライアントOS: 監査なし` | `ADDS Server: 成功と失敗`
366 |
367 | Sigmaルールの例:
368 | * `(5136) (High) Powerview Add-DomainObjectAcl DCSync AD Extend Right`: DCSyncに関連付けられた権限を通常のユーザまたはマシンアカウントに付与するバックドアドメインオブジェクト
369 | * `(5136) (High) Active Directory User Backdoors`: 資格情報を使用せずに別のユーザまたはコンピュータのアカウントを制御できるシナリオを検出する
370 | * `(5136) (Med) Possible DC Shadow`
371 | * `(5136) (High) Suspicious LDAP-Attributes Used`: 攻撃者がLDAP属性を介してCobalt Strike ビーコンデータをルーティング可能にするC2ツール、LDAPFraggerを検出する
372 |
373 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
374 | | :---: | :---: | :---: | :---: | :---: | :---: |
375 | | 5136 | ディレクトリサービスオブジェクトの変更 | 6 | 現在はなし | Info~Crit | |
376 | | 5137 | ディレクトリサービスオブジェクトの作成 | 0 | 現在はなし | Info | |
377 | | 5138 | ディレクトリサービスオブジェクトの復元 | 0 | 現在はなし | Info | |
378 | | 5139 | ディレクトリサービスオブジェクトの移動 | 0 | 現在はなし | Info | |
379 | | 5141 | ディレクトリサービスオブジェクトの削除 | 0 | 現在はなし | Info | |
380 |
381 | ## 5. ログオン/ログオフ
382 |
383 | ### 5.1 アカウントロックアウト
384 |
385 | ボリューム: `低`
386 |
387 | デフォルトの設定: `成功`
388 |
389 | 推奨設定: `成功と失敗`
390 |
391 | 現在、アカウントロックアウトのSigmaルールはありません。
392 |
393 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
394 | | :---: | :---: | :---: | :---: | :---: | :---: |
395 | | 4625 | ロックアウトによるログオンに失敗 | 0 | あり | Med | Substatus: `0xC0000234`. おそらく稀なイベント。 |
396 |
397 | ### 5.2 グループメンバーシップ
398 |
399 | ユーザがログインしたときにどのグループに属しているかを記録します。
400 | ACSCのガイドでは、`成功失敗`が推奨されているが、ユーザがどのグループに属しているか簡単に調べられる場合はおそらく`監査なし`でも良いです。
401 | ユーザが管理者権限を持っているかどうかは、`4672`管理者ログオンイベントで確認することもできます。
402 |
403 | ボリューム: `ログオンがある度に、ユーザのグループメンバーシップについてのログが記録される`
404 |
405 | デフォルトの設定: `監査なし`
406 |
407 | 推奨設定: `監査なし`
408 |
409 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
410 | | :---: | :---: | :---: | :---: | :---: | :---: |
411 | | 4627 | グループメンバーシップ情報 | 0 | 現在はなし | Info | |
412 |
413 | ### 5.3 ログオフ
414 |
415 | `4634`のログオフイベントは、ログオンセッションの終了と考えることができます。
416 | ユーザがログオフをしていない場合(例:RDPクライアントを閉じただけ、管理者によりログオフさせられた、セッションがタイムアウトした等)は、`4647`(User Initiated Logoff:ユーザによるログオフ開始)イベントは記録されません。
417 |
418 | ボリューム: `高`
419 |
420 | デフォルトの設定: `成功`
421 |
422 | 推奨設定: `成功`
423 |
424 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
425 | | :---: | :---: | :---: | :---: | :---: | :---: |
426 | | 4634 | ログオフ | 0 | あり | Info | |
427 | | 4647 | ユーザがログオフした | 0 | あり | Info | |
428 |
429 | ### 5.4 ログオン
430 |
431 | ボリューム: `クライアントOSでは低。ドメインコントローラやネットワークサーバでは中`
432 |
433 | デフォルトの設定: `クライアントOS: 成功` | `サーバOS: 成功と失敗`
434 |
435 | 推奨設定: `成功と失敗`
436 |
437 | Sigmaルールの例:
438 | * `(4624) (Low) Admin User Remote Logon`
439 | * `(4624) (High) Successful Overpass the Hash Attempt`
440 | * `(4624) (Med) Pass the Hash Activity`
441 | * `(4624) (Med) RDP Login from Localhost`
442 | * `(4624) (Low) Login with WMI`
443 | * `(4624) (High) KrbRelayUp Attack Pattern`
444 | * `(4624) (High) RottenPotato Like Attack Pattern`
445 | * `(4625) (Med) Failed Logon From Public IP`
446 | * `(4648) (Med) Suspicious Remote Logon with Explicit Credentials`
447 | * `(4624) (High) Scanner PoC for CVE-2019-0708 RDP RCE Vuln`: 脆弱性BlueKeepのスキャンを検出する
448 | * `(4625) (Med) Failed Logon From Public IP`
449 | * `(4625) (Med) Multiple Users Failing to Authenticate from Single Process`
450 | * `(4625) (Med) Multiple Users Remotely Failing To Authenticate From Single Source`
451 |
452 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
453 | | :---: | :---: | :---: | :---: | :---: | :---: |
454 | | 4624 | ログオン | 11 | あり | Info~High | |
455 | | 4625 | ログオンに失敗 | 4 | あり | Info~Med | |
456 | | 4648 | 明示的なログオン | 2 | あり | Info~Med | 発信元のホストに記録されます。 |
457 |
458 | ### 5.5 その他のログオン/ログオフイベント
459 |
460 | ボリューム: `低`
461 |
462 | デフォルトの設定: `監査なし`
463 |
464 | 推奨設定: `成功と失敗`
465 |
466 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
467 | | :---: | :---: | :---: | :---: | :---: | :---: |
468 | | 4649 | Kerberos再生攻撃が検出された | 0 | 現在はなし | Med | おそらく稀なイベント。 |
469 | | 4778 | セッションがウィンドウステーションに再接続された | 0 | あり | Info | RDPもしくはユーザの簡易切り替えのログが送信元の端末に記録される。 |
470 | | 4779 | セッションがウィンドウステーションから切断された | 0 | あり | Info | RDPもしくはユーザの簡易切り替えのログが送信元の端末に記録される。 |
471 | | 4800 | 端末がロックされた | 0 | 現在はなし | Info | |
472 | | 4801 | 端末のロックが解除された | 0 | 現在はなし | Info | |
473 | | 4802 | スクリーンセーバーが開始された | 0 | 現在はなし | Info | |
474 | | 4803 | スクリーンセーバーが停止された | 0 | 現在はなし | Info | |
475 | | 5378 | 要求された資格情報の委任は、ポリシーによって許可されない | 0 | なし | Info | 通常、WinRMダブルホップセッションのCredSSP委任が正しく設定されていない場合に発生する。 |
476 | | 5632 | 無線ネットワークへの802.1x認証 | 0 | 現在はなし | Info | |
477 | | 5633 | 有線ネットワークへの802.1x認証 | 0 | 現在はなし | Info | |
478 |
479 | ### 5.6 特殊なログオン
480 |
481 | 「特別なグループ」と「特別な権限」は、「管理者グループ」と「管理者権限」と考えて良いです。
482 |
483 | ボリューム: `クライアントOSでは低。DCやネットワークサーバでは中`
484 |
485 | デフォルトの設定: `成功`
486 |
487 | 推奨設定: `成功と失敗`
488 |
489 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
490 | | :---: | :---: | :---: | :---: | :---: | :---: |
491 | | 4672 | 管理者ログオン | 0 | あり | Info | |
492 | | 4964 | 管理者グループからのログオン | 0 | 現在はなし | Info | おそらく稀なイベント。 |
493 |
494 | ## 6. オブジェクトアクセス
495 |
496 | ### 6.1 証明書サービス
497 |
498 | > **注意: AD CSロールサービスを提供するサーバに対してのみ有効にします。**
499 |
500 | ボリューム: `低〜中`
501 |
502 | デフォルトの設定: `監査なし`
503 |
504 | 推奨設定: ADCSロールのサーバでは`成功と失敗`
505 |
506 | Sigmaルールの例:
507 | * `(4898, 4899) (High) ADCS Certificate Template Configuration Vulnerability with Risky EKU`
508 | * `(4898, 4899) (High) ADCS Certificate Template Configuration Vulnerability`
509 |
510 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
511 | | :---: | :---: | :---: | :---: | :---: | :---: |
512 | | 4898 | 証明書サービスがテンプレートをロードした | 2 | 現在はなし | Info~High | |
513 | | 4899 | 証明書サービスがテンプレートの更新 | 2 | 現在はなし | Info~High | |
514 |
515 | > **注意: 多くのイベントIDが有効になります。SigmaルールがあるイベントIDだけ上記で記載されています。**
516 |
517 | ### 6.2 詳細なファイル共有
518 |
519 | ボリューム: ファイルサーバやDCでは非常に高いが、誰がどのファイルにアクセスしているかを追跡したり、さまざまな横展開等を検出したい場合は必要かもしれない。
520 |
521 | > **注意: 共有フォルダにはSACL(システムアクセス制御リスト)がないので、すべてログに記録される。**
522 |
523 | デフォルトの設定: `監査なし`
524 |
525 | 推奨設定: ノイズが多いため`監査なし`。可能であれば、有効にした方が良い。
526 |
527 | Sigmaルールの例:
528 | * `(5145) (Med) Remote Task Creation via ATSVC Named Pipe`
529 | * `(5145) (High) Persistence and Execution at Scale via GPO Scheduled Task`
530 | * `(5145) (High) Impacket PsExec Execution`
531 | * `(5145) (High) Possible Impacket SecretDump Remote Activity`
532 | * `(5145) (High) First Time Seen Remote Named Pipe`
533 | * `(5145) (High) Possible PetitPotam Coerce Authentication Attempt`
534 | * `(5145) (Med) Suspicious Access to Sensitive File Extensions`
535 | * `(5145) (Med) Transferring Files with Credential Data via Network Shares`
536 |
537 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
538 | | :---: | :---: | :---: | :---: | :---: | :---: |
539 | | 5145 | ネットワーク共有へのファイルアクセス | 17 | あり | Info~High | |
540 |
541 | ### 6.3 ファイル共有
542 |
543 | ボリューム: `ファイルサーバやドメインコントローラでは高`
544 |
545 | デフォルトの設定: `監査なし`
546 |
547 | 推奨設定: `成功と失敗`
548 |
549 | Sigmaルールの例:
550 | * `(5140) (Low) Access to ADMIN$ Share`
551 |
552 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
553 | | :---: | :---: | :---: | :---: | :---: | :---: |
554 | | 5140 | ネットワーク共有への接続 | 1 | あり | Info~High | ファイルシステム監査と組み合わせることで、どのファイルがアクセスされたかを追跡できる。 |
555 | | 5142 | ネットワーク共有が作成された | 0 | 現在はなし | Info | |
556 | | 5143 | ネットワーク共有が変更された | 0 | 現在はなし | Info | |
557 | | 5144 | ネットワーク共有が削除された | 0 | 現在はなし | Info | |
558 | | 5168 | SMB/SMB2のSPNチェックに失敗 | 0 | 現在はなし | Info | おそらく稀なイベント。 |
559 |
560 | ### 6.4 ファイルシステム
561 |
562 | アクセスログを記録するためには、ファイルやフォルダーに別途監査権限を設定する必要があります。
563 | 例えば、右クリックで「プロパティ」→「セキュリティ」タブ→「詳細設定」→「監査」タブを開き、プリンシパルと監視する権限を追加することで記録できます。
564 | 多くのファイルをログに記録するとノイズが多くなるため、機密ファイルへのアクセスを監視する場合にのみ使用することをお勧めします。
565 |
566 | ボリューム: `SACL設定による`
567 |
568 | デフォルトの設定: `監査なし`
569 |
570 | 推奨設定: `センシティブなファイルにSACLを設定すること`
571 |
572 | Sigmaルールの例:
573 | * `(4663) (Med) ISO Image Mount`
574 | * `(4663) (High) Suspicious Teams Application Related ObjectAcess Event`: MS Teamsの認証トークンへのアクセスを検知する
575 |
576 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
577 | | :---: | :---: | :---: | :---: | :---: | :---: |
578 | | 4656 | オブジェクトハンドル要求 | 0 | 現在はなし | Info | プロセスに適切な権限がない場合、失敗する。これらのイベントを記録するために、`ハンドル操作` サブカテゴリを有効化する必要がある。 |
579 | | 4658 | オブジェクトハンドルが閉じられた | 0 | 現在はなし | Info | これらのイベントを記録するために、`ハンドル操作` サブカテゴリを有効化する必要がある。|
580 | | 4660 | オブジェクト削除 | 0 | 現在はなし | Info | |
581 | | 4663 | オブジェクトアクセス | 2 | 現在はなし | Info~High | 4656と異なって、成功イベントしか記録されない。 |
582 | | 4664 | ハードリンク作成の試行 | 0 | 現在はなし | Info | おそらく稀なイベント。 |
583 | | 4670 | オブジェクト権限の変更 | 0 | 現在はなし | Info | |
584 | | 4985 | トランザクション状態の変更 | 0 | なし | Info | トランザクションマネージャに使用され、セキュリティには関係ない。 |
585 | | 5051 | ファイルが仮想化された | 0 | なし | Info | LUAFVの仮想化時にまれに発生する。セキュリティには関係ない。おそらく稀なイベント。 |
586 |
587 | > **注意: イベントID 4656、4658、4660、4663は、レジストリ、ファイルシステムオブジェクトへのアクセス、リムーバブルストレージへのアクセスにも使用されていますが、個別に設定する必要があります。**
588 |
589 | ### 6.5 フィルタリングプラットフォームの接続
590 |
591 | WFP(Windows Filtering Platform)がポートバインディングやネットワーク接続を許可または遮断したときのログが記録されます。
592 |
593 | ボリューム: `高`
594 |
595 | デフォルトの設定: `監査なし`
596 |
597 | 推奨設定: 十分な容量があり、sysmonでネットワーク接続を監視していない場合は、`成功失敗`を推奨する。ただ、イベントが多発してしまう可能性が高い。
598 |
599 | Sigmaルールの例:
600 | * `(5156) (Med) Enumeration via the Global Catalog`: Bloodhound等のツールを検知する
601 | * `(5156) (High) RDP over Reverse SSH Tunnel WFP`
602 | * `(5156) (High) Remote PowerShell Sessions Network Connections (WinRM)`
603 | * `(5156) (High) Suspicious Outbound Kerberos Connection`: Kerberosのデフォルトポートを介して、ラテラルムーブメントの可能性を示す不審なアウトバウンド通信、または委任を介した最初の段階のPrivEscを検出する
604 |
605 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
606 | | :---: | :---: | :---: | :---: | :---: | :---: |
607 | | 5031 | WFPが受信接続を遮断した | 0 | 現在はなし | Info | |
608 | | 5150 | WFPがパケットを遮断した | 0 | 現在はなし | Info | |
609 | | 5151 | より限定的なWFPフィルターがパケットを遮断した | 0 | 現在はなし | Info | |
610 | | 5154 | プロセスが通信を待ち受けている | 0 | 現在はなし | Info | |
611 | | 5155 | プロセスの通信待受が拒否された | 0 | 現在はなし | Info | |
612 | | 5156 | ネットワーク接続 | 4 | 現在はなし | Info~High | |
613 | | 5157 | ネットワーク接続がブロックされた | 0 | 現在はなし | Info | |
614 | | 5158 | プロセスがポートにバインドした | 0 | 現在はなし | Info | |
615 | | 5159 | プロセスのポートバインドが拒否された | 0 | 現在はなし | Info | |
616 |
617 | ### 6.6 フィルタリングプラットフォームパケットの破棄
618 |
619 | ボリューム: `高`
620 |
621 | デフォルトの設定: `監査なし`
622 |
623 | 推奨設定: 十分な容量があり、sysmonでネットワーク接続を監視していない場合は、`成功失敗`を推奨する。ただ、イベントが多発してしまう可能性が高い。
624 |
625 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
626 | | :---: | :---: | :---: | :---: | :---: | :---: |
627 | | 5152 | WFPがパケットを遮断した | 0 | 現在はなし | Info | |
628 | | 5153 | より限定的なWFPフィルターがパケットを遮断した | 0 | 現在はなし | Info | |
629 |
630 | ### 6.7 ハンドル操作
631 |
632 | このサブカテゴリを有効にすると、他のサブカテゴリの`4656`、`4658`、`4661`のイベントが有効になります。また、追加のイベント`4690`も有効になりますが、このイベントは調査には役立ちません。他のサブカテゴリでより有用なイベントを有効にするために、このサブカテゴリを有効にすることが推奨されます。
633 |
634 | デフォルトの設定: `監査なし`
635 |
636 | 推奨設定: `成功と失敗`
637 |
638 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
639 | | :---: | :---: | :---: | :---: | :---: | :---: |
640 | | 4690 | ハンドルをオブジェクトに複製しようとした | 0 | なし | Info | セキュリティには関係しない。|
641 |
642 | ### 6.8 カーネルオブジェクト
643 |
644 | この機能は、主にカーネル開発者向けです。
645 | ミューテックス、シンボリックリンク、名前付きパイプ等々のカーネルオブジェクトにアクセスしようとするイベントが記録されます。
646 | SACLを持つカーネル・オブジェクトだけが、セキュリティ監査イベントを生成します。
647 | デフォルトでは、カーネルオブジェクトにSACLが設定されていないため、監査されません。`グローバルシステムオブジェクトのアクセスを監査する` (GPO: `コンピューターの構成 > Windowsの設定 > セキュリティの設定 > ローカルポリシー > セキュリティオプション > 監査: グローバルシステムオブジェクトのアクセスを監査する`)を有効にすると、すべてのカーネルオブジェクトに対してSACLが設定され、すべてのカーネルオブジェクトへのアクセスが記録されます。しかし、不要なイベントを大量に発生させる可能性があるため、推奨できません。Windows 11では、監視すべきlsassプロセスへのアクセスはデフォルトで有効になっているようです。
648 |
649 | ボリューム: `グローバルシステムオブジェクトのアクセスを監査するが有効の場合、高`
650 |
651 | デフォルトの設定: `監査なし`
652 |
653 | 推奨設定: `成功と失敗`。ただし、`4663: オブジェクトアクセス`イベントが大量に生成されるため、`グローバルシステムオブジェクトのアクセスを監査する`の有効化を推奨しない。
654 |
655 | Sigmaルールの例:
656 | * `(4656) (High) Generic Password Dumper Activity on LSASS`
657 | * `(4663) (Med) Suspicious Multiple File Rename Or Delete Occurred`: Detects multiple file rename or delete events occurrence within a specified period of time by a same user (these events may indicate ransomware activity).
658 |
659 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
660 | | :---: | :---: | :---: | :---: | :---: | :---: |
661 | | 4656 | オブジェクトハンドル要求 | 4 | 現在はなし | Info~High | このイベントを記録するには、`ハンドルの操作`サブカテゴリを有効にする必要がある。 |
662 | | 4658 | オブジェクトハンドルが閉じられた | 0 | 現在はなし | Info | このイベントを記録するには、`ハンドルの操作`サブカテゴリを有効にする必要がある。 |
663 | | 4660 | オブジェクト削除 | 0 | 現在はなし | Info | |
664 | | 4663 | オブジェクトアクセス | 2 | 現在はなし | Info | |
665 |
666 | > **注意: イベントID 4656、4658、4660、4663は、レジストリ、ファイルシステムオブジェクトへのアクセス、リムーバブルストレージへのアクセスにも使用されていますが、個別に設定する必要があります。**
667 |
668 | ### 6.9 その他のオブジェクトアクセスイベント
669 |
670 | マルウェアは、しばしば永続性と横展開のためにタスクを悪用するので、有効にすることが重要です。
671 |
672 | ボリューム: `低`
673 |
674 | デフォルトの設定: `監査なし`
675 |
676 | 推奨設定: `成功と失敗`
677 |
678 | Sigmaルールの例:
679 | * `(4698) (Low) Rare Schtasks Creations`: パスワードダンパー、バックドアのインストール、その他の悪意のあるコード実行の可能性がある、タイムフレーム中に数回しか実行されないスケジュールタスクの作成を検出する
680 | * `(4699) (Low) Scheduled Task Deletion`
681 |
682 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
683 | | :---: | :---: | :---: | :---: | :---: | :---: |
684 | | 4691 | オブジェクトへの間接アクセス | 0 | なし | Info | おそらく稀なイベント。 |
685 | | 4698 | タスク作成 | 2 | あり | Info~High | |
686 | | 4699 | タスク削除 | 1 | あり | Info~Low | |
687 | | 4700 | タスクの有効化 | 0 | 現在はなし | Info | |
688 | | 4701 | タスクの無効化 | 1 | 現在はなし | Info | |
689 | | 4702 | タスク更新 | 0 | 現在はなし | Info | |
690 | | 5148 | WFPがDoS攻撃を検知し、ソースパケットを遮断している | 0 | 現在はなし | Info | |
691 | | 5149 | DoS攻撃は沈静化し、通常の処理が再開された | 0 | 現在はなし | Info | |
692 | | 5888 | COM+カタログオブジェクト変更 | 0 | 現在はなし | Info | |
693 | | 5889 | COM+カタログオブジェクト削除 | 0 | 現在はなし | Info | |
694 | | 5890 | COM+カタログオブジェクト作成 | 0 | 現在はなし | Info | |
695 |
696 | ### 6.10 レジストリ
697 |
698 | 多くの攻撃やマルウェアはレジストリを悪用するため、レジストリに証拠がよく残されますが、検知に必要なものだけをログに残すことは難しく、グローバルにすべてのレジストリへのアクセスを有効にすると、イベントの量が極端に増え、パフォーマンスが低下するリスクもあります。
699 |
700 | ボリューム: `SACLの設定による`
701 |
702 | デフォルトの設定: `監査なし`
703 |
704 | 推奨設定: 監視したいレジストリキーのみSACLを設定すること
705 |
706 | Sigmaルールの例:
707 | * `(4656) (High) SAM Registry Hive Handle Request`: 攻撃者がSAMレジストリハイブにアクセスしてパスワードハッシュ取得を試行した
708 | * `(4656) (Med) SCM Database Handle Failure`: SCM データベースのハンドルを取得できない非システム ユーザを検出する
709 | * `(4657) (High) COMPlus_ETWEnabled Registry Modification`: 攻撃者の可能性のあるユーザによる、ロードされた.NETアセンブリを記録するETW プロバイダーの停止
710 | * `(4657) (High) NetNTLM Downgrade Attack`
711 | * `(4657) (High) Sysmon Channel Reference Deletion`: 脅威アクターの可能性のあるユーザによる、Sysmonマニフェスト改ざん、無効化
712 | * `(4657) (High) Creation of a Local Hidden User Account by Registry`
713 | * `(4657) (High) UAC Bypass via Sdclt`
714 | * `(4657) (High) Disable Security Events Logging Adding Reg Key MiniNt`
715 | * `(4657) (Crit) PrinterNightmare Mimimkatz Driver Name`
716 | * `(4657) (Crit) Security Support Provider (SSP) Added to LSA Configuration`: レジストリへのSSP追加を検出する。再起動またはAPI呼び出し時に、SSP DLLがWindowsに保存されている暗号化されたパスワードと平文のパスワードにアクセス可能になる
717 | * `(4657) (High) Suspicious Run Key from Download`
718 | * `(4657) (High) Suspicious Camera and Microphone Access`
719 | * `(4657) (Low) Usage of Sysinternals Tools`
720 | * `(4657) (Med) Common Autorun Keys Modification`
721 | * `(4657) (High) Disable Sysmon Event Logging Via Registry`
722 |
723 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
724 | | :---: | :---: | :---: | :---: | :---: | :---: |
725 | | 4656 | オブジェクトハンドル要求 | 2 | 現在はなし | Info~High | このイベントを記録するには、`ハンドルの操作`サブカテゴリを有効にする必要がある。 |
726 | | 4657 | レジストリ値の変更 | 182 | 現在はなし | Info~High | |
727 | | 4658 | オブジェクトハンドルが閉じられた | 0 | なし | Info | このイベントを記録するには、`ハンドルの操作`サブカテゴリを有効にする必要がある。 |
728 | | 4660 | オブジェクト削除 | 0 | 現在はなし | Info | |
729 | | 4663 | オブジェクトアクセス | 0 | Not Yet | Info~? | |
730 | | 4670 | オブジェクト権限の変更 | 0 | 現在はなし | Info~? | |
731 |
732 | > **注意: イベントID 4656、4658、4660、4663、4670は、カーネル、ファイルシステムオブジェクトへのアクセス、リムーバブルストレージへのアクセスにも使用されていますが、個別に設定する必要があります。**
733 |
734 | ### 6.11 リムーバブル記憶域
735 |
736 | SACLの設定に関係なく、リムーバブルストレージへのすべてのファイルアクセスがログに記録されます。
737 | USBストレージ経由でデータを流出させる従業員などを追跡したい場合は有効にすると良いでしょう。
738 |
739 | ボリューム: `リムーバブルストレージの使用量に依存する`
740 |
741 | デフォルトの設定: `監査なし`
742 |
743 | 推奨設定: 外付けデバイスの使用を監視したい場合は`成功と失敗`
744 |
745 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
746 | | :---: | :---: | :---: | :---: | :---: | :---: |
747 | | 4656 | オブジェクトハンドル要求 | 0 | 現在はなし | Info | このイベントを記録するには、`ハンドルの操作`サブカテゴリを有効にする必要がある。 |
748 | | 4658 | オブジェクトハンドルが閉じられた | 0 | 現在はなし | Info | このイベントを記録するには、`ハンドルの操作`サブカテゴリを有効にする必要がある。 |
749 | | 4663 | オブジェクトアクセス | 0 | 現在はなし | Info |
750 |
751 | **注意: イベントID 4656、4658、4663は、レジストリ、カーネル、ファイルシステムオブジェクトへのアクセスにも使用されていますが、個別に設定する必要があります。**
752 |
753 | ### 6.12 SAM (セキュリティアカウントマネージャー)
754 |
755 | これは、ユーザおよびコンピュータアカウント、グループ、セキュリティ記述子などのSecurity Account Manager(SAMオブジェクトにアクセスしようとする試みを記録します。
756 |
757 | ボリューム: `ドメインコントローラでは高`
758 |
759 | デフォルトの設定: `監査なし`
760 |
761 | 推奨設定: 可能であれば、`成功失敗`だが、ノイズが大きくなりすぎる可能性があるので、事前にテストしておく必要がある。
762 |
763 | Sigmaルールの例:
764 | * `(4661) (High) Reconnaissance Activity`: "net user administrator /domain" や "net group domain admins /domain"の検出
765 | * `(4661) (High) AD Privileged Users or Groups Reconnaissance`: イベントID 4661に基づき、特権ユーザまたはグループの偵察を検出。
766 |
767 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
768 | | :---: | :---: | :---: | :---: | :---: | :---: |
769 | | 4661 | オブジェクトハンドル要求 | 2 | 現在はなし | Info~High | このイベントを記録するには、`ハンドルの操作`サブカテゴリを有効にする必要がある。 |
770 |
771 | ## 7. ポリシーの変更
772 |
773 | ### 7.1 監査ポリシーの変更
774 |
775 | 監査される監査ポリシーの変更には、次のものが含まれる:
776 | * 監査ポリシーオブジェクトのアクセス許可と監査設定の変更 (`auditpol /set /sd`コマンドの使用)
777 | * システム監査ポリシーの変更
778 | * セキュリティイベントソースの登録と登録解除
779 | * ユーザごとの監査設定の変更
780 | * CrashOnAuditFail値の変更
781 | * オブジェクトの監査設定の変更 (例: ファイルまたはレジストリキーのシステムアクセス制御リスト(SACL)の変更)
782 | * 特別なグループリスト内の変更
783 |
784 | ボリューム: `低`
785 |
786 | デフォルトの設定: `成功`
787 |
788 | 推奨設定: `成功と失敗`
789 |
790 | Sigmaルールの例:
791 | * `(4719) (High) Disabling Windows Event Auditing`: ローカルGPOポリシーによるアンチフォレンジックの検知。
792 |
793 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
794 | | :---: | :---: | :---: | :---: | :---: | :---: |
795 | | 4715 | オブジェクトの監査ポリシー(SACL)が変更された | 0 | 現在はなし | Info | 監査ポリシーの変更の設定に関係なくログが記録される。 |
796 | | 4719 | システム監査ポリシーが変更された | 1 | 現在はなし | Info~High | 監査ポリシーの変更の設定に関係なくログが記録される。 |
797 | | 4817 | オブジェクトの監査設定が変更された | 0 | 現在はなし | Info | 監査ポリシーの変更の設定に関係なくログが記録される。 |
798 | | 4902 | ユーザごとの監査ポリシーテーブルが作成された | 0 | 現在はなし | Info | おそらく稀なイベント。 |
799 | | 4904 | セキュリティイベントソースの登録が試行された | 0 | 現在はなし | Info | |
800 | | 4905 | セキュリティイベントソース登録の解除が試行された | 0 | 現在はなし | Info | |
801 | | 4906 | CrashOnAuditFailの値が変更された | 0 | なし | Info | 監査ポリシーの変更の設定に関係なくログが記録される。 |
802 | | 4907 | オブジェクトの監査設定が変更された | 0 | 現在はなし | Info | おそらく稀なイベント。 |
803 | | 4908 | 特別なグループログオンテーブルが変更された | 0 | 現在はなし | Low | 監査ポリシーの変更の設定に関係なくログが記録される。 |
804 | | 4912 | ユーザごとの監査ポリシーが変更された | 0 | 現在はなし | Low | 監査ポリシーの変更の設定に関係なくログが記録される。 |
805 |
806 | ### 7.2 認証ポリシーの変更
807 |
808 | 認証ポリシーに加えた変更は次のとおり:
809 | * フォレストとドメインの信頼の作成、変更、および削除。
810 | * `コンピューターの構成 > Windows設定 > アカウントポリシー > Kerberosポリシー`のKerberosポリシー設定に対する変更。
811 | * ユーザまたはグループに次のユーザ ログオン権限が付与されている場合。
812 | * ネットワークからこのコンピューターにアクセスする
813 | * ローカルでのログオンを許可する
814 | * リモートデスクトップ経由のログオンを許可する
815 | * バッチジョブとしてのログオン
816 | * サービスとしてのログオン
817 | * 追加された信頼が既存の名前空間名と衝突する場合など、名前空間の競合。
818 |
819 | この設定は、ドメインレベルおよびフォレストレベルの信頼と、ユーザアカウントまたはグループに付与される特権の変化を追跡するのに便利です。
820 |
821 | ボリューム: `低`
822 |
823 | デフォルトの設定: `成功`
824 |
825 | 推奨設定: `成功と失敗`
826 |
827 | Sigmaルールの例:
828 | * `(4706) (Med) Addition of Domain Trusts`: ドメイン追加は通常は行われないため、正当性を確認する必要がある
829 |
830 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
831 | | :---: | :---: | :---: | :---: | :---: | :---: |
832 | | 4670 | オブジェクト権限の変更 | 0 | 現在はなし | Info | |
833 | | 4706 | ドメインに新しい信頼が作成された | 1 | 現在はなし | Info~Med | |
834 | | 4707 | ドメインへの信頼が削除された | 0 | 現在はなし | Med | |
835 | | 4713 | Kerberosポリシーが変更された | 0 | 現在はなし | Info | |
836 | | 4716 | 信頼できるドメイン情報が変更された | 0 | 現在はなし | Med | |
837 | | 4717 | システムセキュリティアクセスがアカウントに付与された | 0 | 現在はなし | Info | |
838 | | 4718 | システムセキュリティアクセスがアカウントから削除された | 0 | 現在はなし | Info | |
839 | | 4739 | ドメイン ポリシーが変更された | 0 | 現在はなし | Med | |
840 | | 4864 | 名前空間の競合が検出された | 0 | 現在はなし | Info | |
841 | | 4865 | 信頼できるフォレスト情報エントリが追加された | 0 | 現在はなし | Info | |
842 | | 4866 | 信頼できるフォレスト情報エントリが削除された | 0 | 現在はなし | Info | |
843 | | 4867 | 信頼できるフォレスト情報エントリが変更された | 0 | 現在はなし | Info | |
844 |
845 | ### 7.3 承認ポリシーの変更
846 |
847 | ユーザ権限ポリシーにおけるユーザ権限の割り当てと削除、セキュリティトークンオブジェクトの許可変更、リソース属性の変更、ファイルシステムオブジェクトのセントラルアクセスポリシーの変更を監査します。
848 | ユーザ権限ポリシーの変更、またはファイルシステムオブジェクトに適用されるリソース属性やセントラルアクセスポリシーの変更に関連する情報を取得することができます。
849 | ただし、AdjustPrivilegesToken APIを通じてシステム権限の変更を行うアプリケーションやシステムサービスを使用している場合は、イベントが大量に発生するため、有効にすることは推奨されません。
850 |
851 | ボリューム: `中〜高`
852 |
853 | デフォルトの設定: `監査なし`
854 |
855 | 推奨設定: `不明。テストが必要。`
856 |
857 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
858 | | :---: | :---: | :---: | :---: | :---: | :---: |
859 | | 4703 | ユーザ権利の調整 | 0 | | | Windows 10では、このイベントは、トークン権限を動的に調整するアプリケーションやサービスによって生成されます。例えば、Microsoft Endpoint Configuration Managerは、定期的にWMIクエリーを実行し、svchost.exeプロセスから大量のイベントを発生させます。 |
860 | | 4704 | ユーザ権限の割り当て | 0 | | | |
861 | | 4705 | ユーザ権限の削除 | 0 | | | |
862 | | 4670 | オブジェクト権限の変更 | 0 | | | |
863 | | 4911 | オブジェクトのリソース属性が変更された | 0 | | | |
864 | | 4913 | オブジェクトの中央アクセスポリシーが変更された | 0 | | | |
865 |
866 | ### 7.4 フィルタリングプラットフォームポリシーの変更
867 |
868 | Windows Filtering Platform(WFP)の変更によって発生する以下のようなイベントを監査します:
869 | * IPsecサービスの状態。
870 | * IPsecポリシー設定の変更。
871 | * フィルタープラットフォームベースWindowsポリシー設定に対する変更点。
872 | * WFPプロバイダーとエンジンに対する変更。
873 |
874 | ボリューム: `低`
875 |
876 | デフォルトの設定: `監査なし`
877 |
878 | 推奨設定: `不明。テストが必要。`
879 |
880 | > このサブカテゴリで有効にされるイベントが多すぎて、リストアップできません。現時点では、これらのイベントIDを使用するSigmaルールはありません。
881 |
882 | ### 7.5 MPSSVCルールレベルポリシーの変更
883 |
884 | 「MPSSVCルールレベルポリシーの変更の監査」は、Microsoft Protection Service (MPSSVC.exe)のポリシールールが変更されたときに、OSが監査イベントを生成するかどうかを決定します。
885 | Windowsファイアウォールで使用されるMicrosoft Protection Serviceは、マルウェアからコンピュータの脅威を防ぐために不可欠なものです。
886 | 記録されるアクティビティは以下の通り:
887 | * ファイアウォール(`FW`)開始時のポリシー
888 | * FWルールの変更
889 | * FW例外リストの変更
890 | * FW設定の変更
891 | * FWルールの適用と無視
892 | * FWのグループポリシー設定の変更
893 |
894 | FWルールの変更は、端末のセキュリティ状態を把握し、ネットワーク攻撃からどの程度保護されているかを知るために重要です。
895 |
896 | ボリューム: `低`
897 |
898 | デフォルトの設定: `監査なし`
899 |
900 | 推奨設定: `不明。テストが必要。`
901 |
902 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
903 | | :---: | :---: | :---: | :---: | :---: | :---: |
904 | | 4944 | FW起動時のポリシー | 0 | 現在はなし | Info | |
905 | | 4945 | FW起動時のルール一覧表示 | 0 | 現在はなし | Info | |
906 | | 4946 | FW例外リストにルールが追加された | 0 | 現在はなし | Info | |
907 | | 4947 | FW例外リストのルールが変更された | 0 | 現在はなし | Info | |
908 | | 4948 | FW例外リストのルールが削除された | 0 | 現在はなし | Info | |
909 | | 4949 | FWが既定値に復元された | 0 | 現在はなし | Info | |
910 | | 4950 | FW設定が変更された | 0 | 現在はなし | Info | |
911 | | 4951 | FWルールはメジャーバージョン番号を認識できないため、無視された | 0 | 現在はなし | Info | |
912 | | 4952 | マイナーバージョン番号を認識できないため、FWルールの一部が無視された | 0 | 現在はなし | Info | |
913 | | 4953 | FWルールをパースできなかった | 0 | 現在はなし | Info | |
914 | | 4954 | GPOによるFWルールの変更 | 0 | 現在はなし | Info | |
915 | | 4956 | FWのアクティブプロファイルが変更された | 0 | 現在はなし | Info | |
916 | | 4957 | FWルールが適用されなかった | 0 | 現在はなし | Info | |
917 | | 4958 | ルールが端末に設定されていない項目を参照しているため、FWはルールを適用しなかった | 0 | 現在はなし | Info | |
918 |
919 | 現在、このサブカテゴリーにはSigmaルールはありません。
920 |
921 | ### 7.6 その他のポリシー変更イベント
922 |
923 | 「その他のポリシー変更イベント」には、EFSデータ回復エージェントのポリシー変更、Windows Filtering Platformフィルタの変更、ローカルグループポリシー設定のセキュリティポリシー設定の更新状況、中央アクセスポリシーの変更、Cryptographic Next Generation(CNG)操作の詳細トラブルシューティングイベントについてのイベントが含まれています。
924 |
925 | ボリューム: `低`
926 |
927 | デフォルトの設定: `監査なし`
928 |
929 | 推奨設定: `監査なし`。(※ACSCは`成功失敗`を推奨していますが、この場合`5447 (A Windows Filtering Platform filter has been changed)`というイベントが大量に発生してしまいます。)
930 |
931 | > このサブカテゴリで有効にされるイベントが多すぎて、リストアップできません。現時点ではこれらのイベントIDを使用するSigmaルールはありません。
932 |
933 | ## 8. 特権の使用
934 |
935 | ### 8.1 重要でない特権の使用
936 |
937 | 以下の`重要でない特権の使用`イベントが記録されます:
938 | * 資格情報マネージャーに信頼された呼び出し側としてアクセス
939 | * ドメインにワークステーションを追加
940 | * プロセスのメモリ クォータの増加
941 | * 走査チェックのバイパス
942 | * システム時刻の変更
943 | * タイムゾーンの変更
944 | * ページファイルの作成
945 | * グローバルオブジェクトの作成
946 | * 永続的共有オブジェクトの作成
947 | * シンボリックリンクの作成
948 | * リモートコンピューターからの強制シャットダウン
949 | * プロセスワーキング セットの増加
950 | * スケジューリング優先順位の繰り上げ
951 | * メモリ内のページのロック
952 | * オブジェクトラベルの変更
953 | * ボリュームの保守タスクを実行
954 | * 単一プロセスのプロファイル
955 | * システムパフォーマンスのプロファイル
956 | * ドッキングステーションからコンピューターを削除
957 | * システムのシャットダウン
958 | * ディレクトリサービスデータの同期化
959 |
960 | ボリューム: `とても高い`
961 |
962 | デフォルトの設定: `監査なし`
963 |
964 | 推奨設定: `監査なし`
965 |
966 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
967 | | :---: | :---: | :---: | :---: | :---: | :---: |
968 | | 4673 | 特権サービスが呼び出された | 0 | | | |
969 | | 4674 | 特権オブジェクトに対する操作の試行 | 0 | | | |
970 | | 4985 | トランザクション状態の変更 | 0 | | | |
971 |
972 | > **注意: 重要でない特権の使用イベントと重要な特権の使用イベントは同じイベントIDを使用します。**
973 |
974 | ### 8.2 重要な特権の使用
975 |
976 | 以下の`重要な特権の使用`イベントが記録されます:
977 | * オペレーティングシステムの一部として機能する
978 | * ファイルとディレクトリのバックアップ
979 | * ファイルとディレクトリの復元
980 | * トークンオブジェクトの作成
981 | * プログラムのデバッグ
982 | * コンピュータとユーザアカウントに委任時の信頼を付与
983 | * セキュリティ監査の生成
984 | * 認証後にクライアントを偽装
985 | * デバイスドライバーのロードとアンロード
986 | * 監査とセキュリティログの管理
987 | * ファームウェア環境値の修正
988 | * プロセスレベルのトークンを置き換える
989 | * ファイルとその他のオブジェクトの所有権の取得
990 |
991 | 「ファイルとディレクトリのバックアップ」と「ファイルとディレクトリの復元」の2つイベントを記録するのに、`コンピューターの構成 > Windowsの設定 > セキュリティの設定 > ローカルポリシー > セキュリティオプション > 監査: グローバルシステムオブジェクトのアクセスを監査する`のグループポリシー設定を有効にする必要があります。
992 | しかし、イベントが大量に生成されるので、グループポリシー設定を有効化することはお勧めしません。
993 |
994 | ボリューム: `高`
995 |
996 | デフォルトの設定: `監査なし`
997 |
998 | 推奨設定: `成功と失敗`だが、ノイズが多すぎる可能性がある
999 |
1000 | Sigmaルールの例:
1001 | * `(4673) (High) User Couldn't Call a Privileged Service 'LsaRegisterLogonProcess'`: 「LsaRegisterLogonProcess」関数は、アプリケーションが SeTcbPrivilege 権限セットを持っているかどうかを確認することで、ログオン プロセスであることを検証する。RubeusによるLSAハンドル取得試行の可能性
1002 | * `(4673) (Med) Suspicious Driver Loaded By User`: デバイスドライバーのロードまたはアンロードに必要な「SeLoadDriverPrivilege」を介してドライバーのロードを検出する。この権限により、ユーザはデバイスドライバーまたはその他のコードをカーネルモードに動的にロードおよびアンロードできる。このユーザ権限は、プラグアンドプレイデバイスドライバーには適用されない。許可されている特権ユーザ/管理者とプロセスを除外すると、悪意のあるカーネル ドライバーをロードしようとする不正なプログラムが残る可能性がある。これにより、[Ghost-In-The-Logs](https://github.com/bats3c/Ghost-In-The-Logs)、Sysinternalsやその他のさまざまなツールの使用が検出される。ホワイトリストを使用し悪意のあるツールを見つける必要がある
1003 | * `(4674) (Med) SCM Database Privileged Operation`: SCMデータベースに対して、特権操作を実行している非システムユーザを検出する
1004 |
1005 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
1006 | | :---: | :---: | :---: | :---: | :---: | :---: |
1007 | | 4673 | 特権サービスが呼び出された | 2 | 現在はなし | Info~High | |
1008 | | 4674 | 特権オブジェクトに対する操作の試行 | 1 | 現在はなし | Info~Med | |
1009 | | 4985 | トランザクション状態の変更 | 0 | 現在はなし | Info | |
1010 |
1011 | > **注意: 重要でない特権の使用イベントと重要な特権の使用イベントは同じイベントIDを使用します。**
1012 |
1013 | ## 9. システム
1014 |
1015 | ### 9.1 その他のシステムイベント
1016 |
1017 | その他のシステムイベントの監査には、WindowsファイアウォールサービスとWindowsファイアウォールドライバーの開始および停止イベント、これらのサービスのエラーイベント、およびWindowsファイアウォールサービスポリシー処理エラーが含まれます:
1018 | * ファイアウォールサービスの起動とシャットダウン
1019 | * ファイアウォールサービスによるポリシーの処理
1020 | * 暗号化キーファイルと移行操作
1021 | * BranchCacheイベント
1022 |
1023 | ボリューム: `低`
1024 |
1025 | デフォルトの設定: `成功と失敗`
1026 |
1027 | 推奨設定: `不明。テストが必要。`
1028 |
1029 | > このサブカテゴリで有効にされるイベントが多すぎて、リストアップできません。現時点では、これらのイベントIDを使用するSigmaルールはありません。
1030 |
1031 | ### 9.2 セキュリティ状態の変更
1032 |
1033 | セキュリティ状態の変更には、端末起動、回復、シャットダウンの各イベント、システム時間の変更に関する情報が含まれています。
1034 |
1035 | ボリューム: `低`
1036 |
1037 | デフォルトの設定: `成功`
1038 |
1039 | 推奨設定: `成功と失敗`
1040 |
1041 | Sigmaルールの例:
1042 | * `(4616) Unauthorized System Time Modification`: システム時刻改ざんの検知。
1043 |
1044 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
1045 | | :---: | :---: | :---: | :---: | :---: | :---: |
1046 | | 4608 | 端末起動 | 0 | 現在はなし | Info | おそらく生成されないイベント。 |
1047 | | 4616 | システム時刻の変更 | 1 | 現在はなし | Low | |
1048 | | 4621 | 管理者がCrashOnAuditFailからシステムを回復した | 0 | なし | Info | おそらく稀なイベント。 |
1049 |
1050 | ### 9.3 セキュリティシステムの拡張
1051 |
1052 | 認証パッケージ、通知パッケージ、またはセキュリティパッケージの読み込みに関する情報と、信頼できるログオンプロセス登録イベントに関する情報が含まれます:
1053 | * セキュリティ拡張機能コードが読み込まれます (認証、通知、セキュリティ パッケージなど)。セキュリティ拡張機能コードはLSAに登録され、ログオン試行の認証、ログオン要求の送信、アカウントまたはパスワードの変更の通知を受け取る際に使用され、信頼されます。この拡張コードの例は、KerberosやNTLMなどのセキュリティサポートプロバイダーです。
1054 | * サービスがインストールされています。サービスがサービスコントロールマネージャーに登録されると、監査ログが生成されます。監査ログには、サービス名、バイナリ、種類、開始の種類、およびサービスアカウントに関する情報が含まれます。
1055 |
1056 | ボリューム: `低。ドメインコントローラでは高`
1057 |
1058 | デフォルトの設定: `監査なし`
1059 |
1060 | 推奨設定: `成功と失敗`
1061 |
1062 | Sigmaルールの例:
1063 | * `(4611) (High) Register new Logon Process by Rubeus`: 新しい信頼できるログオンプロセスを介したRubeusツール使用の可能性の検出
1064 | * `(4697) (High) Invoke-Obfuscation Obfuscated IEX Invocation`
1065 | * `(4697) (High) Invoke-Obfuscation Via Use Rundll32`
1066 | * `(4697) (High) Invoke-Obfuscation Via Use MSHTA`
1067 | * `(4697) (High) CobaltStrike Service Installations`
1068 | * `(4697) (High) Credential Dumping Tools Service Execution`
1069 | * `(4697) (Crit) Malicious Service Installations`
1070 | * `(4697) (Crit) Meterpreter or Cobalt Strike Getsystem Service Installation`
1071 |
1072 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
1073 | | :---: | :---: | :---: | :---: | :---: | :---: |
1074 | | 4610 | LSAが認証パッケージを読み込んだ | 0 | なし | ? | 許可リストで監視すべき。 |
1075 | | 4611 | 信頼できるログオンプロセスがLSAに登録された | 1 | 現在はなし | Low~High | `Subject`フィールドが`SYSTEM`になっているはず。 |
1076 | | 4614 | SAMが通知パッケージを読み込んだ | 0 | なし | ? | おそらく稀なイベント。 |
1077 | | 4622 | LSAがセキュリティパッケージを読み込んだ | 0 | なし | ? | おそらく稀なイベント。 |
1078 | | 4697 | サービスインストール | 20 | あり | Info~High | このサブカテゴリでは最も重要なイベント。Win 10/2016以上が必要。 |
1079 |
1080 | ### 9.4 システムの整合性
1081 |
1082 | 監査システム整合性は、オペレーティングシステムがセキュリティサブシステムの整合性に違反するイベントを監査するかどうかを決定します:
1083 | * 監査システムの障害により、監査イベントが失われた。
1084 | * プロセスは、クライアントの偽装、クライアントアドレス空間への返信、クライアントアドレス空間への読み取り、またはクライアントアドレス空間からの書き込みを行う試みで、無効なローカルプロシージャ呼び出し(LPC)ポートを使用した。
1085 | * リモートプロシージャ呼び出し(RPC)整合性違反が検出された。
1086 | * 実行可能ファイルの無効なハッシュ値を持つコード整合性違反が検出された。
1087 | * 暗号化タスクが実行された。
1088 |
1089 | マイクロソフトによると、セキュリティサブシステムの整合性の違反は重大であり、潜在的なセキュリティ攻撃を示している可能性があります。
1090 |
1091 | ボリューム: `低`
1092 |
1093 | デフォルトの設定: `成功と失敗`
1094 |
1095 | 推奨設定: `成功と失敗`
1096 |
1097 | 現在、このサブカテゴリーにはSigmaルールはありません。
1098 |
1099 | | イベントID | タイトル | Sigmaルール数 | Hayabusaルールの有無 | レベル | 備考欄 |
1100 | | :---: | :---: | :---: | :---: | :---: | :---: |
1101 | | 4612 | リソース切れで一部のログが失われた可能性がある | 0 | 現在はなし | Med | 監視すべき。 |
1102 | | 4615 | LPCポートの使用が無効 | 0 | なし | Info | おそらく稀なイベント。 |
1103 | | 4618 | 監視対象のセキュリティイベントパターンが発生した | 0 | なし | None | このイベントは手動で呼び出された時だけ記録される。 |
1104 | | 4816 | RPCが受信メッセージの復号中に整合性違反が起こった | 0 | 現在はなし | Low |
1105 | | 5038 | コード整合性エラー: イメージのハッシュ値が不正 | 0 | あり | Low | 元のイベントタイトル: `コードの整合性により、ファイルのイメージ ハッシュが無効であると判断されました。 不正な変更が原因でファイルが破損している可能性があります。無効なハッシュは、ディスク デバイス エラーの可能性があることを示している可能性があります。` |
1106 | | 5056 | 暗号化の自己テストの実行 | 0 | なし | None | おそらく稀なイベント。 |
1107 | | 5057 | 暗号化プリミティブ操作の失敗 | 0 | なし | Info | おそらく稀なイベント。 |
1108 | | 5060 | 検証操作の失敗 | 0 | なし | Info | おそらく稀なイベント。 |
1109 | | 5061 | 暗号化操作 | 0 | なし | Info | おそらく稀なイベント。 |
1110 | | 5062 | カーネルモードの暗号化セルフテストの実行 | 0 | なし | Info | おそらく稀なイベント。 |
1111 | | 6281 | コード整合性エラー: イメージのページハッシュ値が不正 | 0 | あり | Low | 元のイベントタイトル: `コード整合性により、イメージファイルのページハッシュが無効であると判断されました。ページハッシュなしでファイルに正しく署名されていないか、不正な変更が原因で破損している可能性があります。無効なハッシュは、潜在的なディスクデバイスエラーを示している可能性があります。` |
1112 | | 6410 | コード整合性エラー: 要件を満たしていない | 0 | あり | Low | 元のイベントタイトル: `コードの整合性により、ファイルがプロセスに読み込むセキュリティ要件を満たしていないと判断されました。` |
1113 |
1114 | ## 10. グローバルオブジェクトアクセス
1115 |
1116 | ここですべての`ファイルシステム`と`レジストリ`アクセスを記録するように設定できますが、非常に多くのログが生成されるため、実運用ではお勧めしません。
1117 | 検出ルールを作成するときには、どのレジストリキーとファイルが変更されたかを調べるために、攻撃のシミュレーションを行う際に有効にすることが推奨されます。
1118 |
1119 | ## デフォルト設定のログ
1120 |
1121 | デフォルト設定で有効になっている監視対象とすべきイベントを以下に示します。
1122 |
1123 | | イベントID | タイトル | Hayabusaルールの有無 | レベル | 備考欄 |
1124 | | :---: | :---: | :---: | :---: | :---: |
1125 | | 1100 | イベントログサービスがシャットダウンされた | 現在はなし | Info | おそらく稀なイベント。 |
1126 | | 1101 | ログが中断された | 現在はなし | Med | おそらく稀なイベント。 |
1127 | | 1102 | 監査ログがクリアされた | あり | High | |
1128 | | 1104 | セキュリティログがいっぱいになった | 現在はなし | High | おそらく稀なイベント。 |
1129 | | 1108 | イベントログサービスのエラー | 現在はなし | Med | おそらく稀なイベント。 |
--------------------------------------------------------------------------------
/ConfiguringSecurityLogAuditPolicies.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Configuring Security Log Audit Settings
7 |
8 | [
English ] | [
日本語]
9 |
10 |
11 | # Table of Contents
12 |
13 | - [Table of Contents](#table-of-contents)
14 | - [Notes about configuring Security log auditing](#notes-about-configuring-security-log-auditing)
15 | - [Security Event Log Categories and Event IDs](#security-event-log-categories-and-event-ids)
16 | - [1. Account Logon](#1-account-logon)
17 | - [1.1 Credential Validation](#11-credential-validation)
18 | - [1.2 Kerberos Authentication Service](#12-kerberos-authentication-service)
19 | - [1.3 Kerberos Service Ticket Operations](#13-kerberos-service-ticket-operations)
20 | - [2. Account Management](#2-account-management)
21 | - [2.1 Computer Account Management](#21-computer-account-management)
22 | - [2.2 Other Account Management Events](#22-other-account-management-events)
23 | - [2.3 Security Group Management](#23-security-group-management)
24 | - [2.4 User Account Management](#24-user-account-management)
25 | - [3. Detailed Tracking](#3-detailed-tracking)
26 | - [3.1 Plug and Play Events](#31-plug-and-play-events)
27 | - [3.2 Process Creation](#32-process-creation)
28 | - [3.3 Process Termination](#33-process-termination)
29 | - [3.4 RPC (Remote Procedure Call) Events](#34-rpc-remote-procedure-call-events)
30 | - [3.5 Token Right Adjusted Events](#35-token-right-adjusted-events)
31 | - [4. DS (Directory Service) Access](#4-ds-directory-service-access)
32 | - [4.1 Directory Service Access](#41-directory-service-access)
33 | - [4.2 Directory Service Changes](#42-directory-service-changes)
34 | - [5. Logon/Logoff](#5-logonlogoff)
35 | - [5.1 Account Lockout](#51-account-lockout)
36 | - [5.2 Group Membership](#52-group-membership)
37 | - [5.3 Logoff](#53-logoff)
38 | - [5.4 Logon](#54-logon)
39 | - [5.5 Other Logon/Logoff Events](#55-other-logonlogoff-events)
40 | - [5.6 Special Logon](#56-special-logon)
41 | - [6. Object Access](#6-object-access)
42 | - [6.1 Certification Services](#61-certification-services)
43 | - [6.2 Detailed File Share](#62-detailed-file-share)
44 | - [6.3 File Share](#63-file-share)
45 | - [6.4 File System](#64-file-system)
46 | - [6.5 Filtering Platform Connection](#65-filtering-platform-connection)
47 | - [6.6 Filtering Platform Packet Drop](#66-filtering-platform-packet-drop)
48 | - [6.7 Handle Manipulation](#67-handle-manipulation)
49 | - [6.8 Kernel Object](#68-kernel-object)
50 | - [6.9 Other Object Access Events](#69-other-object-access-events)
51 | - [6.10 Registry](#610-registry)
52 | - [6.11 Removable Storage](#611-removable-storage)
53 | - [6.12 SAM (Security Account Manager)](#612-sam-security-account-manager)
54 | - [7. Policy Change](#7-policy-change)
55 | - [7.1 Audit Policy Change](#71-audit-policy-change)
56 | - [7.2 Authentication Policy Change](#72-authentication-policy-change)
57 | - [7.3 Authorization Policy Change](#73-authorization-policy-change)
58 | - [7.4 Filtering Platform Policy Change](#74-filtering-platform-policy-change)
59 | - [7.5 MPSSVC Rule-Level Policy Change](#75-mpssvc-rule-level-policy-change)
60 | - [7.6 Other Policy Change Events](#76-other-policy-change-events)
61 | - [8. Privilege Use](#8-privilege-use)
62 | - [8.1 Non-Sensitive Use Events](#81-non-sensitive-use-events)
63 | - [8.2 Sensitive Privilege Use](#82-sensitive-privilege-use)
64 | - [9. System](#9-system)
65 | - [9.1 Other System Events](#91-other-system-events)
66 | - [9.2 Security State Change](#92-security-state-change)
67 | - [9.3 Security System Extension](#93-security-system-extension)
68 | - [9.4 System Integrity](#94-system-integrity)
69 | - [10. Global Object Access Auditing](#10-global-object-access-auditing)
70 | - [Default Logs](#default-logs)
71 |
72 | # Notes about configuring Security log auditing
73 |
74 | * At an organizational level, you can configure the Security log audit policies with Group Policy or InTune. For standalone machines, you can configure with the Local Security Policy Editor (`gpedit.msc`). You can also use PowerShell or Batch scripts with built-in commands such as `auditpol` to configure either standalone machines or use them as startup scripts to configure endpoints at scale.
75 | * You should always enable Security log auditing at the sub-category level (`Computer Configuration > Windows Settings > Security Settings > Advanced security audit policy settings > System Audit Policies` in Group Policy) instead of the broad category level as the latter will usually enable too many events and will override any granular settings you made at the sub-category level.
76 | * In this document, I have ommited sub-categories and event IDs that are not actually used or are not needed for monitoring or DFIR investigations. Only the important ones that you should enable are listed here.
77 | * You cannot turn on or off specific event IDs, only sub-categories at the most granular level. This is unfortunate as sometimes there will be a couple of noisy event IDs that you can not disable unless you disable the entire sub-category.
78 | * The number of sigma rules were taken at 2022/09/24. Be aware that even if there are few or no sigma rules for a certain event, it does not mean that the event is not important.
79 |
80 | # Security Event Log Categories and Event IDs
81 |
82 | ## 1. Account Logon
83 |
84 | ### 1.1 Credential Validation
85 |
86 | Volume: `Depends on NTLM usage. Could be high on DCs and low on clients and servers.`
87 |
88 | Default settings: `Client OS: No Auditing` | `Server OS: Success`
89 |
90 | Recommended settings: `Client and Server OSes: Success and Failure`
91 |
92 | Notable Sigma rules:
93 | * `Metasploit SMB Authentication`: Detect when someone is running Metasploit on your network.
94 | * `Valid Users Failing to Authenticate from Single Source Using NTLM`: Password guessing.
95 | * `Invalid Users Failing To Authenticate From Single Source Using NTLM`: Username guessing.
96 | * `Failed Logins with Different Accounts from Single Source System`: Password spraying.
97 |
98 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
99 | | :---: | :---: | :---: | :---: | :---: | :---: |
100 | | 4776 | NTLM Authentication | 5 | Yes | Info~High | The original event messages says it is for DCs only but this event gets logged for client OS local authentication as well. |
101 |
102 | ### 1.2 Kerberos Authentication Service
103 |
104 | > **Note: These events are only generated on domain controllers**
105 |
106 | Volume: `High`
107 |
108 | Default settings: `Client OS: No Auditing` | `Server OS: Success`
109 |
110 | Recommended settings: `Client OS: No Auditing` | `Server OS: Success and Failure`
111 |
112 | Notable Sigma rules:
113 | * `(4768) (High) PetitPotam Suspicious Kerberos TGT Request`
114 | * `(4768) (Med) Disabled Users Failing To Authenticate From Source Using Kerberos`
115 | * `(4768) (Med) Invalid Users Failing To Authenticate From Source Using Kerberos`: Username guessing.
116 | * `(4771) (Med) Valid Users Failing to Authenticate From Single Source Using Kerberos`: Password guessing.
117 |
118 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
119 | | :---: | :---: | :---: | :---: | :---: | :---: |
120 | | 4768 | Kerberos TGT Request | 3 | Yes | Info~High | |
121 | | 4771 | Kerberos Pre-Auth Failed | 1 | Not Yet | Info~Med | |
122 | | 4772 | Kerberos Authentication Ticket Request Failed | 0 | No | None | This log is not in use. EID 4768 failure events are used instead. |
123 |
124 | ### 1.3 Kerberos Service Ticket Operations
125 |
126 | > **Note: These events are only generated on domain controllers**
127 |
128 | Volume: `High`
129 |
130 | Default settings: `Client OS: No Auditing` | `Server OS: Success`
131 |
132 | Recommended settings: `Domain Controllers: Success and Failure`
133 |
134 | Notable Sigma rules:
135 | * `(4769) (Med) Suspicious Kerberos RC4 Ticket Encryption`: Detects service ticket requests using RC4 encryption. This could be for Kerberoasting (password cracking) or just older systems using legacy encryption.
136 |
137 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
138 | | :---: | :---: | :---: | :---: | :---: | :---: |
139 | | 4769 | Kerberos Service Ticket Request | 1 | Yes | Info~Med | |
140 | | 4770 | Kerberos Service Ticket Renewel | 0 | Not Yet | Info | |
141 | | 4773 | Kerberos Service Ticket Request Failed | 0 | No | None | This log is not in use. EID 4769 is used instead. |
142 |
143 | ## 2. Account Management
144 |
145 | ### 2.1 Computer Account Management
146 |
147 | > **Note: These events are only generated on domain controllers**
148 |
149 | Volume: `Low`
150 |
151 | Default settings: `Client OS: No Auditing` | `Server OS: Success Only`
152 |
153 | Recommended settings: `Domain Controllers: Success and Failure`
154 |
155 | Notable Sigma rules:
156 | * `(4742) (Med) Possible DC Shadow`: Detects DCShadow via create new SPN.
157 |
158 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
159 | | :---: | :---: | :---: | :---: | :---: | :---: |
160 | | 4741 | Computer Account Created | 0 | 1 | Info | |
161 | | 4742 | Computer Account Changed | 2 | Not Yet | Info~Med | |
162 | | 4743 | Computer Account Deleted | 0 | Not Yet | Info | |
163 |
164 | ### 2.2 Other Account Management Events
165 |
166 | Volume: `Low`
167 |
168 | Default settings: `No Auditing`
169 |
170 | Recommended settings: `Success and Failure`
171 |
172 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
173 | | :---: | :---: | :---: | :---: | :---: | :---: |
174 | | 4782 | Account Pasword Hash Was Accessed | 0 | Not Yet | Info | Generated on a DC during password migration of an account using the AD Migration Toolkit or attackers trying to access password hashes. Seems to be a rare event. |
175 | | 4793 | Password Policy Checking API Was Called | 0 | Not Yet | Low | Generated during password resets or attackers checking the password policy. Seems to be a rare event. |
176 |
177 | ### 2.3 Security Group Management
178 |
179 | A "security-enabled" group is a group that you can assign access permissions (ACLs). The other type is a Distribution Group, which is "security-disabled" and cannot be assigned access permissions. Since security-enabled groups are most common, we will refer to them simply as "groups". For example, `Local Group Created`, instead of `A security-enabled local group was created.`.
180 |
181 | A domain local group is a security or distribution group that can contain universal groups, global groups, other domain local groups from its own domain, and accounts from any domain in the forest. You can give domain local security groups rights and permissions on resources that reside only in the same domain where the domain local group is located.
182 |
183 | A global group is a group that can be used in its own domain, in member servers and in workstations of the domain, and in trusting domains. In all those locations, you can give a global group rights and permissions and the global group can become a member of local groups. However, a global group can contain user accounts that are only from its own domain.
184 |
185 | A universal group is a security or distribution group that contains users, groups, and computers from any domain in its forest as members. You can give universal security groups rights and permissions on resources in any domain in the forest.
186 |
187 | Volume: `Low`
188 |
189 | Default settings: `Success`
190 |
191 | Recommended settings: `Success and Failure`
192 |
193 | Notable Sigma rules:
194 | * `(4732) (Med) User Added to Local Administrators`
195 | * `(4799) (High) Operation Wocao Activity`: Detects China-based cyber espionage.
196 |
197 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
198 | | :---: | :---: | :---: | :---: | :---: | :---: |
199 | | 4727 | Global Group Created | 0 | Not Yet | Info | |
200 | | 4728 | Member Added To Global Group | 0 | Yes | Info | |
201 | | 4729 | Member Removed From Global Group | 0 | Not Yet | Info | |
202 | | 4730 | Global Group Deleted | 0 | Not Yet | Info | |
203 | | 4731 | Local Group Created | 0 | Not Yet | Info | |
204 | | 4732 | Member Added To Local Group | 1 | Yes | Info~Med | |
205 | | 4733 | Member Removed From Local Group | 0 | Not Yet | Info | |
206 | | 4734 | Local Group Deleted | 0 | Not Yet | Info | |
207 | | 4737 | Global Group Changed | 0 | Not Yet | Info | |
208 | | 4754 | Universal Group Created | 0 | Not Yet | Info |
209 | | 4755 | Universal Group Changed | 0 | Not Yet | Info |
210 | | 4756 | Member Added To Universal Group | 0 | Not Yet | Info |
211 | | 4757 | Member Removed From Universal Group | 0 | Not Yet | Info |
212 | | 4758 | Universal Group Deleted | 0 | Not Yet | Info |
213 | | 4764 | Group Type Changed | 0 | Not Yet | Info | |
214 | | 4799 | Local Group Membership Enumerated | 1 | Not Yet | Info~High | This is a pretty noisy event that is generated almost as often as `4672` Admin Logon events that will probably generate many false positives. |
215 |
216 | ### 2.4 User Account Management
217 |
218 | Volume: `Low`
219 |
220 | Default settings: `Success`
221 |
222 | Recommended settings: `Success and Failure`
223 |
224 | Notable Sigma rules:
225 | * `(4720) (High) Hidden Local User Creation`: Detects hidden user accounts most likely used as a backdoor account.
226 | * `(4720) (High) Suspicious Windows ANONYMOUS LOGON Local Account Created`
227 | * `(4720) (Low) Local User Creation`
228 | * `(4738) (High) Active Directory User Backdoors`
229 | * `(4738) (High) Weak Encryption Enabled and Kerberoast`
230 | * `(4765, 4766, 4738) (Med) Addition of SID History to Active Directory Object`: An attacker can use the SID history attribute to gain additional privileges.
231 | * `(5145, 4738) (Med) Possible Remote Password Change Through SAMR`: Detects a possible remote NTLM hash change through SAMR API SamiChangePasswordUser() or SamSetInformationUser().
232 | * `(4781) (High) Suspicious Computer Account Name Change CVE-2021-42287`: Detects the renaming of an existing computer account to a account name that doesn't contain a $ symbol as seen in attacks against CVE-2021-42287
233 | * `(4794) (High) Password Change on Directory Service Restore Mode (DSRM) Account`: The Directory Service Restore Mode (DSRM) account is a local administrator account on Domain Controllers. Attackers may change the password to gain persistence.
234 |
235 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
236 | | :---: | :---: | :---: | :---: | :---: | :---: |
237 | | 4720 | User Account Created | 3 | Yes | Info~High | |
238 | | 4722 | User Account Enabled | 0 | Not Yet | Info | |
239 | | 4723 | Account Password Change | 0 | Not Yet | Info | |
240 | | 4724 | Account Password Reset | 0 | Not Yet | Info | |
241 | | 4725 | User Account Disabled | 0 | Not Yet | Info | |
242 | | 4726 | User Account Deleted | 0 | Not Yet | Info | |
243 | | 4738 | User Account Changed | 4 | Not Yet | Info~High | |
244 | | 4740 | User Account Lockout | 0 | Not Yet | Med | Seems to be a rare event. |
245 | | 4765 | SID History Added To Account | 1 | Not Yet | Info~Med | |
246 | | 4766 | Attempt To Add SID History To Account Failed | 0 | Not Yet | Info~Med | |
247 | | 4767 | User account was unlocked | 0 | Not Yet | Info | |
248 | | 4780 | ACL Set On Administrators Group Member | 0 | Not Yet | Info | |
249 | | 4781 | Account Name Changed | 1 | Not Yet | Info | |
250 | | 4794 | DSRM Administrator Password Set | 1 | Not Yet | Info~High | |
251 | | 4798 | User's Local Group Membership Enumerated | 0 | Not Yet | Info | |
252 | | 5376 | Credential Manager Credentials Backup | 0 | Not Yet | Info | |
253 | | 5377 | Credential Manager Credentials Restored | 0 | Not Yet | Info | |
254 |
255 | ## 3. Detailed Tracking
256 |
257 | ### 3.1 Plug and Play Events
258 |
259 | This is important if you want to track physical attacks (Rubber Ducky, etc..) or someone exfiltrating data via USB devices.
260 |
261 | Volume: `Typcially low`
262 |
263 | Default settings: `No Auditing`
264 |
265 | Recommended settings: `Success and Failure`
266 |
267 | Notable Sigma rules:
268 | * `(6416) External Disk Drive Or USB Storage Device`
269 |
270 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
271 | | :---: | :---: | :---: | :---: | :---: | :---: |
272 | | 6416 | New External Device | 1 | Not Yet | Info~Low | |
273 | | 6419 | Request To Disable Device | 0 | No | Info | |
274 | | 6420 | Device Disabled | 0 | No | Info | |
275 | | 6421 | Request To Enable Device | 0 | No | Info | |
276 | | 6422 | Device Enabled | 0 | No | Info | |
277 | | 6423 | Device Installation Blocked | 0 | No | Info | |
278 | | 6424 | Device Installation Allowed After Being Blocked | 0 | No | Info | |
279 |
280 | ### 3.2 Process Creation
281 |
282 | Note: A separate setting needs to be enabled to log command line information which is extremely important. `Computer Configuration > Windows Settings > Administrative Templates > System > Audit Process Creation > Include command line in process creation events` in Group Policy.
283 |
284 | If you do not have Sysmon installed and configured to monitor Process Creation, then you should enable this as about half of Sigma's detection rules rely on process creation with command line options enabled.
285 |
286 | Volume: `High`
287 |
288 | Default settings: `No Auditing`
289 |
290 | Recommended settings: `Success and Failure` if sysmon is not configured.
291 |
292 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
293 | | :---: | :---: | :---: | :---: | :---: | :---: |
294 | | 4688 | Process Creation | 1000+ | Yes | Info~Crit | |
295 | | 4696 | Primary Token Assigned To Process | 0 | No | Info | Event is deprecated since Win 7/2008 R2 so may only been generated on Vista/2008. |
296 |
297 | ### 3.3 Process Termination
298 |
299 | You may want to keep this disabled to save file space.
300 |
301 | Volume: `High`
302 |
303 | Default settings: `No Auditing`
304 |
305 | Recommended settings: `No Auditing` unless you want to track the lifespan of processes.
306 |
307 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
308 | | :---: | :---: | :---: | :---: | :---: | :---: |
309 | | 4689 | Process Exited | 1 | Not Yet | Info | |
310 |
311 | ### 3.4 RPC (Remote Procedure Call) Events
312 |
313 | Volume: `High on RPC servers` (According to Microsoft)
314 |
315 | Default settings: `No Auditing`
316 |
317 | Recommended settings: `Unknown. Needs testing.`
318 |
319 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
320 | | :---: | :---: | :---: | :---: | :---: | :---: |
321 | | 5712 | RPC Attempt | 0 | Not Yet | ? | Logged when inbound RPC connection is made. Seems to be a rare event. | |
322 |
323 | ### 3.5 Token Right Adjusted Events
324 |
325 | Volume: `Unknown`
326 |
327 | Default settings: `No Auditing`
328 |
329 | Recommended settings: `Unknown. Needs testing.`
330 |
331 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
332 | | :---: | :---: | :---: | :---: | :---: | :---: |
333 | | 4703 | User's Token Changed | 0 | Not Yet | Info | Seems to be a rare event. |
334 |
335 | ## 4. DS (Directory Service) Access
336 |
337 | > **Note: Enable only for Domain Controllers**
338 |
339 | ### 4.1 Directory Service Access
340 |
341 | Volume: `High`
342 |
343 | Default settings: `Client OS: No Auditing` | `Server OS: Success`
344 |
345 | Recommended settings: `Client OS: No Auditing` | `ADDS Server: Success and Failure`
346 |
347 | Notable Sigma rules:
348 | * `(4662) (Crit) AD Object WriteDAC Access`
349 | * `(4662) (Crit) Active Directory Replication from Non Machine Account`
350 | * `(4662) (Med) AD User Enumeration`: Detects access to a domain user from a non-machine account. (Requires the "Read all properties" permission on the user object to be audited for the "Everyone" principal.)
351 | * `(4662) (High) DPAPI Domain Backup Key Extraction`: Detects tools extracting LSA secret DPAPI domain backup key from Domain Controllers.
352 | * `(4662) (Med) WMI Persistence`: Detects malware that autostarts via WMI.
353 |
354 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
355 | | :---: | :---: | :---: | :---: | :---: | :---: |
356 | | 4661 | Handle To Object Requested | 2 | Not Yet | Info~Crit | |
357 | | 4662 | Operation Performed On Object | 6 | Not Yet | Info~Crit | |
358 |
359 | ### 4.2 Directory Service Changes
360 |
361 | Volume: `High`
362 |
363 | Default settings: `No Auditing`
364 |
365 | Recommended settings: `Client OS: No Auditing` | `ADDS Server: Success and Failure`
366 |
367 | Notable Sigma rules:
368 | * `(5136) (High) Powerview Add-DomainObjectAcl DCSync AD Extend Right`: Backdooring domain object to grant the rights associated with DCSync to a regular user or machine account.
369 | * `(5136) (High) Active Directory User Backdoors`: Detects scenarios where one can control another users or computers account without having to use their credentials.
370 | * `(5136) (Med) Possible DC Shadow`
371 | * `(5136) (High) Suspicious LDAP-Attributes Used`: Detects LDAPFragger, a C2 tool that lets attackers route Cobalt Strike beacon data over LDAP attributes.
372 |
373 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
374 | | :---: | :---: | :---: | :---: | :---: | :---: |
375 | | 5136 | Directory Service Object Modified | 6 | Not Yet | Info~Crit | |
376 | | 5137 | Directory Service Object Created | 0 | Not Yet | Info | |
377 | | 5138 | Directory Service Object Undeleted | 0 | Not Yet | Info | |
378 | | 5139 | Directory Service Object Moved | 0 | Not Yet | Info | |
379 | | 5141 | Directory Service Object Deleted | 0 | Not Yet | Info | |
380 |
381 | ## 5. Logon/Logoff
382 |
383 | ### 5.1 Account Lockout
384 |
385 | Volume: `Low`
386 |
387 | Default settings: `Success`
388 |
389 | Recommended settings: `Success and Failure`
390 |
391 | Currently there is no sigma rule for account lockout.
392 |
393 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
394 | | :---: | :---: | :---: | :---: | :---: | :---: |
395 | | 4625 | Logon Failed Due To Lockout | 0 | Yes | Med | Substatus: `0xC0000234`. Seems to be a rare event. |
396 |
397 | ### 5.2 Group Membership
398 |
399 | Records what group a user belongs to when they log in.
400 | ACSC recommends `Success and Failure` but this is probably not needed if you can easily lookup what groups a user belongs to.
401 | You can also check if a user has administrator privileges with the `4672` Admin Logon event.
402 |
403 | Volume: Adds an extra `4627` event to every logon.
404 |
405 | Default settings: `No Auditing`
406 |
407 | Recommended settings: `No Auditing`
408 |
409 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
410 | | :---: | :---: | :---: | :---: | :---: | :---: |
411 | | 4627 | Group Membership Information | 0 | Not Yet | Info | |
412 |
413 | ### 5.3 Logoff
414 |
415 | You can think of the `4634` Logoff event as the logon session ending.
416 | If the user did not initiate the logoff, for example if they just closed their RDP client, was logged off by an Administrator or the session timed out, then the `4647` User Initiated Logoff event will not be recorded.
417 |
418 | Volume: `High`
419 |
420 | Default settings: `Success`
421 |
422 | Recommended settings: `Success`
423 |
424 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
425 | | :---: | :---: | :---: | :---: | :---: | :---: |
426 | | 4634 | Logoff | 0 | Yes | Info | |
427 | | 4647 | User Initiated Logoff | 0 | Yes | Info | |
428 |
429 | ### 5.4 Logon
430 |
431 | Volume: `Low on clients, medium on DCs or network servers`
432 |
433 | Default settings: `Client OS: Success` | `Server OS: Success and Failure`
434 |
435 | Recommended settings: `Success and Failure`
436 |
437 | Notable Sigma rules:
438 | * `(4624) (Low) Admin User Remote Logon`
439 | * `(4624) (High) Successful Overpass the Hash Attempt`
440 | * `(4624) (Med) Pass the Hash Activity`
441 | * `(4624) (Med) RDP Login from Localhost`
442 | * `(4624) (Low) Login with WMI`
443 | * `(4624) (High) KrbRelayUp Attack Pattern`
444 | * `(4624) (High) RottenPotato Like Attack Pattern`
445 | * `(4625) (Med) Failed Logon From Public IP`
446 | * `(4648) (Med) Suspicious Remote Logon with Explicit Credentials`
447 | * `(4624) (High) Scanner PoC for CVE-2019-0708 RDP RCE Vuln`: Detects scans for the BlueKeep vulnerability.
448 | * `(4625) (Med) Failed Logon From Public IP`
449 | * `(4625) (Med) Multiple Users Failing to Authenticate from Single Process`
450 | * `(4625) (Med) Multiple Users Remotely Failing To Authenticate From Single Source`
451 |
452 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
453 | | :---: | :---: | :---: | :---: | :---: | :---: |
454 | | 4624 | Logon | 11 | Yes | Info~High | |
455 | | 4625 | Logon Failed | 4 | Yes | Info~Med | |
456 | | 4648 | Explicit Logon | 2 | Yes | Info~Med | Will be logged on the source host. |
457 |
458 | ### 5.5 Other Logon/Logoff Events
459 |
460 | Volume: `Low`
461 |
462 | Default settings: `No Auditing`
463 |
464 | Recommended settings: `Success and Failure`
465 |
466 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
467 | | :---: | :---: | :---: | :---: | :---: | :---: |
468 | | 4649 | Possible Kerberos Replay Attack | 0 | Not Yet | Med | Seems to be a rare event. |
469 | | 4778 | Session Reconnected To Window Station | 0 | Yes | Info| Logged at source for RDP or Fast User Switching. |
470 | | 4779 | Session Disconnected From Window Station | 0 | Yes | Info | Logged at source for RDP or Fast User Switching. |
471 | | 4800 | Computer Locked | 0 | Not Yet | Info | |
472 | | 4801 | Computer Unlocked | 0 | Not Yet | Info | |
473 | | 4802 | Screensaver Started | 0 | Not Yet | Info | |
474 | | 4803 | Screensaver Stopped | 0 | Not Yet | Info | |
475 | | 5378 | CredSSP Credentials Delegation Blocked | 0 | No | Info | Usually when WinRM double-hop session was not properly set. Seems to be a rare event. |
476 | | 5632 | 802.1x Authentication To Wireless Network | 0 | Not Yet | Info | |
477 | | 5633 | 802.1x Authentication To Wired Network | 0 | Not Yet | Info | |
478 |
479 | ### 5.6 Special Logon
480 |
481 | "Special groups" and "Special Privileges" can be thought of as Administrator groups or privileges.
482 |
483 | Volume: `Low on clients. Medium on DC or network servers.`
484 |
485 | Default settings: `Success`
486 |
487 | Recommended settings: `Success and Failure`
488 |
489 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
490 | | :---: | :---: | :---: | :---: | :---: | :---: |
491 | | 4672 | Admin Logon | 0 | Yes | Info | |
492 | | 4964 | Logon From Admin Group | 0 | Not Yet | Info | Seems to be a rare event. |
493 |
494 | ## 6. Object Access
495 |
496 | ### 6.1 Certification Services
497 |
498 | > **Note: Enable only for servers providing AD CS role services.**
499 |
500 | Volume: `Low to medium`
501 |
502 | Default settings: `No Auditing`
503 |
504 | Recommended settings: `Success and Failure` for AD CS role servers.
505 |
506 | Notable Sigma rules:
507 | * `(4898, 4899) (High) ADCS Certificate Template Configuration Vulnerability with Risky EKU`
508 | * `(4898, 4899) (High) ADCS Certificate Template Configuration Vulnerability`
509 |
510 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
511 | | :---: | :---: | :---: | :---: | :---: | :---: |
512 | | 4898 | Certificate Services Loaded A Template | 2 | Not Yet | Info~High | |
513 | | 4899 | Certificate Services Template Updated | 2 | Not Yet | Info~High | |
514 |
515 | > **Note: Many event IDs are enabled. Only the ones with sigma rules are shown above.**
516 |
517 | ### 6.2 Detailed File Share
518 |
519 | Volume: `Very high for file servers and DCs, however, may be necessary if you want to track who is accessing what files as well as detect various lateral movement.`
520 |
521 | > **Warning: There are no SACLs (System Access Control Lists) for shared folders so everything is logged.**
522 |
523 | Default settings: `No Auditing`
524 |
525 | Recommended settings: `No Auditing` due to the high noise level. Enable if you can though.
526 |
527 | Notable Sigma rules:
528 | * `(5145) (Med) Remote Task Creation via ATSVC Named Pipe`
529 | * `(5145) (High) Persistence and Execution at Scale via GPO Scheduled Task`
530 | * `(5145) (High) Impacket PsExec Execution`
531 | * `(5145) (High) Possible Impacket SecretDump Remote Activity`
532 | * `(5145) (High) First Time Seen Remote Named Pipe`
533 | * `(5145) (High) Possible PetitPotam Coerce Authentication Attempt`
534 | * `(5145) (Med) Suspicious Access to Sensitive File Extensions`
535 | * `(5145) (Med) Transferring Files with Credential Data via Network Shares`
536 |
537 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
538 | | :---: | :---: | :---: | :---: | :---: | :---: |
539 | | 5145 | Network Share File Access | 17 | Yes | Info~High | |
540 |
541 | ### 6.3 File Share
542 |
543 | Volume: `High for file servers and DCs.`
544 |
545 | Default settings: `No Auditing`
546 |
547 | Recommended settings: `Success and Failure`
548 |
549 | Notable Sigma rules:
550 | * `(5140) (Low) Access to ADMIN$ Share`
551 |
552 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
553 | | :---: | :---: | :---: | :---: | :---: | :---: |
554 | | 5140 | Network Share Connection | 1 | Yes | Info~High | Can be combined with File System auditing to track what files were accessed. |
555 | | 5142 | Network Share Created | 0 | Not Yet | Info | |
556 | | 5143 | Network Share Modified | 0 | Not Yet | Info | |
557 | | 5144 | Network Share Deleted | 0 | Not Yet | Info | |
558 | | 5168 | SPN Check For SMB/SMB2 Failed | 0 | Not Yet | Info | Seems to be a rare event. |
559 |
560 | ### 6.4 File System
561 |
562 | You need to separately configure audit permissions on files and/or folders in order for access to be logged.
563 | For example, by right-clicking, opening Properties, Security tab, Advanced, Auditing tab and then adding a Principal and what permissions to monitor.
564 | It is recommended only to monitor access to sensitive files as there will be too much noise if too many files are enabled for logging.
565 |
566 | Volume: `Depends on SACL rules`
567 |
568 | Default settings: `No Auditing`
569 |
570 | Recommended settings: `Enable SACLs just for sensitive files`
571 |
572 | Notable Sigma rules:
573 | * `(4663) (Med) ISO Image Mount`
574 | * `(4663) (High) Suspicious Teams Application Related ObjectAcess Event`: Detects access to MS Teams authentication tokens.
575 |
576 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
577 | | :---: | :---: | :---: | :---: | :---: | :---: |
578 | | 4656 | Object Handle Requested | 0 | Not Yet | Info | Fails if the process does not have the right permissions. You need to enable the `Handle Manipulation` subcategory to record these events. |
579 | | 4658 | Object Handle Closed | 0 | Not Yet | Info | You need to enable the `Handle Manipulation` subcategory to record these events. |
580 | | 4660 | Object Deleted | 0 | Not Yet | Info | |
581 | | 4663 | Object Access | 2 | Not Yet | Info~High | Differs from 4656 in that there are only success events. |
582 | | 4664 | Attempt To Create Hard Link | 0 | Not Yet | Info | Seems to be a rare event. |
583 | | 4670 | Object Permissions Changed | 0 | Not Yet | Info | |
584 | | 4985 | State Of A Transaction Changed | 0 | No | Info | Used for Transaction Manager and not relevant for security. Seems to be a rare event. |
585 | | 5051 | A File Was Virtualized | 0 | No | Info | Rarely occurs during LUAFV virtualization. Not relevant for security. Seems to be a rare event. |
586 |
587 | > **Note: EID 4656, 4658, 4660, 4663, 4670 are also used for access to registry and kernel objects as well as removable storage access but need to be configured separately.**
588 |
589 | ### 6.5 Filtering Platform Connection
590 |
591 | Logs when WFP (Windows Filtering Platform) allows or blocks port bindings and network connections.
592 |
593 | Volume: `High`
594 |
595 | Default settings: `No Auditing`
596 |
597 | Recommended settings: `Success and Failure` if you have enough space and are not monitoring network connections with sysmon. This should cause a high amount of events though.
598 |
599 | Notable Sigma rules:
600 | * `(5156) (Med) Enumeration via the Global Catalog)`: To detect Bloodhound and similar tools.
601 | * `(5156) (High) RDP over Reverse SSH Tunnel WFP`
602 | * `(5156) (High) Remote PowerShell Sessions Network Connections (WinRM)`
603 | * `(5156) (High) Suspicious Outbound Kerberos Connection`: Detects suspicious outbound network activity via kerberos default port indicating possible lateral movement or first stage PrivEsc via delegation.
604 |
605 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
606 | | :---: | :---: | :---: | :---: | :---: | :---: |
607 | | 5031 | WFP Blocked Incoming Connection | 0 | Not Yet | Info | |
608 | | 5150 | WFP Blocked A Packet | 0 | Not Yet | Info | |
609 | | 5151 | A More Restrictive WFP Filter Blocked A Packet | 0 | Not Yet | Info | |
610 | | 5154 | Process Listening For Connections | 0 | Not Yet | Info | |
611 | | 5155 | Process Blocked To Listen For Connections | 0 | Not Yet | Info | |
612 | | 5156 | Network Connection | 4 | Not Yet | Info~High | |
613 | | 5157 | Network Connection Blocked | 0 | Not Yet | Info | |
614 | | 5158 | Process Binded To Port | 0 | Not Yet | Info | |
615 | | 5159 | Process Blocked To Bind To Port | 0 | Not Yet | Info | |
616 |
617 | ### 6.6 Filtering Platform Packet Drop
618 |
619 | Volume: `High`
620 |
621 | Default settings: `No Auditing`
622 |
623 | Recommended settings: `Success and Failure` if you have enough space and are not monitoring network connections with sysmon. This should cause a high amount of events though.
624 |
625 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
626 | | :---: | :---: | :---: | :---: | :---: | :---: |
627 | | 5152 | WFP Blocked A Packet | 0 | Not Yet | Info | |
628 | | 5153 | A More Restrictive WFP Filter Blocked A Packet | 0 | Not Yet | Info | |
629 |
630 | ### 6.7 Handle Manipulation
631 |
632 | This subcategory needs to be enabled to enable events like `4656`, `4658` and `4661` in other subcategories. It also enables an additional event `4690`, however, this event not useful for investigations. It is recommended to enable this subcategory in order to enable more useful events in other subcategories.
633 |
634 | Default settings: `No Auditing`
635 |
636 | Recommended settings: `Success and Failure`
637 |
638 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
639 | | :---: | :---: | :---: | :---: | :---: | :---: |
640 | | 4690 | An attempt was made to duplicate a handle to an object | 0 | No | Info | Not relevant for security. |
641 |
642 | ### 6.8 Kernel Object
643 |
644 | This feature is mainly for kernel developers.
645 | This audits attempts to access the kernel objects, such as mutexes, symbolic links, named pipes, etc...
646 | Only kernel objects with SACLs generate security audit events. By default, kernel objects will not have SACLS defined so they will not be audited.
647 | You can enable auditing of all kernel objects by enabling `Audit the access of global system objects` (GPO: `Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options > Audit the access of global system objects`) which will define SACLS for all kernel objects, however, it is not recommended as you will probably generate too many unneeded events. On Windows 11, access to the lsass process seems to be enabled by default, which is good to monitor.
648 |
649 | Volume: `High if auditing access of global object access is enabled`
650 |
651 | Default settings: `No Auditing`
652 |
653 | Recommended settings: `Success and Failure` but do not enable `Audit the access of global system objects` as you will generate too many `4663: Object Access` events.
654 |
655 | Notable Sigma rules:
656 | * `(4656) (High) Generic Password Dumper Activity on LSASS`
657 | * `(4663) (Med) Suspicious Multiple File Rename Or Delete Occurred`: Detects multiple file rename or delete events occurrence within a specified period of time by a same user (these events may indicate ransomware activity).
658 |
659 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
660 | | :---: | :---: | :---: | :---: | :---: | :---: |
661 | | 4656 | Object Handle Requested | 4 | Not Yet | Info~High | You need to enable the `Handle Manipulation` subcategory to record this event. |
662 | | 4658 | Object Handle Closed | 0 | Not Yet | Info | You need to enable the `Handle Manipulation` subcategory to record this event. |
663 | | 4660 | Object Deleted | 0 | Not Yet | Info | |
664 | | 4663 | Object Access | 2 | Not Yet | Info | |
665 |
666 | > **Note: EID 4656, 4658, 4660, 4663 are also used for access to registry and file system objects as well as removable storage access but need to be configured separately.**
667 |
668 | ### 6.9 Other Object Access Events
669 |
670 | It is important to enable as malware will often abuse tasks for persistence and lateral movement.
671 |
672 | Volume: `Low`
673 |
674 | Default settings: `No Auditing`
675 |
676 | Recommended settings: `Success and Failure`
677 |
678 | Notable Sigma rules:
679 | * `(4698) (Low) Rare Schtasks Creations`: Detects rare scheduled tasks creations that only appear a few times per time frame and could reveal password dumpers, backdoor installs or other types of malicious code.
680 | * `(4699) (Low) Scheduled Task Deletion`
681 |
682 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
683 | | :---: | :---: | :---: | :---: | :---: | :---: |
684 | | 4691 | Indirect Access To Object | 0 | No | Info | Seems to be a rare event. |
685 | | 4698 | Task Created | 2 | Yes | Info~High | |
686 | | 4699 | Task Deleted | 1 | Yes | Info~Low | |
687 | | 4700 | Task Enabled | 0 | Not Yet | Info | |
688 | | 4701 | Task Disabled | 1 | Not Yet | Info | |
689 | | 4702 | Task Updated | 0 | Not Yet | Info | |
690 | | 5148 | WFP Detected DoS Attack And Is Blocking Source Packets | 0 | Not Yet | Info | |
691 | | 5149 | DoS Attack Has Subsided And Normal Processing Resumed | 0 | Not Yet | Info | |
692 | | 5888 | COM+ Catalog Object Modified | 0 | Not Yet | Info | |
693 | | 5889 | COM+ Catalog Object Deleted | 0 | Not Yet | Info | |
694 | | 5890 | COM+ Catalog Object Added | 0 | Not Yet | Info | |
695 |
696 | ### 6.10 Registry
697 |
698 | Many attacks and malware use the registry so it is a great place for evidence, however, it is difficult to only log only what is needed for detection and if you enable all registry access globally, there will be extreme volume of events and possible performance degradation.
699 |
700 | Volume: `Depends on SACLs`
701 |
702 | Default settings: `No Auditing`
703 |
704 | Recommended settings: `Set SACLs for only the registry keys that you want to monitor`
705 |
706 | Notable Sigma rules:
707 | * `(4656) (High) SAM Registry Hive Handle Request`: Attackers will try to access the SAM registry hive to obtain password hashes.
708 | * `(4656) (Med) SCM Database Handle Failure`: Detects non-system users failing to get a handle of the SCM database.
709 | * `(4657) (High) COMPlus_ETWEnabled Registry Modification`: Potential adversaries stopping ETW providers recording loaded .NET assemblies.
710 | * `(4657) (High) NetNTLM Downgrade Attack`
711 | * `(4657) (High) Sysmon Channel Reference Deletion`: Potential threat actor tampering with Sysmon manifest and eventually disabling it.
712 | * `(4657) (High) Creation of a Local Hidden User Account by Registry`
713 | * `(4657) (High) UAC Bypass via Sdclt`
714 | * `(4657) (High) Disable Security Events Logging Adding Reg Key MiniNt`
715 | * `(4657) (Crit) PrinterNightmare Mimimkatz Driver Name`
716 | * `(4657) (Crit) Security Support Provider (SSP) Added to LSA Configuration`: Detects the addition of a SSP to the registry. Upon a reboot or API call, SSP DLLs gain access to encrypted and plaintext passwords stored in Windows.
717 | * `(4657) (High) Suspicious Run Key from Download`
718 | * `(4657) (High) Suspicious Camera and Microphone Access`
719 | * `(4657) (Low) Usage of Sysinternals Tools`
720 | * `(4657) (Med) Common Autorun Keys Modification`
721 | * `(4657) (High) Disable Sysmon Event Logging Via Registry`
722 |
723 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
724 | | :---: | :---: | :---: | :---: | :---: | :---: |
725 | | 4656 | Object Handle Requested | 2 | Not Yet | Info~High | You need to enable the `Handle Manipulation` subcategory to record this event. |
726 | | 4657 | Registry Value Modified | 182 | Not Yet | Info~High | |
727 | | 4658 | Object Handle Closed | 0 | No | Info | You need to enable the `Handle Manipulation` subcategory to record this event. |
728 | | 4660 | Object Deleted | 0 | Not Yet | Info | |
729 | | 4663 | Object Access | 0 | Not Yet | Info~? | |
730 | | 4670 | Object Permissions Changed | 0 | Not Yet | Info~? | |
731 |
732 | > **Note: EID 4656, 4658, 4660, 4663, 4670 are also used for access to kernel and file system objects as well as removable storage access but need to be configured separately.**
733 |
734 | ### 6.11 Removable Storage
735 |
736 | This logs all file access to removable storage regardless of SACL settings.
737 | You may want to enable to track employees exfiltrating data via USB storage.
738 |
739 | Volume: `Depends on how much removable storage is used`
740 |
741 | Default settings: `No Auditing`
742 |
743 | Recommended settings: `Success and Failure` if you want to monitor external device usage.
744 |
745 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
746 | | :---: | :---: | :---: | :---: | :---: | :---: |
747 | | 4656 | Object Handle Requested | 0 | Not Yet | Info | You need to enable the `Handle Manipulation` subcategory to record this event. |
748 | | 4658 | Object Handle Closed | 0 | Not Yet | Info | You need to enable the `Handle Manipulation` subcategory to record this event. |
749 | | 4663 | Object Access | 0 | Not Yet | Info |
750 |
751 | > **Note: EID 4656, 4658, 4663 are also used for access to registry, kernel and file system objects but need to be configured separately.**
752 |
753 | ### 6.12 SAM (Security Account Manager)
754 |
755 | This will log attempts to access Security Account Manager (SAM) objects, such as user and computer accounts, groups, security descriptors, etc...
756 |
757 | Volume: `High volume of events on Domain Controllers`
758 |
759 | Default settings: `No Auditing`
760 |
761 | Recommended settings: `Success and Failure` if you can but may cause too high volume of noise so should be tested beforehand.
762 |
763 | Notable Sigma rules:
764 | * `(4661) (High) Reconnaissance Activity`: Detects activity such as "net user administrator /domain" and "net group domain admins /domain".
765 | * `(4661) (High) AD Privileged Users or Groups Reconnaissance`: Detect privileged users or groups recon based on 4661 eventid and known privileged users or groups SIDs.
766 |
767 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
768 | | :---: | :---: | :---: | :---: | :---: | :---: |
769 | | 4661 | Object Handle Requested | 2 | Not Yet | Info~High | You need to enable the `Handle Manipulation` subcategory to record this event. |
770 |
771 | ## 7. Policy Change
772 |
773 | ### 7.1 Audit Policy Change
774 |
775 | Changes to audit policy that are audited include:
776 | * Changing permissions and audit settings on the audit policy object (by using “auditpol /set /sd” command).
777 | * Changing the system audit policy.
778 | * Registering and unregistering security event sources.
779 | * Changing per-user audit settings.
780 | * Changing the value of CrashOnAuditFail.
781 | * Changing audit settings on an object (for example, modifying the system access control list (SACL) for a file or registry key).
782 | * Changing anything in the Special Groups list.
783 |
784 | Volume: `Low`
785 |
786 | Default settings: `Success`
787 |
788 | Recommended settings: `Success and Failure`
789 |
790 | Notable Sigma rules:
791 | * `(4719) (High) Disabling Windows Event Auditing`: Detects anti-forensics via local GPO policy.
792 |
793 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
794 | | :---: | :---: | :---: | :---: | :---: | :---: |
795 | | 4715 | The audit policy (SACL) on an object was changed. | 0 | Not Yet | Info | Logged regardless of Audit Policy Change settings. |
796 | | 4719 | System audit policy was changed. | 1 | Not Yet | Info~High | Logged regardless of Audit Policy Change settings. |
797 | | 4817 | Auditing settings on object were changed. | 0 | Not Yet | Info | Logged regardless of Audit Policy Change settings. Seems to be a rare event. |
798 | | 4902 | The Per-user audit policy table was created. | 0 | Not Yet | Info | Seems to be a rare event. |
799 | | 4904 | An attempt was made to register a security event source. | 0 | Not Yet | Info | |
800 | | 4905 | An attempt was made to unregister a security event source | 0 | Not Yet | Info | |
801 | | 4906 | The CrashOnAuditFail value has changed | 0 | No | Info | Logged regardless of Audit Policy Change settings. Seems to be a rare event. |
802 | | 4907 | Auditing settings on object were changed | 0 | Not Yet | Info | Seems to be a rare event. |
803 | | 4908 | Special Groups Logon table modified | 0 | Not Yet | Low | Logged regardless of Audit Policy Change settings. Seems to be a rare event. |
804 | | 4912 | Per User Audit Policy was changed | 0 | Not Yet | Low | Logged regardless of Audit Policy Change settings. Seems to be a rare event. |
805 |
806 | ### 7.2 Authentication Policy Change
807 |
808 | Changes made to authentication policy include:
809 | * Creation, modification, and removal of forest and domain trusts.
810 | * Changes to Kerberos policy under `Computer Configuration > Windows Settings > Security Settings > Account Policies > Kerberos Policy`.
811 | * When any of the following user logon rights is granted to a user or group:
812 | * Access this computer from the network
813 | * Allow logon locally
814 | * Allow logon through Remote Desktop
815 | * Logon as a batch job
816 | * Logon as a service
817 | * Namespace collision, such as when an added trust collides with an existing namespace name.
818 |
819 | This setting is useful for tracking changes in domain-level and forest-level trust and privileges that are granted to user accounts or groups.
820 |
821 | Volume: `Low`
822 |
823 | Default settings: `Success`
824 |
825 | Recommended settings: `Success and Failure`
826 |
827 | Notable Sigma rules:
828 | * `(4706) (Med) Addition of Domain Trusts`: Addition of domains is seldom and should be verified for legitimacy.
829 |
830 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
831 | | :---: | :---: | :---: | :---: | :---: | :---: |
832 | | 4670 | Object permissions changed. | 0 | Not Yet | Info | |
833 | | 4706 | A new trust was created to a domain. | 1 | Not Yet | Info~Med | |
834 | | 4707 | A trust to a domain was removed. | 0 | Not Yet | Med | |
835 | | 4713 | Kerberos policy was changed. | 0 | Not Yet | Info | |
836 | | 4716 | Trusted domain information was modified. | 0 | Not Yet | Med | |
837 | | 4717 | System security access was granted to an account. | 0 | Not Yet | Info | |
838 | | 4718 | System security access was removed from an account. | 0 | Not Yet | Info | |
839 | | 4739 | Domain Policy was changed. | 0 | Not Yet | Med | |
840 | | 4864 | A namespace collision was detected. | 0 | Not Yet | Info | |
841 | | 4865 | A trusted forest information entry was added. | 0 | Not Yet | Info | |
842 | | 4866 | A trusted forest information entry was removed. | 0 | Not Yet | Info | |
843 | | 4867 | A trusted forest information entry was modified. | 0 | Not Yet | Info | |
844 |
845 | ### 7.3 Authorization Policy Change
846 |
847 | Audits assignment and removal of user rights in user right policies, changes in security token object permission, resource attributes changes and Central Access Policy changes for file system objects.
848 |
849 | You can get information related to changes in user rights policies, or changes of resource attributes or Central Access Policy applied to file system objects.
850 | However, if you are using an application or system service that makes changes to system privileges through the AdjustPrivilegesToken API, it is not recommended to enable due to the high volume of events.
851 |
852 | Volume: `Medium to High`
853 |
854 | Default settings: `No Auditing`
855 |
856 | Recommended settings: `Unknown. Needs testing.`
857 |
858 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
859 | | :---: | :---: | :---: | :---: | :---: | :---: |
860 | | 4703 | A user right was adjusted. | 0 | Apparently s of Windows 10, this event is generated by applications and services that dynamically adjust token privileges. An example is Microsoft Endpoint Configuration Manager, which makes WMI queries at recurring intervals generating a large amount of events from the svchost.exe process. However, I have not seen this event. |
861 | | 4704 | A user right was assigned. | 0 | |
862 | | 4705 | A user right was removed. | 0 | |
863 | | 4670 | Object permissions changed. | 0 | |
864 | | 4911 | Resource attributes of the object were changed. | 0 | |
865 | | 4913 | Central Access Policy on the object was changed. | 0 | |
866 |
867 | ### 7.4 Filtering Platform Policy Change
868 |
869 | Audit events generated by changes to the Windows Filtering Platform (WFP), such as the following:
870 | * IPsec services status.
871 | * Changes to IPsec policy settings.
872 | * Changes to Windows Filtering Platform Base Filtering Engine policy settings.
873 | * Changes to WFP providers and engine.
874 |
875 | Volume: `Low`
876 |
877 | Default settings: `No Auditing`
878 |
879 | Recommended settings: `Unknown, Needs testing.`
880 |
881 | > There are too many events that are enabled with this sub-category to list up and no sigma detection rules that use these event IDs at the moment.
882 |
883 | ### 7.5 MPSSVC Rule-Level Policy Change
884 |
885 | Audit MPSSVC Rule-Level Policy Change determines whether the operating system generates audit events when changes are made to policy rules for the Microsoft Protection Service (MPSSVC.exe).
886 | The Microsoft Protection Service, which is used by Windows Firewall, is an integral part of the computer’s threat protection against malware. The tracked activities include:
887 | * Active policies when the Windows Firewall service starts.
888 | * Changes to Windows Firewall rules.
889 | * Changes to the Windows Firewall exception list.
890 | * Changes to Windows Firewall settings.
891 | * Rules ignored or not applied by the Windows Firewall service.
892 | * Changes to Windows Firewall Group Policy settings.
893 |
894 | Changes to firewall rules are important for understanding the security state of the computer and how well it is protected against network attacks.
895 |
896 | Volume: `Low`
897 |
898 | Default settings: `No Auditing`
899 |
900 | Recommended settings: `Unknown. Needs testing.`
901 |
902 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
903 | | :---: | :---: | :---: | :---: | :---: | :---: |
904 | | 4944 | Active policy when FW started. | 0 | Not Yet | Info | |
905 | | 4945 | Rule listed when FW started. | 0 | Not Yet | Info | |
906 | | 4946 | Rule added to FW exception list. | 0 | Not Yet | Info | |
907 | | 4947 | Rule modified to FW exception list. | 0 | Not Yet | Info | |
908 | | 4948 | Rule deleted from FW exception list. | 0 | Not Yet | Info | |
909 | | 4949 | FW settings restored to default. | 0 | Not Yet | Info | |
910 | | 4950 | FW setting changed. | 0 | Not Yet | Info | |
911 | | 4951 | FW rule ignored because major version number was not recognized. | 0 | Not Yet | Info | |
912 | | 4952 | Parts of FW rule ignored because minor version number was not recognized. | 0 | Not Yet | Info | |
913 | | 4953 | FW rule could not be parsed. | 0 | Not Yet | Info | |
914 | | 4954 | FW Group Policy settings changed. New settings applied. | 0 | Not Yet | Info | |
915 | | 4956 | FW active profile changed. | 0 | Not Yet | Info | |
916 | | 4957 | FW did not apply rule. | 0 | Not Yet | Info | |
917 | | 4958 | FW did not apply rule because rule referred to items not configured on this computer. | 0 | Not Yet | Info | |
918 |
919 | There are no sigma or hayabusa rules for this sub-category at the moment.
920 |
921 | ### 7.6 Other Policy Change Events
922 |
923 | Audit Other Policy Change Events contains events about EFS Data Recovery Agent policy changes, changes in Windows Filtering Platform filter, status on Security policy settings updates for local Group Policy settings, Central Access Policy changes, and detailed troubleshooting events for Cryptographic Next Generation (CNG) operations.
924 |
925 | Volume: `Low`
926 |
927 | Default settings: `No Auditing`
928 |
929 | Recommended settings: `No Auditing` (Note: ACSC recommends `Success and Failure`, however, this results in a lot of noise of `5447 (A Windows Filtering Platform filter has been changed)` events being generated.)
930 |
931 | > There are too many events that are enabled with this sub-category to list up and no sigma detection rules that use these event IDs at the moment.
932 |
933 | ## 8. Privilege Use
934 |
935 | ### 8.1 Non-Sensitive Use Events
936 |
937 | Audit Non-Sensitive Privilege Use contains events that show usage of non-sensitive privileges:
938 | * Access Credential Manager as a trusted caller
939 | * Add workstations to domain
940 | * Adjust memory quotas for a process
941 | * Bypass traverse checking
942 | * Change the system time
943 | * Change the time zone
944 | * Create a page file
945 | * Create global objects
946 | * Create permanent shared objects
947 | * Create symbolic links
948 | * Force shutdown from a remote system
949 | * Increase a process working set
950 | * Increase scheduling priority
951 | * Lock pages in memory
952 | * Modify an object label
953 | * Perform volume maintenance tasks
954 | * Profile single process
955 | * Profile system performance
956 | * Remove computer from docking station
957 | * Shut down the system
958 | * Synchronize directory service data
959 |
960 | Volume: `Very high`
961 |
962 | Default settings: `No Auditing`
963 |
964 | Recommended settings: `No Auditing`
965 |
966 | | Event ID | Description | Sigma Rules | Notes |
967 | | :---: | :---: | :---: | :---: |
968 | | 4673 | A privileged service was called. | 0 | |
969 | | 4674 | An operation was attempted on a privileged object. | 0 | |
970 | | 4985 | The state of a transaction has changed. | 0 | |
971 |
972 | > **Note: Non-sensitive and sensitive privilege use events use the same event ID.**
973 |
974 | ### 8.2 Sensitive Privilege Use
975 |
976 | Audit Sensitive Privilege Use contains events that show the usage of sensitive privileges:
977 | * Act as part of the operating system
978 | * Back up files and directories
979 | * Restore files and directories
980 | * Create a token object
981 | * Debug programs
982 | * Enable computer and user accounts to be trusted for delegation
983 | * Generate security audits
984 | * Impersonate a client after authentication
985 | * Load and unload device drivers
986 | * Manage auditing and security log
987 | * Modify firmware environment values
988 | * Replace a process-level token
989 | * Take ownership of files or other objects
990 |
991 | The use of two privileges, “Back up files and directories” and “Restore files and directories,” generate events only if the `Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options > Audit: Audit the access of global system objects` Group Policy setting is enabled.
992 | However, it is not recommended to enable this Group Policy setting because of the high number of events recorded.
993 |
994 | Volume: `High`
995 |
996 | Default settings: `No Auditing`
997 |
998 | Recommended settings: `Success and Failure` However, this may be too noisy.
999 |
1000 | Notable Sigma rules:
1001 | * `(4673) (High) User Couldn't Call a Privileged Service 'LsaRegisterLogonProcess'`: The 'LsaRegisterLogonProcess' function verifies that the application making the function call is a logon process by checking that it has the SeTcbPrivilege privilege set. Possible Rubeus tries to get a handle to LSA.
1002 | * `(4673) (Med) Suspicious Driver Loaded By User`: Detects the loading of drivers via 'SeLoadDriverPrivilege' required to load or unload a device driver. With this privilege, the user can dynamically load and unload device drivers or other code in to kernel mode. This user right does not apply to Plug and Play device drivers. If you exclude privileged users/admins and processes, which are allowed to do so, you are maybe left with bad programs trying to load malicious kernel drivers. This will detect Ghost-In-The-Logs (https://github.com/bats3c/Ghost-In-The-Logs) and the usage of Sysinternals and various other tools. So you have to work with a whitelist to find the bad stuff.
1003 | * `(4674) (Med) SCM Database Privileged Operation`: Detects non-system users performing privileged operation os the SCM database.
1004 |
1005 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
1006 | | :---: | :---: | :---: | :---: | :---: | :---: |
1007 | | 4673 | A privileged service was called. | 2 | Not Yet | Info~High | |
1008 | | 4674 | An operation was attempted on a privileged object. | 1 | Not Yet | Info~Med | |
1009 | | 4985 | The state of a transaction has changed. | 0 | Not Yet | Info | |
1010 |
1011 | > **Note: Non-sensitive and sensitive privilege use events use the same event ID.**
1012 |
1013 | ## 9. System
1014 |
1015 | ### 9.1 Other System Events
1016 |
1017 | Audit Other System Events contains Windows Firewall Service and Windows Firewall driver start and stop events, failure events for these services and Windows Firewall Service policy processing failures:
1018 | * Startup and shutdown of the Windows Firewall service and driver.
1019 | * Security policy processing by the Windows Firewall service.
1020 | * Cryptography key file and migration operations.
1021 | * BranchCache events.
1022 |
1023 | Volume: `Low`
1024 |
1025 | Default settings: `Success and Failure`
1026 |
1027 | Recommended settings: `Unknown. Needs testing.`
1028 |
1029 | > There are too many events that are enabled with this sub-category to list up and no sigma detection rules that use these event IDs at the moment.
1030 |
1031 | ### 9.2 Security State Change
1032 |
1033 | Audit Security State Change contains Windows startup, recovery, and shutdown events, and information about changes in system time.
1034 |
1035 | Volume: `Low`
1036 |
1037 | Default settings: `Success`
1038 |
1039 | Recommended settings: `Success and Failure`
1040 |
1041 | Notable Sigma rules:
1042 | * `(4616) (Low) Unauthorized System Time Modification`: Detect scenarios where a potentially unauthorized application or user is modifying the system time.
1043 |
1044 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
1045 | | :---: | :---: | :---: | :---: | :---: | :---: |
1046 | | 4608 | Windows is starting up. | 0 | Not Yet | Info | This event does not seem to be generated. |
1047 | | 4616 | The system time was changed. | 1 | Not Yet | Low | |
1048 | | 4621 | Administrator recovered system from CrashOnAuditFail. | 0 | No | Info | Seems to be a rare event. |
1049 |
1050 | ### 9.3 Security System Extension
1051 |
1052 | This policy setting allows you to audit events related to security system extensions or services such as the following:
1053 | * A security system extension, such as an authentication, notification, or security package is loaded and is registered with the Local Security Authority (LSA). It is used to authenticate logon attempts, submit logon requests, and any account or password changes. Examples of security system extensions are Kerberos and NTLM.
1054 | * A service is installed and registered with the Service Control Manager. The audit log contains information about the service name, binary, type, start type, and service account.
1055 |
1056 | Volume: `Low, but more on DCs`
1057 |
1058 | Default settings: `No Auditing`
1059 |
1060 | Recommended settings: `Success and Failure`
1061 |
1062 | Notable Sigma rules:
1063 | * `(4611) (High) Register new Logon Process by Rubeus`: Detects potential use of Rubeus via registered new trusted logon process.
1064 | * `(4697) (High) Invoke-Obfuscation Obfuscated IEX Invocation`
1065 | * `(4697) (High) Invoke-Obfuscation Via Use Rundll32`
1066 | * `(4697) (High) Invoke-Obfuscation Via Use MSHTA`
1067 | * `(4697) (High) CobaltStrike Service Installations`
1068 | * `(4697) (High) Credential Dumping Tools Service Execution`
1069 | * `(4697) (Crit) Malicious Service Installations`
1070 | * `(4697) (Crit) Meterpreter or Cobalt Strike Getsystem Service Installation`
1071 |
1072 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
1073 | | :---: | :---: | :---: | :---: | :---: | :---: |
1074 | | 4610 | An authentication package has been loaded by the Local Security Authority. | 0 | No | ? | According to MS, this should be monitored with an allowlist but this event seems to not be generated. |
1075 | | 4611 | A trusted logon process has been registered with the Local Security Authority. | 1 | Not Yet | Low~High | Should display "SYSTEM" in the "Subject" field. |
1076 | | 4614 | A notification package has been loaded by the Security Account Manager. | 0 | No | ? | Seems to be a rare event. |
1077 | | 4622 | A security package has been loaded by the Local Security Authority. | 0 | No | ? | Seems to be a rare event. |
1078 | | 4697 | A service was installed in the system. | 20 | Yes | Info~High | This is the most important event in this sub-category. Requires Win 10/2016+. |
1079 |
1080 | ### 9.4 System Integrity
1081 |
1082 | Audit System Integrity determines whether the operating system audits events that violate the integrity of the security subsystem:
1083 | * Audited events are lost due to a failure of the auditing system.
1084 | * A process uses an invalid local procedure call (LPC) port in an attempt to impersonate a client, reply to a client address space, read to a client address space, or write from a client address space.
1085 | * A remote procedure call (RPC) integrity violation is detected.
1086 | * A code integrity violation with an invalid hash value of an executable file is detected.
1087 | * Cryptographic tasks are performed.
1088 |
1089 | According to Microsoft, violations of security subsystem integrity are critical and could indicate a potential security attack.
1090 |
1091 | Volume: `Low`
1092 |
1093 | Default settings: `Sucess, Failure`
1094 |
1095 | Recommended settings: `Success and Failure`
1096 |
1097 | Currently, there are no sigma rules for this sub-category.
1098 |
1099 | | Event ID | Description | Sigma Rules | Hayabusa Rules | Level | Notes |
1100 | | :---: | :---: | :---: | :---: | :---: | :---: |
1101 | | 4612 | Potential Log Loss Due To Lack Of Resources | 0 | Not Yet | Med | This should be important to monitor but I have not seen it. |
1102 | | 4615 | Invalid use of LPC port. | 0 | No | Info | Seems to be a rare event. |
1103 | | 4618 | A monitored security event pattern has occurred. | 0 | No | None | This event can only be invoked manually. |
1104 | | 4816 | RPC Integrity Violation | 0 | Not Yet | Low | Orginally `RPC detected an integrity violation while decrypting an incoming message`. Seems to be a rare event. |
1105 | | 5038 | Code Integrity Error: Invalid Image Hash | 0 | Yes | Low | Originally `Code integrity determined that the image hash of a file is not valid. The file could be corrupt due to unauthorized modification or the invalid hash could indicate a potential disk device error`. |
1106 | | 5056 | A cryptographic self-test was performed. | 0 | No | None | Seems to be a rare event. |
1107 | | 5057 | A cryptographic primitive operation failed. | 0 | No | Info | Seems to be a rare event. |
1108 | | 5060 | Verification operation failed. | 0 | No | Info | Seems to be a rare event. |
1109 | | 5061 | Cryptographic operation. | 0 | No | Info | Seems to be a rare event. |
1110 | | 5062 | A kernel-mode cryptographic self-test was performed. | 0 | No | Info | Seems to be a rare event. |
1111 | | 6281 | Code Integrity Error: Invalid Image Page Hash | 0 | Yes | Low | Originally `Code Integrity determined that the page hashes of an image file are not valid. The file could be improperly signed without page hashes or corrupt due to unauthorized modification. The invalid hashes could indicate a potential disk device error.` |
1112 | | 6410 | Code Integrity Error: Requirements Not Met | 0 | Yes | Low | Seems to be a rare event. |
1113 |
1114 | ## 10. Global Object Access Auditing
1115 |
1116 | You can configure all `File system` and `Registry` access to be recorded here but it is not recommended for production due to the very high amount of logs you will generate.
1117 | It is recommended to turn on when simulating attacks to find out what registry and files are changed in order to write detection rules.
1118 |
1119 | ## Default Logs
1120 |
1121 | Event IDs that are enabled by default that should be monitored will be listed below.
1122 |
1123 | | Event ID | Description | Hayabusa Rules | Level | Notes |
1124 | | :---: | :---: | :---: | :---: | :---: |
1125 | | 1100 | Event Log Service Shutdown | Not Yet | Info | Seems to be a rare event. |
1126 | | 1101 | Logs Dropped | Not Yet | Med | Seems to be a rare event. |
1127 | | 1102 | Sec Log Cleared | Yes | High | |
1128 | | 1104 | Sec Log Full | Not Yet | High | Seems to be a rare event. |
1129 | | 1108 | Event Log Service Error | Not Yet | Med | Seems to be a rare event. |
--------------------------------------------------------------------------------