Common attacks and weaknesses
- Credentials and sessions readable on the network.
- Mirai-style botnets log in with default IoT passwords.
- Vulnerable embedded telnet daemons.
Clear-text remote shell. Still found on routers, IoT devices and industrial equipment.
The client opens a session to port 23: each command typed is sent to the server, which runs it and returns the output. It travels in clear text: anyone on the path can read it, passwords included.
| Service | Port | Transport | Description | Reference | Updated |
|---|---|---|---|---|---|
| telnet | 23 | TCP, UDP | Telnet | RFC 854 | - |
// source: IANA service name and port number registry
Linux
sudo ss -ltnup 'sport = :23' # process listening on 23
sudo lsof -nP -i :23macOS
sudo lsof -nP -i :23
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 23 -State Listen | Select LocalAddress, OwningProcess Get-NetUDPEndpoint -LocalPort 23 netstat -ano | findstr :23
From another machine
nmap -p 23 -sV <host> sudo nmap -sU -p 23 <host> nc -zv <host> 23
Block it in the firewall
sudo ufw deny 23/tcp # Linux (ufw) New-NetFirewallRule -DisplayName "Block 23" -Direction Inbound -LocalPort 23 -Protocol TCP -Action Block # Windows
Clear-text remote shell. Still found on routers, IoT devices and industrial equipment.
Port 23 is registered for TCP and UDP. In practice the service mostly uses TCP.
It is rated 9/10 (critical) when exposed to the Internet. Credentials and sessions readable on the network. Disable Telnet and use SSH.
On Linux run "ss -ltnup 'sport = :23'", on macOS "lsof -nP -i :23", and on Windows "netstat -ano | findstr :23" to see the local process. From another machine, "nmap -p 23 <host>" shows whether it is reachable.