title: Introduction to Hacking - Port scanning show-content: 1
The point of port scanning a server is to detected its open ports and the port's listening services. Once a hacker knows all the vulnerabilities they might have and exploit them to take control of your website. In the port scannign example, we will use the most popular port scanner: Nmap. The Nmap Security Scanner is available for Linux and other operating systems. To install it run the following commands:
If you are running an Arch-based distribution:
sudo pacman -S nmap
If you are running a Debian-based distribution:
sudo apt install nmap
If you are running Void linux;
sudo xbps-install nmap
If you are running Gentoo:
emerge nmap
To perform a fast scan in Nmap execute the following command:
nmap -F <target url>
And the result of a fast scan might look like the following:
PORT STATE SERVICE
80/tcp open http
443/tcp open https
There a lot more types of scans and interesting functionalities, learning how to properly use nmap is completely worth your time.