Common attacks and weaknesses
- NBT-NS poisoning to capture NTLM hashes; host enumeration.
NetBIOS name resolution (138 for datagrams).
A device asks the whole local network a question and the device that matches answers. It travels in clear text: anyone on the path can read it.
| Service | Port | Transport | Description | Reference | Updated |
|---|---|---|---|---|---|
| netbios-ns | 137 | TCP, UDP | NETBIOS Name Service | - | - |
// source: IANA service name and port number registry
Linux
sudo ss -ltnup 'sport = :137' # process listening on 137
sudo lsof -nP -i :137macOS
sudo lsof -nP -i :137
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 137 -State Listen | Select LocalAddress, OwningProcess Get-NetUDPEndpoint -LocalPort 137 netstat -ano | findstr :137
From another machine
nmap -p 137 -sV <host> sudo nmap -sU -p 137 <host> nc -zv <host> 137
Block it in the firewall
sudo ufw deny 137/tcp # Linux (ufw) New-NetFirewallRule -DisplayName "Block 137" -Direction Inbound -LocalPort 137 -Protocol TCP -Action Block # Windows
NetBIOS name resolution (138 for datagrams).
Port 137 is registered for UDP and TCP. In practice the service mostly uses UDP.
It is rated 6/10 (high) when exposed to the Internet. NBT-NS poisoning to capture NTLM hashes; host enumeration. Disable NetBIOS over TCP/IP where possible.
On Linux run "ss -ltnup 'sport = :137'", on macOS "lsof -nP -i :137", and on Windows "netstat -ano | findstr :137" to see the local process. From another machine, "nmap -p 137 <host>" shows whether it is reachable.