Common attacks and weaknesses
- Default communities (public, private) giving read or write access.
- Leaks of configurations, routing tables and sometimes passwords.
- DDoS amplification.
Network device monitoring and management (161 for queries, 162 for traps).
The monitoring server collects metrics, alerts or logs from devices over port 161. It travels in clear text: anyone on the path can read it.
| Service | Port | Transport | Description | Reference | Updated |
|---|---|---|---|---|---|
| snmp | 161 | TCP, UDP | SNMP | - | - |
// source: IANA service name and port number registry
Linux
sudo ss -ltnup 'sport = :161' # process listening on 161
sudo lsof -nP -i :161macOS
sudo lsof -nP -i :161
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 161 -State Listen | Select LocalAddress, OwningProcess Get-NetUDPEndpoint -LocalPort 161 netstat -ano | findstr :161
From another machine
nmap -p 161 -sV <host> sudo nmap -sU -p 161 <host> nc -zv <host> 161
Block it in the firewall
sudo ufw deny 161/tcp # Linux (ufw) New-NetFirewallRule -DisplayName "Block 161" -Direction Inbound -LocalPort 161 -Protocol TCP -Action Block # Windows
Network device monitoring and management (161 for queries, 162 for traps).
Port 161 is registered for UDP and TCP. In practice the service mostly uses UDP.
It is rated 7/10 (high) when exposed to the Internet. Default communities (public, private) giving read or write access. Use SNMPv3 with authentication and encryption.
On Linux run "ss -ltnup 'sport = :161'", on macOS "lsof -nP -i :161", and on Windows "netstat -ano | findstr :161" to see the local process. From another machine, "nmap -p 161 <host>" shows whether it is reachable.