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.
| Port | Service | What it's for | Why attackers care |
|---|---|---|---|
| 21 | FTP | Transferring files | Plain FTP sends the username and password unencrypted, like HTTP |
| 22 | SSH | Logging in to a server remotely and typing commands | Encrypted, but weak passwords get brute-forced: attackers try password after password |
| 80 | HTTP | Websites | Open on almost every web server; attackers go after bugs in the web app behind it |
| 443 | HTTPS | Secure websites | Same: the target is the web application, not the port |
| 3389 | RDP | Seeing and controlling a Windows desktop from far away | Left 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.
Game: which service runs on this port?
Pick the service. Seven common ports, shuffled. How many can you get in a row?
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?
- A) 21
- B) 22
- C) 443
- 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?
- A) FTP (21)
- B) SSH (22)
- C) HTTPS (443)
- 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.