RDP Enable or Disable via Win32_TerminalServiceSetting WMI Class
Detects enabling or disabling of Remote Desktop Protocol (RDP) using alternate methods such as WMIC or PowerShell. In PowerShell one-liner commands, the "SetAllowTSConnections" method of the…
Description
Detects enabling or disabling of Remote Desktop Protocol (RDP) using alternate methods such as WMIC or PowerShell. In PowerShell one-liner commands, the "SetAllowTSConnections" method of the "Win32_TerminalServiceSetting" class may be used to enable or disable RDP. In WMIC, the "rdtoggle" alias or "Win32_TerminalServiceSetting" class may be used for the same purpose.
Detection logic
Detection requirements
- Platform
- Windows
The rule states no platform. This is derived from the 2 ATT&CK techniques it maps to.
- Log source product
- windows
- Log source category
- process_creation
Known benign triggers
- Legitimate system administrators enabling RDP for remote support
- System configuration scripts during deployment
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| github.com/HackTricks-wiki/hacktricks/blob/72f20a3fa26775b932bd819f1824c6377802a768/src/windows-hardening/basic-cmd-for-pentesters.md#firewall | Only this detection cites it |
| github.com/Lifailon/RSA/blob/rsa/Sources/RSA-1.4.1.ps1#L1468 | Only this detection cites it |
| www.trendmicro.com/en_gb/research/22/e/uncovering-a-kingminer-botnet-attack-using-trend-micro-managed-x.html | Only this detection cites it |
From the source
- At source
- Open at source
- Upstream identifier
- 4b8f6d3a-9c5e-4f2a-a7d8-6b9c3e5f2a8d
- Tagged by the source as
- attack.executionattack.lateral-movement
Licence
- Published under
- Detection Rule License 1.1Read the licence
- Attribution
- Required
Authorship
- Published
- Aug 26, 2026
- Version
- 1