Ocellus

Ports and services

Ports an index has seen, and the nmap command that finds the rest.

A browser cannot send a SYN packet, so a live port scan has to run on your own machine. This page reads the ports Shodan already recorded for an address, then writes the command that scans it for real.

The full sweep runs every stage in nmapAutomator's order against public indexes: resolve, name service, ownership, observed ports, services, reverse name and HTTP. The port list comes from Shodan's index, a crawl at an earlier moment. A live packet scan is the commands below.

Commands for example.com

Each one is the real nmap invocation. Run it on a machine you control, against a host you own or are authorised to scan. A command marked loud sends enough traffic to be noticed.

  • Host discovery, no ports

    Is it up at all, before spending a scan on ports.

    nmap -sn example.com

    -sn: ping scan only, no port scanabout seconds

  • The 1000 most common ports

    The default first pass on any host.

    nmap -sS -Pn -T4 --top-ports 1000 203.0.113.10

    -sS SYN scan, -Pn skip host discovery, -T4 faster timingabout under a minute

  • Service and version detectionloud

    Which software is behind each open port, and at what version.

    nmap -sV -Pn -T4 -p- 203.0.113.10

    -sV version probes, -p- every portabout 10 to 40 minutes across all 65535 ports

  • Default scripts and versionsloud

    What the safe script set can tell you about banners and headers.

    nmap -sC -sV -Pn -T4 203.0.113.10

    -sC default script set, -sV version probesabout 2 to 10 minutes

  • Every TCP portloud

    A service on an unusual port is exactly what a top-1000 scan misses.

    nmap -sS -Pn -T4 -p- --min-rate 1000 203.0.113.10

    -p- all 65535 ports, --min-rate 1000 at least 1000 packets a secondabout 5 to 20 minutes

  • The 200 most common UDP portsloud

    DNS, SNMP, NTP, TFTP and other services that only speak UDP.

    nmap -sU -Pn --top-ports 200 --max-retries 1 203.0.113.10

    -sU UDP scan, --max-retries 1 keeps it finiteabout 10 to 30 minutes; UDP is slow by nature

  • HTTP titles across open web ports

    What each web service calls itself, which names the app and its version.

    nmap -sV -Pn -p 80,443,8080,8443,8000,8888 --script "http-title,http-headers" 203.0.113.10

    --script http-title,http-headersabout under a minute

  • Vulnerability scriptsloud

    After a full version scan, to check each CVE against the banner.

    nmap -sV -Pn -p- --script "vuln" 203.0.113.10

    --script vuln runs the vulnerability detection setabout 20 minutes and up

  • Fragmented SYNloud

    A firewall drops the plain SYN; this splits it instead.

    nmap -sS -Pn -f --mtu 8 -T2 203.0.113.10

    -f fragment packets, --mtu 8 fragment size, -T2 patient timingabout 1 to 5 minutes

  • A whole /24

    Sweeping the network a single host sits in.

    nmap -sn -T4 192.0.2.0/24

    -sn discovery across the rangeabout under a minute

nmapAutomator

The script that chains the sequence above automatically. Clone it, then run one of these commands.

  • Quick

    Top ports and their versions. The first look at a new host.

    ./nmapAutomator.sh -H example.com -t quick
  • Basic

    All TCP ports, service versions and the default scripts.

    ./nmapAutomator.sh -H example.com -t basic
  • Full

    The basic pass plus UDP on the common set; the slowest complete view.

    ./nmapAutomator.sh -H example.com -t full
  • Vulns

    Version detection followed by the vulnerability script set.

    ./nmapAutomator.sh -H example.com -t vulns

nmapAutomator on GitHub and the nmap reference.