⚠️ Lame is a retired HackTheBox machine, so this writeup is safe to publish.
Overview
Lame is one of the oldest and easiest boxes on HackTheBox. Root comes directly
from an unauthenticated command-injection vulnerability in Samba
(CVE-2007-2447, the usermap_script bug), so there is no separate
privilege-escalation step.
Recon
| |
Key open ports:
| Port | Service |
|---|---|
| 21 | vsftpd 2.3.4 |
| 22 | OpenSSH |
| 139 | Samba 3.0.20 |
| 445 | Samba 3.0.20 |
Samba 3.0.20 is vulnerable to the username map script command execution flaw.

Exploitation
The username field is passed to a shell unsanitised, so we can inject a
command by wrapping it in backticks:
| |
This drops straight into a root shell — no privesc required.
Flags
| Flag | Value |
|---|---|
| user | REDACTED |
| root | REDACTED |
Lessons Learned
- Always version-check network services; ancient Samba/vsftpd builds carry known RCEs.
- The Samba
usermap_scriptbug is a textbook example of unsanitised input reaching a shell.
