Port

Created August 19, 2025 Last modified August 23, 2025 @ 11:38 PM

A port is a virtual entry or exit point for a network connection. Ports are assigned numerical values from 0 to 65,535. There are 65,536 ports because ports are expressed as binary numbers with 16 digits, and so there are $2^{16} = 65,536$ ports. In practice, port 0 is rarely used and sometimes is used to refer to any port.

The first 1024 ports are designated for well known services and system processes like SSH (port 22), HTTP (port 80), and HTTPS (443).

The enumeration stage of an attack generally involves scanning ports with tools like [nmap] for services that are running and identifying vulnerabilities that could be exploited based on that information.