← Back

Common Network Ports & Protocols: A Cybersecurity Attack Surface Guide

In the intricate tapestry of computer networks, ports and protocols are fundamental concepts. Think of ports as specific doorways or channels on a device where network conversations take place, and protocols as the languages or rules governing those conversations. Together, they enable diverse services and applications to communicate efficiently.

While these standardized communication channels are essential for the internet's functionality, they also represent a significant attack surface for cybercriminals. Understanding common ports and their associated protocols, along with their typical vulnerabilities, is crucial for both network defenders and aspiring ethical hackers.

Ports are numerical identifiers (0-65535) that differentiate between services running on a single host. The Internet Assigned Numbers Authority (IANA) categorizes them into three ranges:

  • Well-known Ports (0-1023): Assigned to commonly used services (e.g., HTTP, FTP, SSH).
  • Registered Ports (1024-49151): Assigned to user-specific or registered applications.
  • Dynamic/Private Ports (49152-65535): Used for ephemeral connections, often by clients.

Let's delve into some of the most common well-known ports and their associated security considerations.

Essential Ports, Protocols, and Their Associated Attacks

1. Port 20 (TCP): FTP Data

  • Protocol: File Transfer Protocol (FTP) - Data
  • Purpose: Used for the actual transfer of data between the client and server during an FTP session.
  • Associated Attacks: Often exploited in conjunction with Port 21. If firewalls are misconfigured, it can facilitate:
    • FTP Bounce Attacks: Using the FTP server's PORT command to scan ports on other hosts or relay connections to unintended targets.

2. Port 21 (TCP): FTP Control

  • Protocol: File Transfer Protocol (FTP) - Control
  • Purpose: Used for sending commands and control information between an FTP client and server (e.g., authentication, file management commands).
  • Associated Attacks:
    • Cleartext Credentials: FTP transmits usernames and passwords in plaintext, making them highly susceptible to sniffing and interception (Man-in-the-Middle attacks).
    • Brute-Force Attacks: Automated tools repeatedly guess login credentials.
    • Anonymous Access Misconfigurations: If anonymous access is enabled and poorly configured, it can allow unauthorized access to sensitive files or even enable malicious file uploads.
    • Directory Traversal: Exploiting misconfigured servers to access files outside the intended directory.
    • Buffer Overflows: Vulnerabilities in FTP server software can lead to crashes or remote code execution.
    • Denial of Service (DoS): Overwhelming the server with connections or malformed requests.
    • Malware Uploads: Uploading malicious files that can then be used to compromise the server or network.

3. Port 22 (TCP): SSH

  • Protocol: Secure Shell (SSH)
  • Purpose: Provides a secure, encrypted channel for remote command-line access, remote file transfer (SFTP/SCP), and secure tunneling.
  • Associated Attacks:
    • Brute-Force Attacks: SSH is a prime target for automated password guessing due to its remote access capabilities.
    • Weak Credentials/Keys: Exploiting easily guessable passwords or poorly managed SSH keys.
    • Software Vulnerabilities: Exploiting bugs in outdated or misconfigured SSH server implementations (e.g., buffer overflows, authentication bypasses).
    • SSH Hijacking: Though difficult, if session keys are compromised, an attacker can take over an active SSH session.
    • IP Spoofing: Attempting to bypass IP-based access controls by forging source IP addresses.

4. Port 23 (TCP): Telnet

  • Protocol: Telnet
  • Purpose: Provides a basic, unencrypted command-line interface for remote access to network devices and servers.
  • Associated Attacks: Highly Insecure! Telnet transmits all data, including usernames and passwords, in plaintext.
    • Eavesdropping/Sniffing: Any attacker on the network can easily intercept and read sensitive information, including login credentials.
    • Man-in-the-Middle (MITM) Attacks: Attackers can intercept and manipulate the unencrypted communication.
    • Brute-Force Attacks: Similar to SSH, but the lack of encryption makes credential theft even easier if successful.
    • Malware Propagation: Can be used as a vector for remote execution of malicious commands.
    • Complete System Takeover: Due to the cleartext nature, a successful login means full access.

5. Port 25 (TCP): SMTP

  • Protocol: Simple Mail Transfer Protocol (SMTP)
  • Purpose: Used for sending and relaying emails between mail servers.
  • Associated Attacks:
    • Spamming/Open Relays: Historically, misconfigured SMTP servers could be used as "open relays" to send massive amounts of spam.
    • Email Spoofing: Forging sender email addresses to disguise the origin of spam, phishing, and business email compromise (BEC) attacks.
    • Email Bombing: Overwhelming a recipient's inbox with a huge volume of emails.
    • DDoS Attacks: Flooding the mail server with connection requests.
    • Malware Spreading: Delivering malicious attachments (viruses, ransomware) via email.
    • Data Exfiltration: Malicious insiders or compromised systems can use SMTP to exfiltrate sensitive data out of the network.

