Windows Registry Modification to Disable Logoff Functionality
Adversaries, specifically ransomware operators, modify Windows Registry keys to disable the logoff button, hindering incident response and forcing session persistence.
Adversaries, particularly those deploying ransomware, may modify Windows Registry keys to intentionally disable the logoff functionality on a compromised system. By targeting the 'NoLogOff' or 'StartMenuLogOff' registry values within the 'SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer' path, an attacker can prevent a user from ending their session. This technique is often used to complicate incident response, as it forces users to remain logged in, thereby preserving the attacker's persistence on the system and potentially preventing administrative remediation efforts from terminating malicious sessions. This behavior has been observed in various ransomware campaigns aiming to make the host unusable for the victim while maintaining unauthorized control over the environment.
Attack Chain
- The attacker gains initial access to the Windows host through phishing, exploit, or credential theft.
- The attacker executes a malicious binary or script with sufficient privileges to modify the Windows Registry.
- The attacker locates the target registry hive, typically 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer'.
- The attacker adds or modifies the 'NoLogOff' or 'StartMenuLogOff' registry value name.
- The attacker sets the registry value data to '0x00000001' to effectively disable the logoff feature.
- The system policy is updated, immediately reflecting the change in the Windows shell and preventing the user from performing a normal logoff.
- The attacker proceeds with additional stages, such as data exfiltration or ransomware encryption, while the active user session remains locked into the compromised environment.
Impact
Successful implementation of this modification prevents users from logging off, which complicates incident response and containment procedures for security teams. This tactic is primarily used to prolong the window of opportunity for ransomware operators to finalize their objectives before detection or system reboot occurs.
Recommendation
- Deploy the Sigma rule below to detect unauthorized modifications to explorer-related registry keys.
- Establish a monitoring baseline for registry changes occurring in 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer' to identify non-administrative activity.
- Investigate the originating process responsible for the registry change, as this often points to the primary malware or staging script used in the incident.
Immediate actions
Deploy registry monitoring for 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\' modifications.
Threat Hunt
Search for existing 'NoLogOff' entries in the registry across the estate.
Data: Registry auditing logs
Mitigations
Standardize endpoint configurations via GPO to overwrite malicious registry modifications.
T1112
Detection coverage 1
Detect Registry Modification to Disable Logoff
mediumDetects registry modifications to 'NoLogOff' or 'StartMenuLogOff' in the explorer policies key, a technique often used by ransomware to persist in user sessions.
Detection queries are available on the platform. Get full rules →