What does Nmap's list scan -sL send to the targets, and why run it before an authorised sweep?
answer
- Degenerate form of discovery
- Nothing goes to the targets
- Names come from somewhere else
- Count and names are the output
- A check on the target list
basics
~20 s-sL sends no packets to the target hosts: it expands the target specification and, by default, reverse-resolves each address through DNS. The names and the total let you confirm the scope is the intended network before any probe is sent.
solid answer
~40 sA list scan (`-sL`) prints each address in the target specification with its reverse-DNS name and a total count, without sending any packets to the targets. That makes it the sanity check before an authorised sweep: the count should match the scope document, and a name you do not recognise suggests a wrong range or a typo, so you stop before scanning someone else's network. It is not silent: the name lookups go to a DNS server, which can see them, and `-n` suppresses them. It does not say which hosts are alive, it cannot be combined with port scanning, OS detection or discovery options, and exclusions given with `--exclude` or `--excludefile` are applied to the list.
code
bash · 2 lines# Expand the authorised scope without sending anything to the targets
nmap -sL -n -iL scope.txt --excludefile excluded.txtgo deeper
Recall that -sL lists targets and names and sends nothing to them, so it checks the target list rather than finding hosts.
Explain where the names come from, why DNS can still see the lookups, what -n changes, and why it cannot be combined with scanning options.
Build it into the pre-sweep routine: expand with the real exclusions, compare against the signed scope, and file the output as the record of what was authorised.
Decide whether a list-scan comparison against the scope is a mandatory gate before any production sweep, and who signs off an unexpected name.
## What a list scan is The list scan is described in the reference guide as a degenerate form of host discovery: it simply lists each host of the networks specified, without sending any packets to the target hosts. By default Nmap still does reverse-DNS resolution on the addresses to learn their names, and it reports the total number of addresses at the end. Because no discovery runs, its machine-readable output records the host status as unknown, not up. ## What it is for - **A scope check.** The printed list and count are the target list exactly as Nmap expanded it. Compare them with the signed scope before anything is sent. - **A name check.** Hostnames give away a surprising amount. A name you do not recognise, or one that belongs to another organisation, is a reason to stop and ask. - **An exclusion check.** Targets named in `--exclude` or `--excludefile` are removed from the list, so run it with the same exclusion options the real scan will use and see what is left. ## Target forms worth checking The target list can mix CIDR blocks, octet ranges, hostnames and a file read with `-iL`. A hostname is resolved to an address, so a name in the list can quietly point outside the intended range, and the list scan prints the address it resolved to. Names also depend on the resolver the scanner uses: an internal resolver and a public one can answer differently for the same address, and stale pointer records can name a host that was decommissioned long ago. Read the names as hints about the target, not as proof of what lives there. ## What it is not - **Not silent.** No packet goes to the targets, but the reverse lookups reach a DNS server. Add `-n` to avoid them, or `--dns-servers` to choose which server sees them. - **Not discovery.** It does not say which hosts are up. A name existing in DNS says nothing about a machine answering. - **Not combinable.** Options for port scanning, OS detection or host discovery cannot be combined with it. To skip discovery and still scan, use `-Pn`. ## A pre-sweep routine 1. Expand the scope with `-sL -n` first, to check the count without any DNS traffic. 2. Run it again without `-n` when the names are needed, and read them. 3. Raise anything unexpected with the scope's owner before sending a probe. 4. Keep the output with the scope document as the record of what was authorised. ## Where it sits The list scan is the first of three increasingly intrusive steps. `-sL` sends nothing to the targets. `-sn` sends discovery probes, which the reference guide describes as one step more intrusive than a list scan. A default scan then port-scans the hosts found up. Running the least intrusive step first is cheap insurance that the later ones touch only what was authorised.
- A list scan prints a hostname you do not recognise for an address in the scope; what do you do?Stop and treat it as a scope question. Confirm with the scope's owner that the address range is right and that the host is covered before any probe is sent. The reference guide gives this as the point of the list scan: preventing a scan of the wrong network.
- Does -sL tell you which listed hosts are alive?No. It lists targets and their reverse-DNS names; its machine-readable output reports the status as unknown. A DNS name can exist for a decommissioned machine. To learn which addresses answer, run `-sn`, which sends discovery probes and so needs the scope signed first.
A list scan is like checking the delivery list against the street map before anyone knocks on a door: nothing is sent to any house, but the directory enquiry is still made, and a name you did not expect tells you to stop.
- A list scan pings each host to see which are up
- A list scan is invisible because nothing is sent anywhere
- A name in the list proves the host exists and is live
- -sL can be combined with -sV for a quick service list
- Nmap's list scan skips reverse DNS entirely