Skip to content

nbtscan

30 commands

Scans networks for NetBIOS name information — hostnames, logged-in users and MAC addresses of Windows machines.

  • NetBIOS
  • SMB
  • host discovery

Install nbtscan

sudo apt install nbtscan

Basic NetBIOS Host Discovery1

nbtscan 192.168.1.0/24

Scans the entire CIDR subnet to discover hosts sharing NetBIOS information.

Single Host Scanning1

nbtscan 10.10.10.55

Queries a specific IP address to identify its NetBIOS name and MAC address.

Range Based Scanning1

nbtscan 192.168.1.1-100

Scans a specific range of IP addresses within a subnet.

Multiple Target Scanning1

nbtscan 192.168.1.50 192.168.1.55 192.168.1.60

Scans multiple individually specified IP addresses in a single command.

Verbose Output Modes1

nbtscan -v 192.168.1.0/24

Enables verbose mode to display names and services for each discovered host.

OS and Server Type Identification1

nbtscan -h 192.168.1.0/24

Displays human-readable names for NetBIOS services to help identify server roles.

Combined Verbose Enumeration1

nbtscan -vh 192.168.1.0/24

Combines verbose output with human-readable descriptions for detailed analysis.

Quiet and Minimal Output1

nbtscan -q 10.10.10.0/24

Suppresses headers and banners for cleaner output suitable for lists.

Script Friendly Output1

nbtscan -s "," 192.168.1.0/24

Uses a comma separator between fields to generate CSV-style output.

Custom Delimiter Parsing1

nbtscan -s "|" 192.168.1.0/24

Uses a pipe character as a separator for easy parsing in shell scripts.

Link

Format for ETC Hosts1

nbtscan -e 192.168.1.0/24

Formats the output to be compatible with the /etc/hosts file format.

Link

Format for LMHOSTS1

nbtscan -l 192.168.1.0/24

Formats the output to be compatible with the Windows LMHOSTS file format.

Link

Input from File1

nbtscan -f targets.txt

Reads a list of IP addresses or subnets from a text file for scanning.

Link

Broadcast and Unicast Scanning1

nbtscan -r 192.168.1.0/24

Forces the scan to use local source port 137 to bypass some firewall filters.

Link

Timeout Control1

nbtscan -t 2000 192.168.1.0/24

Sets the wait time for responses to 2000 milliseconds (2 seconds).

Link

Fast Scanning1

nbtscan -t 500 192.168.1.0/24

Reduces the timeout to 500ms for a faster scan on low-latency local networks.

Link

Retry Control1

nbtscan -m 3 192.168.1.0/24

Retransmits the query 3 times if no response is received.

Link

Reliable Deep Scan1

nbtscan -m 5 -t 3000 192.168.1.0/24

Increases retries and timeouts to maximize discovery on congested networks.

Link

Packet Dump Debugging1

nbtscan -d 10.10.10.50

Dumps the full packet contents received for debugging protocol issues.

Link

Red Team Internal Reconnaissance1

nbtscan -q -s ":" 192.168.1.0/24

Produces quiet, colon-separated output ideal for feeding into other attack tools.

Link

Blue Team Asset Inventory1

nbtscan -e 192.168.1.0/24 > inventory.txt

Generates a hostname-to-IP mapping file for network inventory documentation.

Link

Firewall Evasion Attempt1

nbtscan -r -t 1500 10.10.10.0/24

Uses source port 137 with a moderate timeout to traverse strict ACLs.

Link

DHCP Scope Discovery1

nbtscan 192.168.1.100-200

Scans a specific DHCP pool range to find active Windows leases.

Link

Domain Controller Identification1

nbtscan -hv 192.168.1.0/24 | grep "DC"

Scans with service descriptions and filters for Domain Controller indicators.

Link

MAC Address Discovery1

nbtscan -s " " 192.168.1.0/24

Uses a space separator to cleanly expose the MAC address column.

Link

Incident Response Snapshot1

nbtscan -v -s "," 192.168.1.0/24

Captures verbose details in a CSV format for forensic timeline analysis.

Link

Legacy Network Mapping1

nbtscan -l 10.0.0.0/8

Scans a large Class A network (slow) and outputs in LMHOSTS format.

Link

No Header Scripting1

nbtscan -q -e 192.168.1.0/24

Outputs only the host definitions without table headers for immediate processing.

Link

Aggressive Discovery1

nbtscan -r -m 10 192.168.1.0/24

Uses root-level source ports and high retries for stubborn hosts.

Link

Full Comprehensive Scan1

nbtscan -v -h -r -t 2000 192.168.1.0/24

Maximizes information gathering with verbose, readable, robust settings.

Link