NetBIOS Enumeration Explained: Risks, Detection and Defence
NetBIOS enumeration is the process of querying the legacy NetBIOS over TCP/IP service on Windows networks to learn computer names, workgroup or domain names, running services and sometimes shared folders. Attackers use it early in an intrusion to map targets, and authorised penetration testers use it to show how much a network gives away. It relies on UDP 137 and 138 and TCP 139, defined in RFC 1001 and RFC 1002.
Topic: Ethical Hacking in Cybersecurity & Ethical Hacking · Commands & reference
Learning path: Ethical Hacking for Beginners, lesson 8 of 13
Quick answer: NetBIOS enumeration is the process of querying the legacy NetBIOS over TCP/IP service on Windows networks to learn computer names, workgroup or domain names, running services and sometimes shared folders. Attackers use it early in an intrusion to map targets, and authorised penetration testers use it to show how much a network gives away. It relies on UDP 137 and 138 and TCP 139, defined in RFC 1001 and RFC 1002. Defenders can detect it in firewall, Zeek and Windows logs, and can largely remove the risk by disabling NetBIOS over TCP/IP and LLMNR, requiring SMB signing and blocking these ports at network boundaries.
Key takeaways
- NetBIOS is a 1980s naming and session service that modern Windows networks rarely need.
- It can reveal host names, domain names, service roles and shares to anyone on the same network.
- Testing it on systems you do not own without written permission is an offence under the IT Act 2000.
- Bursts of UDP 137 traffic from one host to many are a clear detection signal.
- Disabling NetBT and LLMNR and enforcing SMB signing removes most of the exposure.
Table of Contents
- What Is NetBIOS and What Does It Expose?
- Why Do Attackers and Testers Enumerate NetBIOS?
- What Are the Legal Requirements in India?
- What Traces Does NetBIOS Enumeration Leave?
- How Can You Detect NetBIOS Enumeration?
- How Do You Check Whether NetBIOS Is Disabled on Your Host?
- How Do You Reduce NetBIOS Exposure?
- References
What Is NetBIOS and What Does It Expose?
NetBIOS (Network Basic Input/Output System) was designed for small LANs. RFC 1001 and RFC 1002 describe how it runs over TCP/IP, a combination usually called NetBT. Windows kept it for backward compatibility, so many machines still answer NetBIOS queries by default when settings come from DHCP.
| Port | Service | What it can reveal |
|---|---|---|
| UDP 137 | Name service (NBNS) | Computer name, workgroup or domain, service suffixes such as file server or domain controller |
| UDP 138 | Datagram service | Browser announcements listing machines on the segment |
| TCP 139 | Session service | Access to SMB over NetBIOS, including share listings if permissions are weak |
None of this is an exploit by itself. The problem is that the answers hand an attacker a free inventory: which host is a domain controller, which machines share files and what naming pattern the organisation uses.
Why Do Attackers and Testers Enumerate NetBIOS?
Attackers use NetBIOS answers to pick targets for password guessing, share access and relay attacks. MITRE ATT&CK tracks related behaviour as Network Share Discovery (T1135) and LLMNR/NBT-NS Poisoning and SMB Relay (T1557.001), where a rogue machine answers name queries and captures authentication attempts. Authorised testers, following methods such as NIST SP 800-115, check NetBIOS to prove that legacy services leak information and to justify switching them off.
What Are the Legal Requirements in India?
Querying systems you do not own or manage, without permission, can amount to unauthorised access or information extraction under Section 43 of the Information Technology Act, 2000, and becomes a criminal offence under Section 66 when done dishonestly or fraudulently. Professional testers work only under a signed scope document that names the networks, dates and permitted techniques. Students should practise in their own isolated lab.
What Traces Does NetBIOS Enumeration Leave?
- Many UDP 137 queries from a single source to many addresses in a short time.
- TCP 139 or 445 connections followed by anonymous or failed logons.
- Windows Security events such as 4625 (failed logon) and, with file share auditing, 5140 or 5145 (share access).
- Firewall deny logs if host firewalls block inbound NetBIOS.
How Can You Detect NetBIOS Enumeration?
Network sensors give the clearest view. Zeek records each flow in conn.log, so a simple query for one source contacting many destinations on UDP 137 highlights sweeps. IDS platforms such as Snort and Suricata ship community rules that flag NetBIOS name queries crossing network boundaries; tune them so normal internal traffic does not flood the SOC. On endpoints, forward Windows Security logs to your SIEM and alert on spikes of failed or anonymous logons against file servers.
How Do You Check Whether NetBIOS Is Disabled on Your Host?
This read-only PowerShell check lists the NetBIOS setting for each active adapter on your own Windows machine. Microsoft documents the TcpipNetbiosOptions values as 0 (use DHCP setting), 1 (enabled) and 2 (disabled).
Get-CimInstance Win32_NetworkAdapterConfiguration -Filter 'IPEnabled=True' |
Select-Object Description, TcpipNetbiosOptions
How Do You Reduce NetBIOS Exposure?
| Control | What it does |
|---|---|
| Disable NetBIOS over TCP/IP | Set by adapter, DHCP option or management tooling; removes ports 137 to 139 answers |
| Turn off LLMNR | Group Policy setting Turn off multicast name resolution stops a related poisoning path |
| Require SMB signing | Blocks relay of captured authentication; see Microsoft SMB signing |
| Block ports at boundaries | Never allow 137 to 139 or 445 from the internet or guest networks |
| Review share permissions | Remove Everyone access and anonymous listing |
Test changes on a pilot group first, because very old devices or applications may still depend on NetBIOS names. For the wider picture, read our guides on enumeration in ethical hacking and SNMP and LDAP enumeration. To build these skills in a legal lab, ask about our ethical hacking training.
References
Frequently Asked Questions
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0