A port scan sends client requests to a server port addresses on a host for finding an active port. The design and operation of the Internet is based on TCP/IP. A port can have some behavior like below:
- Open or Accepted: The host sent a reply indicating that a service is listening on the port.
- Closed or Denied or Not Listening: The host sent a reply indicating that connections will be denied to the port.
- Filtered, Dropped or Blocked: There was no reply from the host.
This is often used by administrators to verify security policies of their networks and can be used by an attacker to identify running services on a host with the view to compromise it.
To find all open/listening ports in your Kali Linux machine, we’ll use Netstat tool which is an open source tool and is already installed in Kali Linux OS. Netstat prints information about the Linux networking subsystem.
According to Wikipedia – Netstat (network statistics) is a command-line network utility tool that displays network connections for the Transmission Control Protocol (both incoming and outgoing), routing tables, and a number of network interface (network interface controller or software-defined network interface) and network protocol statistics.
It is available on Unix-like operating systems including macOS, Linux, Solaris, and BSD, and is available on Windows NT-based operating systems including Windows XP, Windows Vista, Windows 7, Windows 8 and Windows 10.
To find open ports, type the below command in your machine terminal.
Command: sudo netstat -plntu
Where, -p = display PID/Program name for sockets,
-l = display listening server sockets,
-n = don’t resolve names,
-t = tcp ports,
-u = udp ports
As you can see in above screenshot, the port numbers 5432, 5433, 80 and 68 ports are open in which Port 80 is associated with Apache Service and Port 68 is associated with Dhclient Service, and rest all other ports are linked with Postgres service.You may also like:
- The Intricate Process of Designing and Developing Online Casino Slot Games
- Bella Protocol vs. Traditional Banking: A New Era of Financial Services
- How Does Spam Score Affect SEO?
- Top Email Marketing Applications for Effective Campaigns
- Edit and Compile Code with the Best 5 Code Editors
- 50+ Top DevSecOps Tools You Need To Know
- Learn How to Add Proxy and Multiple Accounts in MoreLogin
- Can Jews and Evangelical Christians Co-Exist?
- What Will Be Digital Information Technology in 2023
- Advantages Of Using Opkey SAP Testing Services