NetBIOS (Network Basic Input/Output System) is a legacy protocol that still plays a role in many Windows networks. It handles several functions:
-
Name Servicing:
NetBIOS allows computers to register and resolve 16-character names. This makes it possible to identify and communicate with devices on a local network using human-readable names. -
Connectionless Communication:
It supports communication methods that don’t require a sustained connection. This means messages can be sent without establishing a persistent link. -
Session Layer Functions:
While primarily associated with lower-level operations, NetBIOS also provides some session layer capabilities to manage communication sessions.
Additionally, Windows networks use a Browser Service based on NetBIOS. This service maintains a list of all machines within the domain or TCP/IP network segment, which can then be browsed by users in the “Network Neighborhood” or “My Network Places.”
- A NetBIOS name is a 16-character ASCII string that uniquely identifies a device on a network.
- This name allows systems to be recognized by human-friendly identifiers rather than just IP addresses.
The nbtstat
command is a useful tool for enumerating NetBIOS information:
-
nbtstat
(no options):
Displays your own machine’s NetBIOS information, including the registered names and their status.
Example:nbtstat
-
nbtstat -n
:
Shows the local NetBIOS name table. This table lists all the names your machine has registered (both unique and group names).
Example:nbtstat -n
-
nbtstat -A IPADDRESS
:
Retrieves the NetBIOS table for a remote computer by using its IP address. This is helpful for identifying what NetBIOS names a remote host is using.
Example:nbtstat -A 192.168.1.10
-
nbtstat -c
:
Displays the contents of the local NetBIOS name cache. This cache holds recently resolved NetBIOS names from the network.
Example:nbtstat -c
-
Enumeration:
Network administrators and even penetration testers can use these commands to gather information about active devices, their roles, and shared resources on the network. -
Security Considerations:
Because NetBIOS can reveal sensitive information like shared resources and network structure, it can be exploited by attackers to map out the network and plan further attacks.