Printer Hacking 101
Last updated
Last updated
Date: 13, December, 2020
Author: Dhilip Sanjay S
to go to the TryHackMe room.
CUPS Server (Common UNIX Printing System)
IPP (Internet Printing Protocol)
Locating Printers
python pret.py
nmap -p 631 <IP_RANGE>
Exploiting
Three options in PRET:
PS (PostScript)
PJL (Printer Job Language)
PCL (Printer Command Language)
Try out all the three languages, to check if the language will be understood by the printer
Once you get a shell-like output, type help
to see the different commands available.
Answer: 631
Impact
An open IPP port can expose a lot of sensitive information such as printer name, location, model, firmware version, or even printer wifi SSID.
Answer: while true; do nc printer 9100; done
Explanation:
Replace printer
with <PRINTER_IP>
Since it is an infinite loop, the printer will remain busy.
Answer: Buffer Overflow
Use any of the following
Metasploit
Hydra
Nmap
Using nmap:
nmap <MACHINE_IP> -p 22 --script ssh-brute --script-arg userdb=user.txt
Since we know the username, user.txt
must contain only printer
Answer: Skidy's basement
Steps to Reproduce: Visit http://<MACHINE_IP>:631/printers/
Answer: 1k
Steps to Reproduce:
Visit http://<MACHINE_IP>:631/printers/Fox_Printer
Select Print Test Page
option from the Drop-down box.
The jobs will be listed at the bottom of the page.
Check the size
column in that table.