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.

Jun 19, 2025 - 14:14
Updated: 
103.5k

Ethical Hacking in Cybersecurity & Ethical Hacking · Commands & reference

Ethical Hacking for Beginners, lesson 8 of 13

NetBIOS Enumeration Explained: Risks, Detection and Defence

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?

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.

PortServiceWhat it can reveal
UDP 137Name service (NBNS)Computer name, workgroup or domain, service suffixes such as file server or domain controller
UDP 138Datagram serviceBrowser announcements listing machines on the segment
TCP 139Session serviceAccess 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.

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?

ControlWhat it does
Disable NetBIOS over TCP/IPSet by adapter, DHCP option or management tooling; removes ports 137 to 139 answers
Turn off LLMNRGroup Policy setting Turn off multicast name resolution stops a related poisoning path
Require SMB signingBlocks relay of captured authentication; see Microsoft SMB signing
Block ports at boundariesNever allow 137 to 139 or 445 from the internet or guest networks
Review share permissionsRemove 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

It is querying the NetBIOS over TCP/IP service to learn computer names, domain names, service roles and shares on a Windows network.

NetBIOS over TCP/IP uses UDP 137 for names, UDP 138 for datagrams and TCP 139 for sessions, as described in RFC 1001 and 1002.

Doing it on systems you do not own without written permission can breach Sections 43 and 66 of India’s IT Act 2000.

Most do not, because DNS handles name resolution, but test on a pilot group since some old devices may still rely on it.

Check the TcpipNetbiosOptions value with the read-only PowerShell query shown above; 2 means disabled and 0 means it follows DHCP.

Both are fallback name services. A rogue host can answer their broadcast queries and capture authentication attempts, so disable both.

SMB signing protects messages from tampering and blocks relay of captured authentication, which limits the damage from name poisoning.

Zeek conn.log, firewall logs for ports 137 to 139 and Windows Security events such as 4625 failed logons and 5145 share access.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Vaishnavi

Vaishnavi is a skilled tech professional at the Ethical Hacking Training Institute in Pune, responsible for managing and optimizing the technical infrastructure that supports advanced cybersecurity education. With deep expertise in network security, backend operations, and system performance, she ensures that practical labs, online modules, and assessments run smoothly and securely. Her behind-the-scenes contributions play a vital role in delivering a seamless and secure learning experience for aspiring ethical hackers.