Detection of Registry-Based Disabling of Windows Command Prompt
Malware and threat actors modify Windows registry keys to disable the Command Prompt (cmd.exe) as a defense evasion tactic to hinder incident response and system remediation.
Threat actors frequently employ registry modifications to disable critical system tools as a means of defense evasion. Specifically, by setting the "DisableCMD" registry value to 1 within the Windows Policies hive, an attacker can prevent the execution of cmd.exe. This activity is observed in various malware campaigns, including Remote Access Trojans (RATs), worms, and other malicious software aimed at maintaining persistence or preventing security analysts from utilizing native tools for file management, directory traversal, and investigation during incident response. While legitimate administrative use cases for disabling CMD exist, unexpected modifications to this registry path, especially when performed by non-administrative processes, should be treated as a high-fidelity indicator of malicious intent or unauthorized configuration changes.
Impact
Successful execution of this technique prevents security analysts and system administrators from using the Windows Command Prompt, significantly complicating the remediation and investigation of an active security incident. This constraint limits the ability to manually inspect files, perform system diagnostics, or run administrative scripts required to contain the threat, thereby extending the attacker's dwell time and operational window within the environment.
Recommendation
Prioritize the implementation of registry monitoring to detect modifications to the "DisableCMD" policy. Deploy the provided Sigma rule to identify unauthorized changes to the registry path associated with policy-based command prompt restriction. Ensure Sysmon Event ID 13 or equivalent registry auditing is enabled across the workstation and server fleet. Investigate all alerts generated by this detection, specifically focusing on the parent process and the user context that performed the modification.
Immediate actions
Deploy Sigma rule for DisableCMD registry key monitoring.
Threat Hunt
Search for historical changes to HKLM\SOFTWARE\Policies\Microsoft\Windows\System\DisableCMD.
Data: Registry modification telemetry
Mitigations
Review Group Policy objects to identify legitimate CMD restrictions.
T1112
Detection coverage 1
Detect Disabling of Windows Command Prompt via Registry
mediumDetects modifications to the 'DisableCMD' registry value which restricts the use of cmd.exe, a common defense evasion technique.
Detection queries are available on the platform. Get full rules →