Network Ports, a lovely topic to understand and memorize. Everyone has room in their brain to memorize thousands of integers and their corresponding functions. Seriously, if you memorize even a small fraction of the ports you are sickening.
Firstly, it is important to understand what a port is:
A network port serves as a communication endpoint for process-specific or application-specific software. This is used by the Transport Layer protocols of Internet Protocol suite including UDP (User Diagram Protocol) and TCP (Transmission Control Protocol). A port is identified by its port number, the IP address the port is associated with and the type of transport protocol used for communication. The port number is a 16-bit unsigned integer ranging from 0-65535.
The “well-known ports” are simply port numbers between 0 and 1023. These numbers are reserved for assignment by the Internet Assigned Numbers Authority (IANA). Each application that is assigned a port number in this range is considered to be “well-known” as most of the population maintains the application on it’s assigned port number. However, any application can use any port number if properly configured to do so. You technically don’t have to follow any port assignments and some people even purposely alter their port number assignments to deter attackers and just make it a bit more annoying when port scanning. This certainly won’t prevent an experienced hacker however it can certainly cause issues for beginners.
link to IANA assignments:
Yes, it’s true you technically don’t need to memorize these ports. They are a simple google search away, therefore you might be wondering why it is important to attempt to memorize some of these. The biggest reason is of course just to make life easier. When doing recon or securing your own network it is super helpful to know some of the big ports such.
A super resourceful website which is ran by a well-known author that has helped tons of people obtain security related certificates lists helpful port numbers to memorize here: http://blogs.getcertifiedgetahead.com/understanding-ports
Darril Gibson goes over this topic of network ports on the linked page which is specifically for students looking to take the security+ exam. Therefore he focuses on what is needed to be known for the exam. Great Resource
If you are looking for a visual of ports and how to scan them take a look at What is Nmap? where I give an explanation of the famous network mapping tool (Nmap).