6. Port 53 (TCP/UDP): DNS

  • Protocol: Domain Name System (DNS)
  • Purpose: Resolves human-readable domain names (e.g., google.com) into machine-readable IP addresses. UDP is primarily used for queries; TCP is used for zone transfers between DNS servers and for larger responses.
  • Associated Attacks:
    • DNS Spoofing/Cache Poisoning: Injecting false DNS records into a DNS resolver's cache, redirecting users to malicious websites instead of legitimate ones.
    • DNS Amplification Attacks (DDoS): Exploiting open DNS resolvers to generate massive amounts of UDP traffic that reflect onto a target, overwhelming its network.
    • DNS Hijacking: Unauthorized changes to DNS configurations, redirecting traffic for an entire domain.
    • DNS Tunneling: Exfiltrating data or establishing command-and-control (C2) channels by encoding information within DNS queries and responses, bypassing firewalls.

7. Ports 67 & 68 (UDP): DHCP

  • Protocol: Dynamic Host Configuration Protocol (DHCP)
  • Purpose: Automatically assigns IP addresses and other network configuration parameters (subnet mask, gateway, DNS servers) to devices on a network. Port 67 for servers, 68 for clients.
  • Associated Attacks:
    • DHCP Starvation: An attacker floods the DHCP server with fake DHCP requests using spoofed MAC addresses, exhausting the pool of available IP addresses. This leads to a DoS for legitimate clients.
    • Rogue DHCP Server: An attacker sets up an unauthorized DHCP server on the network. Legitimate clients may then receive IP configurations from the rogue server, which can provide malicious DNS servers or default gateways, leading to MITM attacks or redirection to malicious sites.

8. Port 80 (TCP): HTTP

  • Protocol: Hypertext Transfer Protocol (HTTP)
  • Purpose: The foundation of the World Wide Web, used for transmitting unencrypted web pages and resources.
  • Associated Attacks: Highly Vulnerable due to lack of encryption.
    • Man-in-the-Middle (MITM) Attacks: Attackers can easily intercept, read, and modify any data transmitted over HTTP (credentials, sensitive information).
    • SSL Stripping (HTTPS Downgrade): An attacker intercepts HTTPS requests and downgrades the connection to unencrypted HTTP, making the traffic vulnerable.
    • Session Hijacking: Stealing session cookies (often transmitted in cleartext) to impersonate an authenticated user.
    • Web Application Attacks: While not strictly HTTP vulnerabilities, applications running over HTTP are highly susceptible to:
      • SQL Injection (SQLi)
      • Cross-Site Scripting (XSS)
      • Cross-Site Request Forgery (CSRF)
      • File Inclusion/Upload vulnerabilities
      • DDoS (Application Layer DDoS): Flooding web servers with HTTP requests.
    • Phishing/Malware Distribution: Using compromised HTTP sites to host phishing pages or distribute malware.

9. Port 110 (TCP): POP3

  • Protocol: Post Office Protocol version 3 (POP3)
  • Purpose: Used by email clients to retrieve emails from a mail server. By default, it downloads emails to the local device and often deletes them from the server.
  • Associated Attacks:
    • Cleartext Credentials: Like Telnet and FTP, standard POP3 transmits usernames and passwords in plaintext, making them vulnerable to sniffing.
    • Brute-Force Attacks: Attempting to guess email account passwords.
    • Email-borne Threats: Although POP3 itself isn't directly exploited for malware, it's the delivery mechanism for phishing, spam, and malicious attachments.

10. Port 137, 138 (UDP) & 139 (TCP): NetBIOS/SMB

  • Protocols: NetBIOS (Network Basic Input/Output System) over TCP/IP, Server Message Block (SMB).
  • Purpose: Primarily used for file sharing, printer sharing, and network Browse on Windows networks.
  • Associated Attacks: These ports have been historically exploited due to older, vulnerable SMB implementations.
    • Credential Theft/SMB Relay: Intercepting and relaying SMB authentication requests to gain unauthorized access.
    • Brute-Force Attacks: Targeting weak share or user credentials.
    • Vulnerability Exploitation: Older SMBv1 (often on port 139) had numerous critical vulnerabilities (e.g., EternalBlue, exploited by WannaCry and NotPetya ransomware).
    • Lateral Movement: Once initial access is gained, SMB can be used to move laterally within a compromised network.

