Skip to content

Your First Scan

Every scan in this guide points at one small server: the fixture in examples/. It is a few dozen lines of Python that pretend to be an appliance's web console, and it has two personalities. As sloppy, it exhibits three traits a scanner should catch. As tidy, it exhibits none of them. Learning on a target whose sins are known, planted, and removable is what makes the results in this chapter worth trusting: when a template fires, you know why, and when it falls silent later, you will know why then, too.

Stand up the fixture

$ python3 examples/fixture_server.py sloppy
fixture listening on 127.0.0.1:18084 in sloppy mode

It binds to 127.0.0.1 only — your own machine, nobody else's — on port 18084. Leave it running in that terminal and work in a second one. (Any Python 3 will do; there are no dependencies.)

Look at what the sloppy personality admits to, with the same tool an attacker would use first — a plain request:

$ curl -s -i http://127.0.0.1:18084/
HTTP/1.0 200 OK
Server: LabHTTP/1.0
X-Lab-Appliance: LabWidget/2.1 (lab fixture)
Content-Type: text/html; charset=utf-8

Three admissions, which the lab's three templates each check for:

Trait Who admits it Checked by
A made-up X-Lab-Appliance header the root page lab-appliance-detect
A Server banner with a version in it every page lab-server-banner
A /status page that describes the device to anyone who asks /status lab-status-page

And one more fact to hold on to: the sloppy server sends none of the usual security headers (no X-Frame-Options, no Content-Security-Policy, and friends). No lab template checks that — but a template from the collection does, and chapter 4 runs it against this same server.

The scan

The lab templates live in examples/ alongside the fixture. The scan names them with -t, names the target with -u, and adds the three quieting flags this guide uses throughout (-duc, no update checks; -nc, no colour codes; -ni, no Interactsh — an out-of-band callback service some templates use, switched off here so the lab makes no calls to anyone's server):

$ nuclei -duc -nc -ni -t examples/ -u http://127.0.0.1:18084

Check: the run reports its own shape before its findings — how many templates it loaded, how many targets, and a bookkeeping line worth understanding:

[INF] Templates loaded for current scan: 3
[INF] Targets loaded for current scan: 1
[INF] Templates clustered: 2 (Reduced 1 Requests)

Clustered means two of the templates ask for the same page, so nuclei sent one request and tested the single answer against both — the engine economises on knocking where it can. Then the findings, one per line:

[lab-status-page] [http] [low] http://127.0.0.1:18084/status
[lab-appliance-detect:appliance_banner] [http] [info] http://127.0.0.1:18084/ ["LabWidget/2.1 (lab fixture)"]
[lab-server-banner] [http] [info] http://127.0.0.1:18084/
[INF] Scan completed in 4.203771ms. 3 matches found.

Reading a result line

Every console finding has the same anatomy:

[template-id:extractor-or-matcher] [protocol] [severity] where-it-matched [extracted values]
  • lab-status-page is the template's id — the name you would use to run it alone, or to argue with it.
  • :appliance_banner appears when a named part of the template did the work: here an extractor (chapter 4) that pulled a value out of the response. On collection templates the suffix is often a named matcher, and a single template can produce several findings that differ only in that suffix.
  • [http] is the protocol the template speaks; [low], [info] are the severities the template authors chose.
  • The URL is the exact address that matched — for the status-page template, the /status path it asked for.
  • The bracketed ["LabWidget/2.1 (lab fixture)"] is the extracted value: the banner text itself, carried into the report so you don't have to go and look.

Read the three findings as a person, not a scoreboard. The appliance header is a fingerprint: harmless in itself, but it tells anyone asking exactly what this device claims to be. The versioned Server banner is the same lesson in a standardised costume. The status page is the one with real content: it describes the device — model, firmware, and the line management console: enabled — to any caller, no login asked. Nothing here was breached. All three are admissions, and admissions are what this class of scanner collects.

And the sentence to carry into every later chapter: the scan found exactly what its templates knew how to look for. A server with none of these three traits would produce an empty report from these three templates and might still be wide open to something no template in the run checked. Empty output means "none of these checks matched," never "this system is fine" — chapter 5 proves the point by removing the traits and watching the same templates fall silent.