🔓
Security

Open RDP: the most frequently breached service and how to close it

04.12.2026
← All articles

Remote Desktop Protocol (RDP) is the most convenient way to manage a Windows computer or server remotely. People use it to reach an office server running accounting software from home, configure Windows Server on a VPS or help staff at a branch office. The problem is that many expose RDP directly to the internet, and security vendors' reports repeatedly list open RDP among the most common entry points for ransomware attacks.

Why RDP becomes a target

RDP usually listens on port 3389, and bots scan that port across the entire address space all the time. Once they find it, automated password guessing begins with typical usernames like "Administrator" or "admin", popular passwords and credentials leaked from other sites. One weak password is enough for an attacker to log in like an employee, with no vulnerability needed. Flaws in the service itself are the second risk: CVE-2019-0708, known as BlueKeep, allowed unauthenticated code execution on unpatched older Windows versions in 2019. Once inside, attackers typically delete backups, disable antivirus and then encrypt files.

Example: an accounting firm in Tashkent

A small accounting firm in Tashkent keeps 1C databases and client documents on an office Windows Server. So staff could work from home, the administrator forwarded port 3389 on the router straight to the server. One morning every file has a new extension and each folder contains a ransom note. The logs show thousands of failed logins over several weeks, ending in a successful login through a former employee's account with a simple password. The backups on a network drive attached to the server were encrypted as well.

Check whether your server is exposed

On the server, a fDenyTSConnections value of 0 means RDP is enabled:

Get-ItemProperty 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name fDenyTSConnections

Then test from another network, replacing 203.0.113.10 with your own public IP and scanning only an address you own:

nmap -Pn -p 3389 203.0.113.10

If the port is "open", the whole internet can see your server. Moving RDP to a non-standard port is not real protection, since scanners check every port.

The main fix: put RDP behind a VPN

Do not expose the RDP port at all. Staff connect to the office network over VPN, such as WireGuard or OpenVPN, and then use RDP to the internal address. Internet scanners never see RDP. Larger organisations can use Remote Desktop Gateway, which tunnels RDP over HTTPS and supports extra authentication.

If RDP must stay reachable

At minimum, allow connections only from known IP addresses. Disable the built-in RDP rules (the group name depends on the Windows language) and create a restricted rule:

Disable-NetFirewallRule -DisplayGroup "Remote Desktop"
New-NetFirewallRule -DisplayName "RDP only from office" -Direction Inbound `
  -Protocol TCP -LocalPort 3389 -RemoteAddress 203.0.113.0/24 -Action Allow

Make sure Network Level Authentication (NLA) is on, so users authenticate before a full session is created:

Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' `
  -Name UserAuthentication -Value 1

Slow down password guessing with an account lockout policy. On a standalone server, this locks an account for 15 minutes after 5 wrong passwords within 15 minutes; in a domain, set it through Group Policy:

net accounts /lockoutthreshold:5 /lockoutwindow:15 /lockoutduration:15

Grant RDP rights only to people who need them, disable leavers' accounts immediately, avoid using the built-in "Administrator" account day to day and give each person a separate account with a long unique password. Add multi-factor authentication through Remote Desktop Gateway or a third-party solution where possible.

Logs, updates and backups

Windows records each failed logon in the Security log as event 4625:

Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625} -MaxEvents 20

Hundreds of such events from external addresses in a short time mean RDP is exposed and under attack. Install Windows updates regularly, since RDP flaws are fixed that way. Finally, keep at least one backup copy disconnected from the server and its network drives, and test restores from time to time. If your server is a VPS and you need port filtering at the network level, check the options in the sayt.uz cabinet or ask support.

Related articles

🔑 Which Passwords to Change After a Website Hack: Full List and Order 🛑 Red browser warning screen: the causes and how to tell them apart 🛡️ Uzbekistan's Personal Data Law: what a website owner must do 📋 Terms of use page: what it should contain
🌐 Language
🇺🇿 O⁠'zbek 🇺🇿 Özbek (yangi) 🇺🇿 Ўзбек 🇷🇺 Русский 🇬🇧 English ✓