11. Port 143 (TCP): IMAP

  • Protocol: Internet Message Access Protocol (IMAP)
  • Purpose: Used by email clients to retrieve and manage emails on a mail server, allowing users to keep emails synchronized across multiple devices.
  • Associated Attacks:
    • Cleartext Credentials: Standard IMAP also transmits credentials in plaintext, making it vulnerable to sniffing.
    • Brute-Force Attacks: Similar to POP3, targeting email account passwords.
    • Email-borne Threats: As with POP3, IMAP is a common delivery channel for phishing, spam, and malware.
    • Vulnerable IMAP Servers: Exploiting bugs in IMAP server software (less common than application layer attacks but possible).

12. Port 443 (TCP): HTTPS

  • Protocol: Hypertext Transfer Protocol Secure (HTTPS)
  • Purpose: Encrypted communication for web Browse, using SSL/TLS to secure HTTP traffic.
  • Associated Attacks: While HTTPS encrypts traffic, it doesn't make the application invulnerable.
    • SSL/TLS Misconfigurations: Using outdated TLS versions (e.g., TLS 1.0/1.1), weak cipher suites, or improper certificate validation can lead to vulnerabilities (e.g., POODLE, Heartbleed, FREAK, Logjam, renegotiation attacks).
    • HTTPS Downgrade Attacks (SSL Stripping): An attacker forces the connection back to insecure HTTP (Port 80) if not properly protected by HSTS.
    • Malware over HTTPS: Attackers can hide command-and-control (C2) traffic or deliver malware over encrypted channels, making detection more difficult for basic security tools.
    • Certificate Spoofing/Phishing: Using valid (but malicious or stolen) SSL/TLS certificates for phishing sites to appear legitimate.
    • Web Application Attacks: All application-layer attacks (SQLi, XSS, CSRF) are still applicable, even if the transport is encrypted.

13. Port 445 (TCP): SMB over TCP/IP

  • Protocol: Server Message Block (SMB)
  • Purpose: The modern version of SMB, which runs directly over TCP/IP without NetBIOS, primarily used for Windows file and print sharing, and inter-process communication.
  • Associated Attacks: A highly critical port for Windows environments.
    • WannaCry/NotPetya (EternalBlue): Exploited severe vulnerabilities in SMBv1 (which also affected later versions if not patched) to spread ransomware globally.
    • Remote Code Execution (RCE): Exploiting unpatched SMB flaws to execute arbitrary code on remote systems.
    • Lateral Movement: Widely used by attackers to move across compromised networks after gaining initial access.
    • Credential Theft/Relay: Exploiting flaws to capture or relay authentication credentials.
    • Brute-Force Attacks: Targeting weak SMB share or user authentication.

14. Port 3389 (TCP): RDP

  • Protocol: Remote Desktop Protocol (RDP)
  • Purpose: Allows users to graphically control a remote computer or server over a network connection.
  • Associated Attacks:
    • Brute-Force Attacks: Very common due to the direct remote access. Attackers try numerous username/password combinations.
    • Credential Theft: If RDP traffic is not properly secured, credentials can be intercepted.
    • Unpatched Vulnerabilities: Older Windows operating systems have had critical RDP vulnerabilities (e.g., BlueKeep) allowing unauthenticated remote code execution.
    • Denial of Service (DoS): Overwhelming RDP servers with connection requests.
    • Insider Threats: Malicious authorized users can use RDP to exfiltrate data or disrupt operations.
    • Exposed RDP: Leaving RDP port 3389 open to the internet is a major security risk, making it a primary target for scanning and exploitation.

15. Port 8080 (TCP): HTTP Alternate

  • Protocol: HTTP (often)
  • Purpose: Commonly used as an alternative HTTP port for web servers, proxy servers, or development environments when Port 80 is unavailable or for non-standard web applications.
  • Associated Attacks:
    • Same as HTTP (Port 80): All vulnerabilities applicable to HTTP apply here.
    • Less Monitored: Because it's not the standard port, it might be overlooked in security configurations or monitoring, making it an attractive target for attackers to hide services or backdoors.
    • Exposed Admin Panels: Often used for administrative interfaces for applications or services, which can be vulnerable if not properly secured (weak credentials, unpatched software).

The Cybersecurity Implications

