Adversaries may disable Windows event logging to limit data that can be leveraged for detections and audits. Windows event logs record user and system activity such as login attempts, process creation, and much more.[1] This data is used by security tools and analysts to generate detections.
The EventLog service maintains event logs from various system components and applications.[2] By default, the service automatically starts when a system powers on. An audit policy, maintained by the Local Security Policy (secpol.msc), defines which system events the EventLog service logs. Security audit policy settings can be changed by running secpol.msc, then navigating to Security Settings\Local Policies\Audit Policy for basic audit policy settings or Security Settings\Advanced Audit Policy Configuration for advanced audit policy settings.[3][4] auditpol.exe may also be used to set audit policies.[5]
Adversaries may target system-wide logging or just that of a particular application. For example, the Windows EventLog service may be disabled using the Set-Service -Name EventLog -Status Stopped or sc config eventlog start=disabled commands (followed by manually stopping the service using Stop-Service -Name EventLog).[6][7] Additionally, the service may be disabled by modifying the "Start" value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog then restarting the system for the change to take effect.[7]
There are several ways to disable the EventLog service via registry key modification. First, without Administrator privileges, adversaries may modify the "Start" value in the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\EventLog-Security, then reboot the system to disable the Security EventLog.[8] Second, with Administrator privilege, adversaries may modify the same values in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\EventLog-System and HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\EventLog-Application to disable the entire EventLog.[7]
Additionally, adversaries may use auditpol and its sub-commands in a command prompt to disable auditing or clear the audit policy. To enable or disable a specified setting or audit category, adversaries may use the /success or /failure parameters. For example, auditpol /set /category:"Account Logon" /success:disable /failure:disable turns off auditing for the Account Logon category.[9][10] To clear the audit policy, adversaries may run the following lines: auditpol /clear /y or auditpol /remove /allusers.[10]
By disabling Windows event logging, adversaries can operate while leaving less evidence of a compromise behind.
| ID | Name | Description |
|---|---|---|
| C0025 | 2016 Ukraine Electric Power Attack |
During the 2016 Ukraine Electric Power Attack, Sandworm Team disabled event logging on compromised systems.[11] |
| C0038 | HomeLand Justice |
During HomeLand Justice, threat actors deleted Windows events and application logs.[12] |
| G0059 | Magic Hound |
Magic Hound has executed scripts to disable the event log service.[13] |
| C0024 | SolarWinds Compromise |
During the SolarWinds Compromise, APT29, used |
| G0027 | Threat Group-3390 |
Threat Group-3390 has used appcmd.exe to disable logging on a victim server.[15] |
| S0645 | Wevtutil |
Wevtutil can be used to disable specific event logs on the system.[16] |
| ID | Mitigation | Description |
|---|---|---|
| M1047 | Audit |
Consider periodic review of |
| M1022 | Restrict File and Directory Permissions |
Ensure proper process and file permissions are in place to prevent adversaries from disabling or interfering with logging or deleting or modifying .evtx logging files. Ensure .evtx files, which are located at |
| M1024 | Restrict Registry Permissions |
Ensure proper Registry permissions are in place to prevent adversaries from disabling or interfering logging. The addition of the MiniNT registry key disables Event Viewer.[18] |
| M1018 | User Account Management |
Ensure proper user permissions are in place to prevent adversaries from disabling or interfering with logging. |
| ID | Name | Analytic ID | Analytic Description |
|---|---|---|---|
| DET0187 | Detect disabled Windows event logging | AN0535 |
Detection of attempts to disable or tamper with Windows Event Logging. This includes stopping or disabling the EventLog service, modifying registry keys related to EventLog and Autologger, using |