IPP
Internet Printing Protocol
CUPS
(Common UNIX Printing System)
CUPS
(Common UNIX Printing System)It uses
UDP
andTCP
on Port631
Vulnerabilities
cups-browsed
, the service that typically listens on all interfacesUDP 631
, is what allows adding a printer to a machine remotely. This vulnerability allows any attacker who can reach this machine to trigger a“Get-Printer-Attributes” IPP
request being sent to an attacker-controlled URL.
libcupsfilters
is responsible for handling theIPP
attributes returned from the request. These are written to a temporaryPostscript Printer Description (PPD)
file without sanitization, allowing malicious attributes to be written.
libppd
is responsible for reading a temporaryPPD
file and turning that into a printer object on the system. It also doesn’t sanitize when reading, allowing for injection of attacker controlled data.
This vulnerability in
cups-filters
allows for loading a printer using thefoomatic-rip
print filter, which is a universal converter for transforming PostScript or PDF data into the format that the printer can understand. It has long had issues with command injection, and has been limited to manual installs / configurations only.
POC
POC
Ippsec has a
POC
that is used on the evilcups machine from HackThebox:
Now, on the server select the the malicious printer and trigger the option
Print Test Page
The default path for printed jobs is
/var/spool/cups
Last updated