Detection of Wevtutil.exe Used to Disable Event Logs
The execution of `wevtutil.exe` with parameters to disable event logs is a tactic commonly employed by ransomware to evade detection and hinder forensic investigations, leading to a significant reduction in visibility for defenders.
Attackers, particularly ransomware groups, often disable or manipulate event logs to cover their tracks and hinder forensic investigations. This activity typically occurs post-compromise as part of an attacker’s defense evasion strategy. The use of wevtutil.exe, a legitimate Windows command-line utility, makes this technique challenging to detect without specific monitoring. Ransomware actors disable logging to operate undetected, making it difficult for security teams to trace malicious activities and respond effectively. This can prolong the dwell time of the attacker within the environment and increase the potential for widespread damage, data exfiltration, or system encryption.
Attack Chain
- Initial access is gained through typical methods like phishing or exploiting public-facing vulnerabilities.
- The attacker executes code on the compromised system, achieving initial foothold.
- Privilege escalation techniques are employed to gain elevated permissions (e.g., using exploits, token manipulation).
- The attacker uses
wevtutil.exewith specific commands to disable or clear event logs. Example commands includewevtutil.exe sl <logname> falseorwevtutil.exe set-log <logname> /enabled:false. - The attacker disables specific event channels to remove evidence of their activity.
- Persistence mechanisms are established to maintain access across reboots (e.g., creating scheduled tasks, modifying registry keys).
- Lateral movement is initiated to compromise additional systems within the network using tools like PsExec or SMB shares.
- The final objective, such as ransomware deployment or data exfiltration, is executed, with logging disabled to minimize the chances of detection.
Impact
Successful disabling of event logs allows attackers to operate undetected, hindering forensic investigations and incident response efforts. This can lead to delayed detection of breaches, prolonged dwell time for attackers, and increased damage to affected organizations. Ransomware groups frequently use this technique to maximize the impact of their attacks, resulting in data encryption, exfiltration, and significant financial losses.
Recommendation
- Enable Sysmon process creation logging (Event ID 1) to detect the execution of
wevtutil.exewith suspicious parameters. - Deploy the Sigma rules provided below to your SIEM to detect specific command-line arguments used to disable event logs.
- Monitor Windows Event Log Security (4688) for process creation events of
wevtutil.exewith arguments related to disabling or clearing logs. - Investigate any instances where
wevtutil.exeis executed with parameters likeslorset-logand/e:falseor/enabled:falsein the command line, as highlighted in the provided Sigma rules.
Detection coverage 2
Detect Wevtutil.exe Disabling Event Logs via Commandline
highDetects the execution of wevtutil.exe with command-line arguments used to disable event logs.
Detect Wevtutil.exe Clearing Event Logs via Commandline
mediumDetects the execution of wevtutil.exe with command-line arguments used to clear event logs.
Detection queries are kept inside the platform. Get full rules →