How RDP Works: Remote Desktop, NLA, Brute Force & BlueKeep (Animated)
RDP lets you see and control a Windows desktop over the network. It is extremely useful for administrators, and for the same reason an RDP port open to the internet is one of the most common ways ransomware gangs get in.
1. Connection request: which security will we use?
The client connects to TCP 3389 and says which security it supports.
- X.224 REQUEST (Admin laptop → Windows server): The client asks for the strongest option: TLS with NLA.
- X.224 CONFIRM (Windows server → Admin laptop): The server agrees.
Wireshark filter:
rdp
2. Tls + nla: encrypt, then authenticate first
A TLS tunnel is set up, then the user’s credentials are checked through it before any desktop is created.
- TLS HANDSHAKE (Admin laptop → Windows server): From here on, the traffic is encrypted.
- CredSSP (Admin laptop → Windows server): Credentials are verified first.
- AUTH OK (Windows server → Admin laptop): Only now does Windows build a desktop session.
Wireshark filter:
tls && tcp.port == 3389
3. The remote desktop: screen out, keyboard and mouse in
The server streams screen updates; the client sends key presses and mouse moves.
- GRAPHICS (Windows server → Admin laptop): The desktop appears on the admin’s laptop.
- INPUT (Admin laptop → Windows server): Input travels the other way.
Wireshark filter:
tcp.port == 3389
4. Brute force: attack: rdp exposed to the internet
Search engines like Shodan list millions of open RDP ports. Bots try password lists nonstop; one weak admin password hands over the whole server.
- CredSSP (Attacker → Windows server): Thousands of attempts, visible as Event ID 4625 in the Security log.
- AUTH OK (Windows server → Attacker): The attacker gets a full desktop as administrator. This is how many ransomware incidents begin.
Wireshark filter:
tcp.dstport == 3389 && tcp.flags.syn == 1
5. Hide it, lock it: defence: never expose 3389
Close RDP at the firewall and reach it only through a VPN or RD Gateway with MFA. Keep NLA on, set account lockout, and patch.
- SYN (Attacker → Windows server): From the internet the port simply doesn’t exist.
Windows / firewall:
Block inbound TCP 3389 from the internet Account lockout threshold: 5 attempts Require Network Level Authentication: Enabled
Practise this in a real lab
Scan for exposed RDP, review real brute-force logs, and publish RDP safely through a VPN and RD Gateway with MFA.
Explore ER Segment training →FAQ
What is NLA?
Network Level Authentication: the user must authenticate before Windows creates a desktop session, which blocks many pre-login attacks.
What was BlueKeep?
CVE-2019-0708, a pre-authentication remote code execution bug in RDP on older Windows versions. NLA and patching mitigate it.
Is changing the RDP port enough?
No. Scanners find it quickly. Put RDP behind a VPN or gateway with MFA.