| Field | Detail |
|---|---|
| Summary | Scan a subnet for NetBIOS names (hostnames, domain controllers) |
| Category | NetBIOS enumeration |
| Phase | recon, enumeration |
| Interface | CLI |
| Platform | Linux, Windows |
| Licence | Open source |
| Docs | http://www.unixwiz.net/tools/nbtscan.html |
| Related | SMB and Active Directory enumeration, enum4linux, Nmap, rpcclient |
Scans a network for NetBIOS name information over #udp/137 — hostnames, the logged-on user, domain/workgroup, MAC address and which NetBIOS services a host runs. A fast way to map Windows hosts and spot domain controllers on a subnet before you dig in with SMB tools.
⚠️ Warning — Scope It broadcasts/queries NetBIOS on the target network — active and in-scope only.
nbtscan
nbtscan 10.10.10.0/24 # scan a whole subnet
nbtscan -r 10.10.10.0/24 # use UDP source port 137 (some Windows hosts only reply then)
nbtscan -v 10.10.10.5 # verbose: full NetBIOS name table
nbtscan -s : 10.10.10.0/24 # script-friendly, ':' separated
nbtscan -f targets.txt # read targets from a file
nbtscan -m 2 10.10.10.0/24 # retransmits (reliability on lossy nets)
| Flag | Purpose |
|---|---|
-r |
Source UDP port 137 (needed for some Windows stacks) |
-v |
Verbose — print the full name/service table |
-s <sep> |
Script/grep-friendly output with a separator |
-f <file> |
Targets from a file |
-m <n> |
Retransmit count |
-h |
Human-readable service names (with -v) |
nmblookup (Samba — single-host deep query)
nmblookup -A 10.10.10.5 # dump a host's NetBIOS name table
nmblookup -S 10.10.10.5 # status query
nmblookup <NAME> # resolve a NetBIOS name -> IP
On Windows the native equivalent is nbtstat -A <ip>.
Reading the NetBIOS suffixes
The two-digit hex suffix after each name tells you the role:
| Suffix | Meaning |
|---|---|
<00> |
Workstation / hostname |
<20> |
File server service (SMB sharing enabled) |
<03> |
Messenger / logged-on user |
<1b> |
Domain master browser (the PDC / a DC) |
<1c> |
Domain controllers group |
<1d> |
Master browser for the subnet |
<1e> |
Browser elections |
A <1b>/<1c> is your domain controller — the priority target for AD enumeration.
Worked example
nbtscan -r -v 10.10.10.0/24
Sweep the subnet from source port 137 (-r, so firewalled Windows hosts answer) and print each host's full name table (-v). You immediately see hostnames, the workgroup/domain, which hosts share files (<20>) and which is the DC (<1b>) — a one-line map of the Windows estate.
Kill-chain usage
Recon
nbtscan -r 10.10.10.0/24 # find Windows / NetBIOS hosts
Enumeration
nmblookup -A 10.10.10.5 # dump a host's NetBIOS name table
Where it fits
A quick first pass alongside Nmap once you know SMB/NetBIOS is present. The hostnames and DC it reveals feed straight into enum4linux, rpcclient and the rest of the SMB and Active Directory enumeration workflow. nmap -sU -p137 --script nbstat does the same inside an Nmap scan if you prefer one tool.