Detection of Registry-Based RDP Disablement
Adversaries, including the ShrinkLocker ransomware, modify the Windows fDenyTSConnections registry key to disable remote administration and isolate hosts during malicious campaigns.
Adversaries, notably the ShrinkLocker ransomware, frequently target the Windows Registry to impede incident response and remote management. By modifying the "fDenyTSConnections" value within the Terminal Server control key, attackers can effectively disable Remote Desktop Protocol (RDP) access. Setting this registry value to '1' prevents remote administrative sessions, which is a common tactic to isolate infected systems, evade live response, and disrupt automated remediation efforts. This modification is typically observed during the late stages of an attack chain when the adversary seeks to finalize their control over the endpoint or secure their presence before performing destructive actions such as file encryption.
Attack Chain
- Attacker gains administrative or system-level privileges on the target host.
- Attacker prepares for final-stage impact (e.g., ransomware deployment).
- Attacker identifies the target registry path: HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server.
- Attacker writes to the "fDenyTSConnections" registry value using command-line tools like reg.exe or PowerShell.
- Registry modification completes, immediately disabling incoming RDP connections.
- RDP service remains running, but the OS policy blocks all new network-based remote login attempts.
- Attacker proceeds with the primary objective (e.g., encryption, exfiltration, or persistence).
Impact
Successful modification of the "fDenyTSConnections" key results in the loss of remote administrative capability. This forces incident responders to rely on physical access or out-of-band management tools to remediate the system. When part of a ransomware attack like ShrinkLocker, this isolation prevents security teams from quickly terminating processes, dumping memory for analysis, or retrieving logs from the infected host.
Recommendation
- Deploy the provided Sigma rule to monitor for registry modifications targeting the "fDenyTSConnections" key.
- Enable Sysmon Event ID 13 (Registry Event) across all endpoints to ensure visibility into registry modifications.
- Baseline legitimate administrative activity regarding RDP management to reduce false positives generated by system administrators.
- Use the resulting alerts to trigger immediate investigation of the process responsible for the modification and the user context involved.
Immediate actions
Deploy Sigma rule for fDenyTSConnections monitoring
Threat Hunt
Search for historical changes to fDenyTSConnections across the fleet
Data: Registry modification logs (Sysmon EID 13 or native Windows auditing)
Mitigations
Review RDP access policies via Group Policy
T1112
Detection coverage 1
Detect Registry Modification to Disable RDP
mediumDetects unauthorized modifications to the fDenyTSConnections registry key, which disables RDP access.
Detection queries are available on the platform. Get full rules →