Common attacks and weaknesses
- UDP amplification: one of the largest DDoS vectors (factor up to 50,000).
- Unauthenticated read and write of cached data.
Memcached cache server.
The application reads and writes values kept in memory: answers come back in well under a millisecond. It travels in clear text: anyone on the path can read it.
| Service | Port | Transport | Description | Reference | Updated |
|---|---|---|---|---|---|
| memcache | 11211 | TCP, UDP | Memory cache service | - | 2009-02-09 |
// source: IANA service name and port number registry
Linux
sudo ss -ltnup 'sport = :11211' # process listening on 11211
sudo lsof -nP -i :11211macOS
sudo lsof -nP -i :11211
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 11211 -State Listen | Select LocalAddress, OwningProcess Get-NetUDPEndpoint -LocalPort 11211 netstat -ano | findstr :11211
From another machine
nmap -p 11211 -sV <host> sudo nmap -sU -p 11211 <host> nc -zv <host> 11211
Block it in the firewall
sudo ufw deny 11211/tcp # Linux (ufw) New-NetFirewallRule -DisplayName "Block 11211" -Direction Inbound -LocalPort 11211 -Protocol TCP -Action Block # Windows
Memcached cache server.
Port 11211 is registered for TCP and UDP.
It is rated 8/10 (high) when exposed to the Internet. UDP amplification: one of the largest DDoS vectors (factor up to 50,000). Disable UDP (-U 0) and bind to localhost.
On Linux run "ss -ltnup 'sport = :11211'", on macOS "lsof -nP -i :11211", and on Windows "netstat -ano | findstr :11211" to see the local process. From another machine, "nmap -p 11211 <host>" shows whether it is reachable.