HTB - Mirai

Mirai

Getting Root:

  1. The box reveals that is running pi-hole which is basically an application designed for use on embedded devices such as the raspberry-pi

  2. We can ssh to the box using the raspberry-pi default credentials and noticed we have full access privileges using sudo.

Tools Used:

nmap, dirsearch.py, ssh, grep

Nmap:

Enumeration

HTTP - Port 80

Checking /admin

A basic google search on raspberry pi default credentials shows: Username: pi Password: raspberry

Getting Access

Privilege Escalation

Root

Missing Flag

It said that a backup of the root flag may be on a USB stick, so we checked for mounted devices and noticed /media/usbstick

But there was nothing there.

Doing some forensics on the /dev/sdb device showed some interesting pieces of data such as root.txt and what it looked like a hash . In Linux everything is a file, so a simple use of strings and grep did the job.

Last updated