Five ports every hacker remembers: 21, 22, 80, 443, 3389

☰ All 15 lessons

There are more than 65,000 ports. But a hacker looks at these five first.

Ports and services

From lesson 6: every application or service runs on a port. Some port numbers are used for certain services as a standard, so when you see that number open, you can usually say which service is running there. These are the five you'll see the most.

PortServiceWhat it's forWhy attackers care
21FTPTransferring filesPlain FTP sends the username and password unencrypted, like HTTP
22SSHLogging in to a server remotely and typing commandsEncrypted, but weak passwords get brute-forced: attackers try password after password
80HTTPWebsitesOpen on almost every web server; attackers go after bugs in the web app behind it
443HTTPSSecure websitesSame: the target is the web application, not the port
3389RDPSeeing and controlling a Windows desktop from far awayLeft open to the internet, it's a common way ransomware attacks begin

What to do when you see them

  • 21 open? Ask why plain FTP is still used; SFTP (over SSH) or FTPS encrypt the login.
  • 22 open to the internet? Use keys instead of passwords, and limit who can connect.
  • 80 and 443? Expected on a web server. The real testing happens on the web application.
  • 3389 open to the internet? Treat it as urgent: put it behind a VPN instead.

We've seen this on our own website: hundreds of login attempts from abroad within minutes. Read how we stopped a brute-force attack.

Next time an Nmap scan (lesson 15) shows these ports open, you should know immediately which service is running there. 21, 22, 80, 443, 3389. Remember them.

Key takeaways

  • 21 FTP: file transfer, plain-text logins.
  • 22 SSH: remote command line; protect it from brute force.
  • 80 HTTP / 443 HTTPS: websites; attackers target the web app.
  • 3389 RDP: Windows remote desktop; never expose it to the internet.

Quick quiz

Pick an answer to check yourself. Answer both to mark this lesson done.

1. Which port does RDP, for controlling a Windows computer remotely, usually use?

  1. A) 21
  2. B) 22
  3. C) 443
  4. D) 3389
Show answer

Answer: D. RDP (Remote Desktop Protocol) usually listens on port 3389.

2. Which file transfer protocol sends the username and password unencrypted?

  1. A) FTP (21)
  2. B) SSH (22)
  3. C) HTTPS (443)
  4. D) RDP (3389)
Show answer

Answer: A. Plain FTP sends the username and password as plain text. SSH and HTTPS are encrypted.

Frequently asked questions

What are the most common ports?

FTP 21, SSH 22, SMTP 25, DNS 53, HTTP 80, HTTPS 443 and RDP 3389 are among the ones you will see most often.

Why is port 3389 dangerous?

Port 3389 is Remote Desktop (RDP). Exposed to the internet, it is attacked with password guessing and exploits, and is a common starting point for ransomware.

Is port 22 secure?

SSH on port 22 is encrypted, but weak passwords can be brute-forced. Use key-based login and restrict access.

Do it hands-on.

This tutorial gives you the concepts. The 50 Days Ethical Hacking Challenge puts them to work in real labs, explained in Malayalam.