NetBIOS enumeration involves gathering information about networked systems, such as shared resources, usernames, and group memberships, by leveraging protocols associated with the NetBIOS API. The primary protocols and tools used for this purpose include:
Protocols:
-
NetBIOS over TCP/IP (NBT):
- NetBIOS Name Service (NBNS): Operates over UDP port 137 and is responsible for name registration and resolution. It allows the identification of devices by their NetBIOS names.
- NetBIOS Datagram Service (NBDS): Uses UDP port 138 for connectionless communication, facilitating the distribution of datagrams to NetBIOS names.
- NetBIOS Session Service (NBSS): Runs on TCP port 139 and manages connection-oriented communication, enabling sessions between NetBIOS-enabled devices.
-
Server Message Block (SMB):
- Functions over TCP port 445 and is utilized for sharing files, printers, and other resources across a network. SMB can be employed to enumerate shared resources and interact with them.
Tools for NetBIOS Enumeration:
-
Nbtstat: A command-line utility that displays protocol statistics and current TCP/IP connections using NBT. It can reveal NetBIOS name tables and resolve NetBIOS names to IP addresses.
-
Net View: A command-line tool that lists shared resources on networked computers, aiding in the discovery of shared directories and printers.
-
SuperScan: A graphical user interface (GUI) tool capable of scanning Windows machines to enumerate open ports and shared resources.
-
NetBIOS Enumerator: An application designed to explore remote network support and interact with SMB services, facilitating the enumeration of NetBIOS information.
Enumeration Techniques:
-
NetBIOS Name Table Retrieval: Using nbtstat -a <IP_Address>, one can obtain the NetBIOS name table of a remote machine, revealing registered NetBIOS names and their associated services.
-
Shared Resource Listing: The net view \\<ComputerName> command lists shared resources on a specified computer, assisting in identifying accessible files and printers.
-
SMB Session Establishment: Tools like smbclient can connect to SMB shares, allowing for the enumeration of shared directories and files.
By utilizing these protocols and tools, one can effectively perform NetBIOS enumeration to discover shared resources, usernames, and other pertinent information within a networked environment.