Understanding common ports and protocols is a cornerstone of cybersecurity:

  • Reconnaissance: Attackers often begin by "port scanning" a target to identify open ports and services, revealing potential entry points.
  • Attack Vector Identification: Knowing the default functions and common vulnerabilities of protocols helps pinpoint likely attack vectors.
  • Firewall Configuration: Security professionals use this knowledge to configure firewalls, allowing only necessary traffic and blocking dangerous or unused ports.
  • Vulnerability Management: Staying updated on vulnerabilities specific to protocols running on these ports is critical for patching and mitigation.
  • Incident Response: When an attack occurs, understanding which protocols and ports were involved helps in tracing the attack path and containing the damage.

By being intimately familiar with the roles of these common ports and protocols, and the attack methodologies that exploit them, individuals and organizations can significantly strengthen their network defenses and proactively reduce their attack surface.


Common Ports

Here's a table of some of the most common ports you'll encounter:

Port Number(s)ProtocolService/DescriptionCommon Usage & Security Notes
20TCPFTP DataUsed for the actual data transfer in FTP active mode. Often paired with port 21.
21TCPFTP ControlFile Transfer Protocol control channel. Used for commands and responses. Unencrypted, consider SFTP/FTPS.
22TCPSSHSecure Shell. Encrypted remote login and command execution. Essential for secure remote administration.
23TCPTelnetRemote login service. Unencrypted, making it highly insecure for sensitive data. Avoid if possible.
25TCPSMTPSimple Mail Transfer Protocol. Used for sending emails between mail servers.
53TCP/UDPDNSDomain Name System. Translates domain names to IP addresses (e.g., google.com to 172.217.160.142).
67, 68UDPDHCP (Server/Client)Dynamic Host Configuration Protocol. Assigns IP addresses to devices on a network.
69UDPTFTPTrivial File Transfer Protocol. Simple, unauthenticated file transfers. Often used for firmware updates.
80TCPHTTPHypertext Transfer Protocol. Used for unencrypted web traffic.
110TCPPOP3Post Office Protocol version 3. Used by email clients to retrieve emails from a server. Unencrypted.
123UDPNTPNetwork Time Protocol. Synchronizes computer clocks across a network.
137, 138, 139TCP/UDPNetBIOSLegacy Windows networking services (Name Service, Datagram Service, Session Service). Often seen with SMB.
143TCPIMAPInternet Message Access Protocol. Used by email clients to retrieve and manage emails on a server. Unencrypted.
161, 162UDPSNMP (Agent/Trap)Simple Network Management Protocol. Used for monitoring and managing network devices.
389TCP/UDPLDAPLightweight Directory Access Protocol. Used for accessing and maintaining distributed directory information services (e.g., Active Directory).
443TCPHTTPSHypertext Transfer Protocol Secure. Encrypted web traffic (HTTP over SSL/TLS). Standard for secure websites.
445TCPSMB/CIFS (Microsoft-DS)Server Message Block/Common Internet File System. Used for Windows file sharing and printer sharing. Often a target for exploits (e.g., EternalBlue).
587TCPSMTP SubmissionModern SMTP port for email client submissions to mail servers, often with authentication and encryption.
636TCPLDAPSLDAP over SSL/TLS. Secure version of LDAP.
993TCPIMAPSIMAP over SSL/TLS. Secure version of IMAP.
995TCPPOP3SPOP3 over SSL/TLS. Secure version of POP3.
3306TCPMySQLDefault port for MySQL database communication.
3389TCPRDPRemote Desktop Protocol. Allows remote access to a Windows desktop. Often targeted by brute-force attacks.
5432TCPPostgreSQLDefault port for PostgreSQL database communication.
8080TCPHTTP Proxy / Alternative HTTPOften used for web proxies, alternative web servers, or non-standard web applications.

Network ports are crucial for allowing different applications and services to communicate over a network. Each port is identified by a unique number and associated with specific protocols. Understanding common port numbers is fundamental for network administrators, developers, and cybersecurity professionals.

Ports are categorized into three main ranges:

  • Well-Known Ports (0-1023): Reserved for system processes and commonly used services.
  • Registered Ports (1024-49151): Assigned by IANA (Internet Assigned Numbers Authority) to specific applications and services.
  • Dynamic/Private Ports (49152-65535): Used for temporary, client-side connections and not assigned to specific services.

***
Note on Content Creation: This article was developed with the assistance of generative AI like Gemini or ChatGPT. While all public AI strives for accuracy and comprehensive coverage, all content is reviewed and edited by human experts at IsoSecu to ensure factual correctness, relevance, and adherence to our editorial standards.