Common attacks and weaknesses
- Same exposure as SMB 445 (null sessions, relay, old SMB vulnerabilities).
- Host and user enumeration.
SMB over NetBIOS, the legacy transport for Windows file sharing.
Files are sent over port 139 in pieces and reassembled on the other side. It travels in clear text: anyone on the path can read it, passwords included.
| Service | Port | Transport | Description | Reference | Updated |
|---|---|---|---|---|---|
| netbios-ssn | 139 | TCP, UDP | NETBIOS Session Service | - | - |
// source: IANA service name and port number registry
Linux
sudo ss -ltnup 'sport = :139' # process listening on 139
sudo lsof -nP -i :139macOS
sudo lsof -nP -i :139
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 139 -State Listen | Select LocalAddress, OwningProcess Get-NetUDPEndpoint -LocalPort 139 netstat -ano | findstr :139
From another machine
nmap -p 139 -sV <host> sudo nmap -sU -p 139 <host> nc -zv <host> 139
Block it in the firewall
sudo ufw deny 139/tcp # Linux (ufw) New-NetFirewallRule -DisplayName "Block 139" -Direction Inbound -LocalPort 139 -Protocol TCP -Action Block # Windows
SMB over NetBIOS, the legacy transport for Windows file sharing.
Port 139 is registered for TCP and UDP. In practice the service mostly uses TCP.
It is rated 8/10 (high) when exposed to the Internet. Same exposure as SMB 445 (null sessions, relay, old SMB vulnerabilities). Block at the edge.
On Linux run "ss -ltnup 'sport = :139'", on macOS "lsof -nP -i :139", and on Windows "netstat -ano | findstr :139" to see the local process. From another machine, "nmap -p 139 <host>" shows whether it is reachable.