Back to course

Ports and Services: How Applications Communicate

Cyber Security Mastery: From Zero to Hero

The Role of Ports

While the IP address identifies the machine, the Port Number identifies the specific application or service running on that machine that handles the communication.

Ports are 16-bit numbers (0 to 65535).

Port Categories

  1. Well-Known Ports (0-1023): Reserved for the most common internet services.
  2. Registered Ports (1024-49151): Assigned by IANA for specific user applications.
  3. Dynamic/Private Ports (49152-65535): Used by client applications for outgoing connections.

Critical Well-Known Ports for Security

PortProtocolServiceSecurity Implication
21TCPFTP (File Transfer Protocol)Often insecure (cleartext passwords).
22TCPSSH (Secure Shell)Encrypted remote access (Good).
23TCPTelnetInsecure remote access (Bad).
80TCPHTTPUnencrypted web traffic.
443TCPHTTPSEncrypted web traffic (Secure HTTP).
3389TCPRDP (Remote Desktop Protocol)Common target for brute-force attacks.