root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat mirai.md
// writeups

Mirai

1 Sep 2017 · 8 min read · root access
Mirai - maquina de Hack The Box

Executive summary — Mirai is a themed Easy Linux box: the name evokes the Mirai botnet (2016), which infected hundreds of thousands of IoT devices by scanning the Internet for unchanged factory credentials. The target here is exactly that scenario in miniature: a Raspberry Pi running Pi-hole, reachable over SSH with pi:raspberry, where pi has unrestricted sudo → instant root. The real challenge comes after: the root flag isn't where it should be — you need basic forensics on a USB stick to recover a «deleted» file (spoiler: deleting on Linux doesn't destroy the data).

PlatformHack The Box
Operating systemLinux
DifficultyEasy
StatusRetired
Target IP10.129.X.X

Attack map

[22/53/80] Raspberry Pi + Pi-hole
   │  default Raspberry Pi credentials (pi:raspberry) over SSH
   ▼
[SSH]  pi  (user.txt)
   │  sudo -l → (ALL) NOPASSWD: ALL  →  sudo su
   ▼
[ROOT]  but root.txt isn't in /root — it was «deleted» from a USB stick
   │  lsblk → /dev/sdb (/media/usbstick)
   ▼
[FORENSICS]  strings /dev/sdb | grep HTB (deleting ≠ wiping)
   ▼
[ROOT.TXT recovered]

1. Reconnaissance

As always, we start with a full port and version scan:

nmap -sC -sV -p- 10.129.X.X
22/tcp  open  ssh     OpenSSH
53/tcp  open  domain  dnsmasq (Pi-hole)
80/tcp  open  http    lighttpd — Pi-hole admin panel

Key clue: port 53 running dnsmasq plus a web panel on 80 that turns out to be Pi-hole (the DNS ad-blocker commonly installed on a home Raspberry Pi) is the device's fingerprint. And a hobbyist Raspberry Pi screams one word: default credentials.

🔒 Clearance required

This content is Root Access only. Everything else on the site — the free tier, the whole public library — stays open.

See Root Access plans

No account? Create one free then upgrade from your console.