TryHackMe “Printer Hacking 101” Walkthrough
Printers can be the pivot point for hacking into the network. There was news not so long ago that almost 50,000 printers were hacked, printing a message to subscribe to a famous YouTuber PewDiePie.
They hackers managed to own the printers through their open The Internet Printing Protocol (IPP). This is a specialized Internet protocol to communicate between client devices (mobile phones, tablets, computers, etc.) and printers (or print servers). It can run locally or over the Internet. Unlike other printing protocols, IPP also supports access control, authentication, and encryption, making it a much more capable and secure printing mechanism than older ones.
When an IPP port is open to the internet, it is possible for anyone to print to the printer or even transfer malicious data through it (using it as a middleman for attacks)
What port does IPP run on?
Just google it and you will know the answer. But I’ll give you the answer too it is (631).
Unit 3: Targeting & Exploitation:
going through the Description, run the commands, But fortunately I faced a problem. and I could not install colorama and pysnmP
$ git clone [<https://github.com/RUB-NDS/PRET>](<https://github.com/RUB-NDS/PRET>) && cd PRET$ python2 -m pip install colorama pysnmP
So, I tried to run the file
Then I tried this,
It says already satisfied but if I tried to run the file then it wont run. It is due to the missing “pip” Now to get over this Problem I tried
- I tried to install pip for python but It was already satisfied.
- In general, pip is by default for python2 and pip3 is for python3 but here it was the default for python3.
- So I had to get around to get pip installed for python2
Installing PIP for python2:
Go to python2 folder (I tried running get-pip.py)
Google search for installing pip
Go to the first site here, https://pip.pypa.io/en/stable/installing/#, and scroll to this
In there we have to do some changes. In the terminal run this command
sudo curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
Finally, it is installed. so overall installation process is:
$ cd /usr/lib/python2.7/$ sudo curl <https://bootstrap.pypa.io/pip/2.7/get-pip.py> -o get-pip.py$ python get-pip.py$ python2 -m pip install colorama pysnmP
Now:
Into the room:
- Fire up the openvpn file
- start the machine
- Read the manual carefully and also go to http://hacking-printers.net/wiki/index.php/Printer_Security_Testing_Cheat_Sheet
How would a simple printer TCP DoS attack look as a one-line command?
Go to http://hacking-printers.net/wiki/index.php/Printer_Security_Testing_Cheat_Sheet and copy the command for denial of service
Ans :
while true; do nc printer 9100; done
Review the cheat sheet provided in the task reading above. What attack are printers often vulnerable to which involves sending more and more information until a pre-allocated buffer size is surpassed?
Ans : “Buffer Overflow”
Connect to the printer per the instructions above. Where’s the Fox_Printer located?
so go to your “machine’s IP:631”
This Screen appears,
Now go to the “printers” tab
Now in the Printer page you will see this page so,
Connect to the printer per the instructions above. Where’s the Fox_Printer located?
Ans : Skidy’s basement
What is the size of a test sheet?
Now we need to go to this printer
You will see this in the page.
Now go to maintenance and you will see all the lists of things you can do to troubleshoot the printer. SO click on the “print test Page”
You will be automatically redirected to this page
So, ANS = 1k
Congratulations You have completed this machine too!