Common attacks and weaknesses
- CVE-2020-11651/11652 allowed unauthenticated command execution on every managed minion.
Salt master publish port (4506 for returns).
Commands sent to port 4505 create and control containers or cluster resources on the host. Everything is encrypted: someone on the path only sees unreadable bytes.
Unofficial use. The IANA assignment below differs from what is usually found on this port in practice.
No entry. The port is free for any application, so check what uses it on your hosts.
// source: IANA service name and port number registry
Linux
sudo ss -ltnup 'sport = :4505' # process listening on 4505
sudo lsof -nP -i :4505macOS
sudo lsof -nP -i :4505
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 4505 -State Listen | Select LocalAddress, OwningProcess Get-NetUDPEndpoint -LocalPort 4505 netstat -ano | findstr :4505
From another machine
nmap -p 4505 -sV <host> nc -zv <host> 4505
Block it in the firewall
sudo ufw deny 4505/tcp # Linux (ufw) New-NetFirewallRule -DisplayName "Block 4505" -Direction Inbound -LocalPort 4505 -Protocol TCP -Action Block # Windows
Salt master publish port (4506 for returns).
Port 4505 is registered for TCP.
It is rated 9/10 (critical) when exposed to the Internet. CVE-2020-11651/11652 allowed unauthenticated command execution on every managed minion. Never expose the Salt master to the Internet and keep it patched.
On Linux run "ss -ltnup 'sport = :4505'", on macOS "lsof -nP -i :4505", and on Windows "netstat -ano | findstr :4505" to see the local process. From another machine, "nmap -p 4505 <host>" shows whether it is reachable.