DEV Community

Radz-04
Radz-04

Posted on

Understanding Nmap Beyond the Commands — My Cybersecurity Notes on GitHub

I've been working on a GitHub repository called Cybersecurity Survival Notes, where I collect and organize what I'm learning about Linux, networking, and penetration testing.

The idea is simple: I want a place where I can return to a topic, understand how something works, and find the commands or explanations I need without having to search through different resources every time.

Recently, I've expanded the penetration testing section with documentation on Footprinting and Scanning.

While working on this section, I wanted to focus on something that I think is particularly important when learning Nmap: understanding what the results actually tell us.

Running a scan is the easy part

Nmap offers plenty of options for discovering hosts, scanning ports, and identifying services.

For example, to discover hosts within an authorized network:

nmap -sn 192.168.56.0/24
Enter fullscreen mode Exit fullscreen mode

The -sn option performs host discovery without running a port scan.

However, an important detail is that an unresponsive host isn't necessarily offline. Firewalls, network configurations, and filtering rules can affect whether a host responds to discovery probes.

If host discovery is unreliable, Nmap can skip that phase:

nmap -Pn -p 22,80,443 192.168.56.10
Enter fullscreen mode Exit fullscreen mode

With -Pn, Nmap treats the specified target as online and proceeds with the scan.

This doesn't prove that the host is actually running. It simply tells Nmap not to depend on its normal host discovery process.

Understanding that distinction is more useful than memorizing the flag alone.

What does an open port actually mean?

Another topic I've been documenting is how Nmap interprets port states.

A port scan doesn't simply return "open" or "closed".

Nmap distinguishes between six possible states:

State Meaning
open A service is accepting connections or datagrams.
closed The port is reachable, but no service appears to be listening.
filtered Filtering prevents Nmap from determining whether the port is open.
unfiltered The port is reachable, but the scan cannot determine whether it is open or closed.
`open\ filtered`
`closed\ filtered`

These states depend on the scanning technique, responses received, and network conditions.

For example, UDP scanning can produce ambiguous results because an open UDP service may not respond to an unexpected probe.

An open port also doesn't automatically mean there's a vulnerability. It means there's an exposed endpoint worth investigating further, within the authorized scope.

Identifying services instead of guessing

Knowing that port 80 is open doesn't necessarily mean the service is HTTP.

Port numbers are associated with conventional services, but applications can run on different ports.

Nmap's version detection helps investigate what's actually listening:

nmap -sV -p 22,80,443 192.168.56.10
Enter fullscreen mode Exit fullscreen mode

The -sV option sends additional probes to identify services and, where possible, their versions.

Even then, a reported version isn't always definitive. Services can hide version information, use modified banners, or behave differently from what Nmap expects.

That's why interpreting the output matters just as much as executing the command.

What I'm documenting in the repository

The repository currently includes notes on Linux, networking fundamentals, security concepts, and Nmap.

The penetration testing section contains two documents:

Information Gathering

Covers reconnaissance methodology, DNS, domain registration, subdomain discovery, web technologies, and network services.

Footprinting and Scanning

Goes further into network mapping, host discovery, TCP/UDP scanning, service and operating system fingerprinting, NSE, firewall behavior, timing, packet analysis, and interpreting scan results.

Both documents include technical explanations, command examples, and references to official documentation.

The goal isn't to collect as many commands as possible. It's to build documentation that I can actually use when studying or working through labs.

The repository

I'm continuing to expand and review the notes as I study more topics.

Everything is publicly available on GitHub:

Cybersecurity Survival Notes — GitHub Repository

If you're also learning networking or penetration testing, feel free to take a look.

Feedback and corrections are always welcome.

Top comments (0)