The Exploit HQ

The 10 Commands · lesson 5 · 2026-10-13

The 10 Nmap Scripts (NSE) Worth Knowing in 2026

Before you start

Most people use Nmap to find open doors and stop there. But hidden inside it are more than six hundred scripts that tell you who owns a server, what it leaks, and which known weaknesses it carries. Here are the ten worth knowing.

Every one runs for real today, against scanme dot nmap dot org, the practice server the Nmap Project runs for exactly this. By the last script, we will turn one version number into a list of known vulnerabilities. First, let’s count what is already installed on this machine.

Count them.

ls /usr/share/nmap/scripts | wc -l

Over six hundred, and you have not downloaded a thing. They came with Nmap. Here are the ten worth learning first.

Number one. If you only learn one script flag, learn this one.

1 — The default scripts

nmap -sC -p 22,80 scanme.nmap.org
Part What it does
-sC run the default script set, same as –script default
-p 22,80 just remote login and web, to keep it quick

One short flag runs a whole hand-picked set of scripts the Nmap team considers safe and useful, matched automatically to whatever ports it finds open. It is the fastest way to get more than a list of port numbers.

Run it.

Two ports, and already three scripts fired on their own. The server’s key fingerprints on the login port, then the web site’s icon and its page title. Nobody had to name a single script.

Number two. Before you look at a server, find out whose it is.

2 — Who owns this address?

nmap -sn --script whois-ip scanme.nmap.org
Part What it does
-sn skip the port scan entirely
--script whois-ip look up who registered this address

Every internet address is registered to someone. This script asks the public registry who that is, and it does not even need a port scan, so we skip that part. On a real job, this is how you confirm an address actually belongs to the client before you touch it.

Run it.

The address block belongs to Linode, a hosting company now owned by Akamai. So this machine is a rented server in a data center, not someone’s home computer. That one fact changes who you would need permission from.

Number three. Now the question every attacker asks about a login port. Will it take a password?

3 — How does it let people in?

nmap --script ssh-auth-methods -p 22 scanme.nmap.org
Part What it does
--script ssh-auth-methods ask the login service which sign-in methods it accepts
-p 22 the remote login port

Remote login can accept keys, which are long secret files that cannot be guessed, or plain passwords, which can. This script starts a login and simply reads the list of methods the server offers, without ever trying a password.

Run it.

Public key, and password. Password login is switched on, which means anyone on the internet can sit there guessing. If this were your server, turning passwords off and using keys only would close that door completely.

Number four. Next, let’s see the shape of the website without clicking a single link.

4 — Map the whole site

nmap --script http-sitemap-generator -p 80 scanme.nmap.org
Part What it does
--script http-sitemap-generator crawl the site and map its folders
-p 80 the web port

This script follows the links on the site, page after page, and builds a map of every folder it finds and what kinds of files live in each one. It is the bird’s eye view before you look at anything closely.

Run it.

Images, style sheets, a script folder, and how deep the site goes. A small site, but on a big one this map is how you spot the folder that does not belong.

Number five. Broken pages are not just untidy. They tell you where things used to be.

5 — Find the broken pages

nmap --script http-errors -p 80 scanme.nmap.org
Part What it does
--script http-errors crawl the site and report pages that return errors
-p 80 the web port

This script crawls the site and reports every link that leads to an error. A link pointing to a page that is gone often reveals a feature that was removed, renamed, or moved, and old features are where forgotten weaknesses hide.

Run it.

A search page, linked from the home page, that answers with a four oh four error. The site advertises a search feature that is not actually there. That is exactly the kind of loose end worth writing down.

Number six. Developers leave notes in their code. Some of those notes get published.

6 — Read the developers’ notes

nmap --script http-comments-displayer -p 80 scanme.nmap.org
Part What it does
--script http-comments-displayer collect comments hidden in the site’s code
-p 80 the web port

Web pages carry comments, notes that browsers never show but anyone can read in the source. Sometimes they are harmless reminders. Sometimes they are old passwords, test accounts, or the address of an admin page. This script collects every one it finds.

Run it.

Notes about styles and page layout, left behind in the site’s own files. Nothing dangerous here, and that is the good outcome. On a real assessment, this is one of the first things worth reading line by line.

Number seven. Does this server even notice when a tool comes knocking?

7 — Does it block scanners?

nmap --script http-useragent-tester -p 80 scanme.nmap.org
Part What it does
--script http-useragent-tester visit as a list of known tools and see which get in
-p 80 the web port

Every web request carries a name tag saying what sent it, a browser, curl, or a scanner. Many protected sites refuse requests whose name tag belongs to a known hacking tool. This script visits again and again wearing different tags, and reports which ones get let in.

Run it.

Every single one was allowed, including Nmap announcing itself by name. For a practice server that is the whole point. For your own website, it means nothing is filtering out the most obvious automated traffic.

Number eight. Some of the most interesting folders on a server are the ones nothing links to.

8 — Hunt for hidden folders

nmap --script http-enum -p 80 scanme.nmap.org
Part What it does
--script http-enum try a long list of well-known folder and file names
-p 80 the web port

The site map only found what was linked. This script goes further. It tries a long list of well-known names, admin pages, backup folders, installers, and reports any that actually exist. It takes a little longer, because it is asking hundreds of questions.

Run it.

An images folder with directory listing switched on. That means anyone can open it and browse every file inside, like an open filing cabinet. So let’s open it.

Number nine. Finding an open filing cabinet is one thing. Reading what is inside is the next step.

9 — List an open folder

nmap --script http-ls --script-args http-ls.url=/images/ -p 80 scanme.nmap.org
Part What it does
--script http-ls list the files in an open web folder
--script-args hand the script a setting
http-ls.url=/images/ the folder to list, the one we just found

Many scripts accept settings, and script args is how you pass them. Here we hand this script the exact folder the last one discovered, and it lists every file inside, with its size and date, just like a directory listing on your own computer.

Run it.

One file, the site logo, last changed in twenty fifteen. Harmless here. But this is the exact move an attacker makes on a careless server, where the same open folder holds backups, exports, and spreadsheets nobody meant to publish.

And number ten, the one that ties everything together. From a version number to a list of known vulnerabilities, in one command.

10 — Look up known vulnerabilities

nmap -sV --script vulners -p 80 scanme.nmap.org
Part What it does
-sV find the exact software and version first
--script vulners look that version up in a vulnerability database
-p 80 the web port

First the version flag asks the web server exactly which software it is running. Then the vulners script sends only that product name and version to a public vulnerability database, and prints every known flaw recorded against it. No attack, no exploit, just a lookup.

Run it.

Apache version two point four point seven, and a wall of known vulnerabilities. The second column is the severity score out of ten, and many here are nine point eight, critical. Where it says exploit, public attack code already exists. This is exactly why defenders patch, because anyone can run this lookup against your server in seconds.

There are all ten.

Your 2026 NSE toolkit

The default set for a fast first look, who owns the address, how the login port lets people in, a map of the site, its broken pages, the developers’ notes, whether it blocks scanners, the hidden folders, how to open one with script args, and finally the known vulnerabilities for the exact version it runs.

And the one rule that never changes.

Before you go

Only ever run these against a computer you own, or one you have clear written permission to test. Scripts send far more traffic than a plain scan, and pointing them at someone else’s server is against the law in most of the world. Our practice server is offered by the Nmap Project for exactly this, so use it freely, and gently.

Next time a scan shows you an open port, you will know which of these to reach for. Subscribe so you do not miss the next roundup, and I will see you in the next one.