I’ve been playing around with Shodan, and today my focus was on finding printers. The query that I used was
jetdirect port:161 to find open JetDirect printers. After I got some IP addresses, I ran a quick nmap scan on them to make sure that the host is still up and port 9100 is open. After I found a print server with 9100 open, I got to work sending print jobs to them with this:
echo "test print" | netcat -w 1 -q 0 <printer ip> 9100
This prints the words “test print” on the printer. Obviously, replace printer IP with the IP address of the JetDirect printer. You print out whatever you like instead of “test print”.
To change settings on the printer, you can…
telnet <printer ip>
Starts a telnet session on the printer. From here you can set the printers hostname and a ton of other interesting stuff. I won’t go into depth about this, as it’s pretty self explanatory.
But the fun doesn’t end there. If you use CUPS, you can add it as a printer and have limitless fun printing. If you don’t use CUPS, just install it. If you don’t know how, Google it. Once CUPS is installed and running, navigate to http://localhost:631 in your browser and add an AppSocket/JetDirect printer. You can then print to that from programs such as LibreOffice.
One of my personal favorite things to print is Chicken: Chicken Chicken. I “accidentally” printed 100 copies of that to someones printer. Sorry, printer owner.