Common attacks and weaknesses
- Open resolvers abused for DDoS amplification.
- Zone transfers (AXFR) leaking the full list of hosts.
- DNS tunneling used for command and control or data exfiltration.
Name resolution. UDP for most queries, TCP for large answers and zone transfers.
The computer asks a DNS server for the address behind a name, and gets an IP address back. It travels in clear text: anyone on the path can read it.
| Service | Port | Transport | Description | Reference | Updated |
|---|---|---|---|---|---|
| domain | 53 | TCP, UDP | Domain Name Server | - | - |
// source: IANA service name and port number registry
Linux
sudo ss -ltnup 'sport = :53' # process listening on 53
sudo lsof -nP -i :53macOS
sudo lsof -nP -i :53
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 53 -State Listen | Select LocalAddress, OwningProcess Get-NetUDPEndpoint -LocalPort 53 netstat -ano | findstr :53
From another machine
nmap -p 53 -sV <host> sudo nmap -sU -p 53 <host> nc -zv <host> 53
Block it in the firewall
sudo ufw deny 53/tcp # Linux (ufw) New-NetFirewallRule -DisplayName "Block 53" -Direction Inbound -LocalPort 53 -Protocol TCP -Action Block # Windows
Name resolution. UDP for most queries, TCP for large answers and zone transfers.
Port 53 is registered for TCP and UDP.
It is rated 4/10 (moderate) when exposed to the Internet. Open resolvers abused for DDoS amplification. Do not run open recursive resolvers on the Internet.
On Linux run "ss -ltnup 'sport = :53'", on macOS "lsof -nP -i :53", and on Windows "netstat -ano | findstr :53" to see the local process. From another machine, "nmap -p 53 <host>" shows whether it is reachable.