Cybersecurity: Port Scanning with Nmap

Cybersecurity: Port Scanning with Nmap

So, I just wrote an article about how super awesome RustScan is, and I thought I would provide some usage for Nmap. Nmap is still my go-to tool, and I use it by default. But you see, if you know me, you know I'm not content with just one tool in my arsenal. I love exploring new hacking tools and, of course, sharing my discoveries. So, I thought, why not do a quick usage for Nmap, show what it is, and how to make the most of it, and the advanced features it brings to the table.

Let's dive into Nmap, the good old classic, and see what makes it tick.

What is Nmap?

Nmap, short for Network Mapper, is an open-source and powerful network scanning tool that has been a favorite in the cybersecurity community for years. It is designed to discover open ports, identify services running on target hosts, and provide valuable information about the network's topology. It is widely used for security assessments, system administration, and network troubleshooting.


Before we delve into using Nmap, you'll need to install it. The good news is that Nmap is pre-installed in Kali Linux, a popular penetration testing distribution. For other Linux distributions, you can easily install Nmap using your package manager. Here's how:

sudo apt install nmap

For Windows and macOS users, you can download the installer from the official Nmap website and follow the installation instructions.

Basic Usage

Let's start with a basic scan using Nmap. The simplest way to use Nmap is by specifying the target host you want to scan. Here's the basic syntax:

nmap <target>

For example, to scan a target with the IP address "," you would use:


This command will perform a basic scan of common ports on the specified target and display the results.

Scanning Specific Ports

Nmap allows you to scan specific ports or a range of ports using the "-p" option. For example, to scan only port 80 and 443, use the following command:

nmap -p 80,443

To scan a range of ports, you can specify the range like this:

nmap -p 80-100

Aggressive Scanning

Nmap has an "aggressive" scan mode, which can provide more information about target hosts. To use this mode, you can add the "-A" flag to your scan:

nmap -A

The aggressive scan includes version detection, script scanning, and traceroute, giving you a comprehensive view of the target's services and potential vulnerabilities.

Script Scanning

One of Nmap's standout features is its scripting engine. You can use pre-built scripts or create custom scripts to extend Nmap's functionality. For example, to perform a script scan using the default scripts, use:

nmap -sC

To run a specific script, you can use:

nmap --script <script-name>

Nmap is not just a network scanning tool; it's a versatile and robust solution for network reconnaissance, security assessments, and network administration. Its flexibility, combined with a wealth of features and a large user community, makes it a must-have tool for anyone working in the field of cybersecurity.

So, the next time you need to scan a network, identify open ports, and uncover potential security issues, Nmap should be your go-to choice. It's a tool that's stood the test of time and remains one of the best options in the cybersecurity arsenal.

Nmap's ease of use, powerful features, and extensive documentation make it a solid choice for both beginners and experienced professionals. Give it a try and let me know what you think.

Did you find this article valuable?

Support Matthew Hard by becoming a sponsor. Any amount is appreciated!