Objectives
| # | Objective | What it teaches |
|---|
| 1 | Log into the user's desktop | Basic web app attack |
| 2 | Find the user flag | Service enumeration |
| 3 | Log into the admin desktop | Lateral movement / pivoting |
| 4 | Find the root flag | Local privilege escalation |
[!NOTE]
Spoiler warning: this walkthrough gives away the full solution. Read it after attempting the room yourself, or use it as a reference while you work.
The Scenario
Smokey is a two-machine room: a web-facing box (smokey-1) and a restricted admin box (smokey-2). The attack path runs web app → user access → pivot → admin access → privilege escalation. It's the classic pentest flow in miniature, which is exactly why it makes such a good first room.
Phase 1 — Enumeration
First things first: what's actually running on smokey-1?
nmap -sV -p- smokey-1
nmap -sC -sV -p 22,80,135,139,445,2049 smokey-1
The web server is the obvious entry point. Open it in the browser:
GET / → login form, no rate limiting visible
GET /robots.txt → "User-agent: * Disallow: /admin"
Found it. /admin is hidden from casual eyes but advertised to crawlers — a very common misconfiguration.
[!TIP]
robots.txt is not a security control. It is a hint file. Always check it during web enumeration, along with .git/, backup, and common path patterns.
Phase 2 — The Web Application
The admin login accepts credentials. With a bit of directory brute-forcing (and the room's hints), you recover the admin credentials and reach the internal file manager.
From the file manager, the key insight: the web app runs as a user on the system, and the file manager can list /home.
/home/user/ ← user profile directory
/home/user/.ssh/ ← interesting
/home/user/.ssh/id_rsa ← private key present
A private key sitting in a world-listable directory is our pivot.
Phase 3 — User Access
Back in your attacker shell:
chmod 400 smokey_user_key
ssh -i smokey_user_key user@smokey-1
Inside the box:
whoami
ls -la /home
cat /home/user/user.txt
Flag 2 captured. But the admin box is still out of reach — the SSH config on this machine points at smokey-2, and the key for it is not here.
Phase 4 — Pivoting to the Admin Box
The user's authorized_keys and crontab give the picture:
crontab -l
cat /usr/local/bin/backup.sh
The backup job copies from smokey-2 over SSH, and the SSH key for admin@smokey-2 is stored in the user's ~/.ssh/ — readable now that we're the user.
cp /home/user/.ssh/smokey2_key /tmp/admin_key
chmod 400 /tmp/admin_key
ssh -i /tmp/admin_key admin@smokey-2
[!WARNING]
In a real engagement, lateral movement like this is what separates a pentest from a "got one box" report. Document why each hop happened — the admin box was reachable because the backup credential was mis-scoped.
Flag 3 captured on the admin desktop.
Phase 5 — Privilege Escalation
Now we're root-or-bust. Standard local enumeration:
sudo -l
cat /etc/passwd | grep -v nologin
ls -la /usr/local/bin/
sudo vim with NOPASSWD is a classic shell escape:
sudo vim
:!/bin/sh
whoami
Flag 4. Room complete.
What I Learned
- Enumeration is the skill. The exploitation here was almost trivial; every step was found, not guessed. Port scan → robots.txt → file manager listing → crontab → sudo. Each discovery funded the next.
robots.txt lies by design. It tells you what the author did not want casually found.
- Crontabs are post-exploitation gold. Scheduled jobs are how services talk to other boxes — and how you inherit their access.
- Keep notes as you go. I kept a markdown file open next to my terminal and pasted every command and output. That file became this walkthrough.
Next Room
For the follow-up, try Jungle (also Easy) — it swaps the web app for a service, and the privilege escalation uses a SUID binary instead of sudo.
Discussion (1)
Sign in or create an account to join the discussion.
2mo ago
The pivoting section clicked for me here. I always get lost between the two boxes. Thanks for breaking it down so cleanly.