Port 138: NetBIOS Datagram Service
UDP port 138 is the NetBIOS Datagram Service defined in RFC 1002. It carries connectionless NetBIOS messages, including traffic for the legacy Windows Computer Browser service. Microsoft notes that the browser service is no longer required when only Windows Vista and later versions are in use.
Port Details
Security Exposure
Port 138 is mainly a sign of legacy NetBIOS networking that modern Windows file sharing no longer needs. Microsoft states that SMB2 and later shares do not use ports 137 to 139, and Windows 11 version 24H2 and Windows Server 2025 no longer open them in built-in firewall rules. Leaving NetBIOS enabled keeps related name and session services available for credential poisoning (MITRE ATT&CK T1557.001).
Hardening
- +Block UDP 138 at network perimeters and between segments with no legacy NetBIOS need.
- +Disable NetBIOS over TCP/IP on hosts that do not need it.
- +Retire the Computer Browser service and systems that still depend on SMB1.
Monitoring
Inventory hosts that send or receive UDP 138 traffic to find remaining legacy NetBIOS systems, and track that list as they are retired.
Tools for Auditing and Monitoring NetBIOS-DGM
Zeek
Open SourceNetwork security monitoring framework that translates raw packet traffic into structured transaction logs and network events.
Wireshark
Open SourceNetwork packet analyzer and protocol inspection tool for capturing live traffic and debugging network communications in detail.
Nmap
Free / CommercialNetwork discovery scanner and port auditor for discovering live hosts, open ports, running services, and OS fingerprints.
Related Tool Categories
Frequently Asked Questions
What uses UDP port 138?→
The NetBIOS Datagram Service. Microsoft lists UDP 138 for the Computer Browser service and for the Server service that provides file and printer sharing.
Do modern Windows versions need port 138?→
Generally no. Microsoft states that SMB2 and later shares do not use NetBIOS ports 137 to 139, and the browser service is not required when only Windows Vista and later are in use.
Sources
- IANA Service Name and Transport Protocol Port Number Registry (port 138)
- RFC 1002: Protocol Standard for a NetBIOS Service on a TCP/UDP Transport: Detailed Specifications
- Microsoft Learn: Service overview and network port requirements for Windows
- Microsoft Learn: Secure SMB traffic in Windows Server
- MITRE ATT&CK T1557.001: Name Resolution Poisoning and SMB Relay
Port assignments from the IANA Service Name and Transport Protocol Port Number Registry. Services can be configured to run on any port, so traffic on port 138 is not guaranteed to be NetBIOS-DGM. Exploited-in-the-wild data from the CISA KEV catalog (CC0).