Skip to content
Threat Feed
medium advisory

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

  1. The attacker gains initial access to the Windows host through phishing, exploit, or credential theft.
  2. The attacker executes a malicious binary or script with sufficient privileges to modify the Windows Registry.
  3. The attacker locates the target registry hive, typically 'HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer'.
  4. The attacker adds or modifies the 'NoLogOff' or 'StartMenuLogOff' registry value name.
  5. The attacker sets the registry value data to '0x00000001' to effectively disable the logoff feature.
  6. The system policy is updated, immediately reflecting the change in the Windows shell and preventing the user from performing a normal logoff.
  7. 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.

Detection Engineering 48h

Threat Hunt

Search for existing 'NoLogOff' entries in the registry across the estate.

T1112 high high confidence hunt now

Data: Registry auditing logs

Mitigations

Standardize endpoint configurations via GPO to overwrite malicious registry modifications.

medium_term IT Operations

T1112

Detection coverage 1

Detect Registry Modification to Disable Logoff

medium

Detects registry modifications to 'NoLogOff' or 'StartMenuLogOff' in the explorer policies key, a technique often used by ransomware to persist in user sessions.

sigma tactics: defense_evasion techniques: T1112 sources: registry_set, windows

Detection queries are available on the platform. Get full rules →