DET-112 · human · confidence High

RDP Enablement Registry Change

Detect the registry flip that turns Remote Desktop on, together with a matching firewall rule.

Remote Desktop is controlled by the fDenyTSConnections value under the Terminal Server key. A value of 1 means it is blocked, and 0 means it is allowed. An insider who wants remote access to a machine, perhaps one holding sensitive data, can switch it with a one-line command.

Collect registry set events with Sysmon event 13 or with Security 4657 after a SACL is set on the key. Add detection for new inbound firewall rules for port 3389 in the same window.

Data sources
Sysmon Event ID 12/13Windows Security 4657Windows Firewall log
Platforms
Windows

Logic

registry_set | where TargetObject endswith "Terminal Server\\fDenyTSConnections" and Details == "DWORD (0x00000000)" | join kind=leftouter firewall_rule_added(port=3389) on host within 15m

False positives

Server builds, remote administration tools and group policy can enable RDP intentionally. Check the process that wrote the value.

Catches 2 techniques