Port Scan in Ethical Hacking (original) (raw)

Last Updated : 16 May, 2026

Port scanning is a technique used to identify open ports and services running on a target system in a network. It is commonly used in cybersecurity for vulnerability assessment, system auditing and troubleshooting, while attackers may use it for reconnaissance to discover potential entry points before exploitation. The process works by sending TCP or UDP packets to a host and analyzing the responses to determine the state of ports.

client_with_map_installed

Ports & Services

Ports are virtual communication endpoints on a computer that allow different services to exchange data over a network. Each port is assigned a unique number known as a port number. There are 65,535 available ports, but only some are commonly used and important for standard networking services.

**All ports are classified into three categories:

**Common Port Numbers and Their Services

Port Number Service Purpose
20, 21 FTP (File Transfer Protocol) Used for transferring files between systems
22 SSH (Secure Shell) Secure login to remote computers
23 Telnet Remote login (insecure, outdated)
25 SMTP (Simple Mail Transfer Protocol) Sending emails
53 DNS (Domain Name System) Translates domain names to IP addresses
80 HTTP (HyperText Transfer Protocol) Loading websites
110 POP3 (Post Office Protocol 3) Receiving emails
143 IMAP (Internet Message Access Protocol) Managing and reading emails
443 HTTPS (HTTP Secure) Secure version of HTTP
3306 MySQL Used by MySQL databases
3389 RDP (Remote Desktop Protocol) Remote desktop access on Windows

These ports help hackers understand what services are running on a target system. Open ports can be entry points, which is why scanning and securing them is so important in ethical hacking.

Objectives of Port Scanning

Port scanning is one of the first steps in ethical hacking after reconnaissance. It helps ethical hackers understand how a system is set up. Here are the main reasons port scanning is done:

1. Discover Open Ports

Port scanning helps identify which ports on a system are open and actively accepting connections. Each open port usually indicates a running service that can communicate over the network. This helps in understanding what parts of a system are exposed.

2. Identify Running Services

After finding open ports, the next step is to determine which services are running behind them. Different ports are associated with different services such as web servers, SSH or databases. This helps assess whether services are necessary and secure.

3. Map the Attack Surface

The attack surface refers to all possible entry points an attacker can use to access a system. Port scanning helps map this surface by listing all accessible services and ports. This makes it easier to identify weak areas in the system.

Types of Port Scans

To protect your network from port scans, it is essential to understand the different types of port scans used by hackers.

Types of Ports Found During Scan

Not all ports respond to scanning, there could be different reasons for this such as the port not being open or there could be a firewall preventing a data packet to reach to the port. There are usually the following types of ports found during a scan:

Several tools are commonly used in ethical hacking to perform port scanning. These tools help identify open ports, running services and potential vulnerabilities in a network. Below are some of the most popular and effective ones:

Limitations