Common attacks and weaknesses
- Anyone can print, read stored jobs or change settings with PJL commands.
Raw printing to network printers.
Print jobs are sent to the printer over port 9100, which prints them as they arrive. It travels in clear text: anyone on the path can read it.
| Service | Port | Transport | Description | Reference | Updated |
|---|---|---|---|---|---|
| hp-pdl-datastr | 9100 | TCP, UDP | PDL Data Streaming Port | - | 2002-04 |
| pdl-datastream | 9100 | TCP, UDP | Printer PDL Data Stream | - | 2002-09 |
// source: IANA service name and port number registry
Linux
sudo ss -ltnup 'sport = :9100' # process listening on 9100
sudo lsof -nP -i :9100macOS
sudo lsof -nP -i :9100
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 9100 -State Listen | Select LocalAddress, OwningProcess Get-NetUDPEndpoint -LocalPort 9100 netstat -ano | findstr :9100
From another machine
nmap -p 9100 -sV <host> sudo nmap -sU -p 9100 <host> nc -zv <host> 9100
Block it in the firewall
sudo ufw deny 9100/tcp # Linux (ufw) New-NetFirewallRule -DisplayName "Block 9100" -Direction Inbound -LocalPort 9100 -Protocol TCP -Action Block # Windows
Raw printing to network printers.
Port 9100 is registered for TCP and UDP. In practice the service mostly uses TCP.
It is rated 6/10 (high) when exposed to the Internet. Anyone can print, read stored jobs or change settings with PJL commands. Restrict printing to print servers and update printer firmware.
On Linux run "ss -ltnup 'sport = :9100'", on macOS "lsof -nP -i :9100", and on Windows "netstat -ano | findstr :9100" to see the local process. From another machine, "nmap -p 9100 <host>" shows whether it is reachable.