Reconnaissance
First, I added the new host to my known ones:
Then, I performed a Nmap scan:
So I took a look at port 32400 and found a service called Plex
:
Once here I used dirsearch ๐ to perform some enumeration:
I discovered the Plex version currently in use: 1.7.5.4035-313f93718 (checking inside identity
). Unfortunately, it was a rabbit hole :/
After this, I took a look at the website at port 80 but Iโm been blocked:
So it seems to be using PiHole:
If we perform some enumeration with dirsearch ๐:
So I checked the /admin
section:
Here we can notice the version of the software: v3.1.4
Weaponization
Info
Miraiย is a real malware that formed a huge network of bots, and is used to conduct distributed denial of service (DDOS) attacks. The compromised devices are largely made up of internet of things (IoT) devices running embedded processors like ARM and MIPS. The most famous Mirai attack was in October 2016, when the botnet degraded the service of Dyn, a DNS service provider, which resulted in making major sites across the internet (including Netflix, Twitter, and GitHub) inaccessible. The sites were still up, but without DNS, no one could access them.
Miraiโs go-to attack was to brute force common default passwords. In fact,ย mirai-botnet.txt
ย was added toย SecListsย in November 2017.
So I literally try to log in with default raspberry pi creds: pi:raspberry
, which worked!
I got user flag :D
Privilege Escalation
So the user pi
has sudo privileges, so I ran sudo su
:
Not that easy :3
It talks about a USB stick, so I checked with df -h
:
Could be something inside /media/usbstick
:
So I searched for the sdX
volumes:
We can make use of strings
to dump the flag:
Machine pwned!
Alternative 1: Imaging and Recovery
We can create an image of the USB stick and save it:
Now we can exfiltrate this image to our machine with scp
:
We can now use testdisk to check deleted files on the image, but the root.txt
has no content. At this point, the unique way to see its original content is by doing a strings to the image: