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

Lame

14 Mar 2017 · 7 min read · root access
Lame - maquina de Hack The Box

Executive summary — Lame is an old Easy Linux box, the very first machine ever retired on Hack The Box. It exposes Samba 3.0.20, vulnerable to CVE-2007-2447 («username map script»): an SMB username with shell metacharacters causes command injection. Since Samba runs as root, execution is direct root — no escalation afterwards. A single hop: Samba → Root.

PlatformHack The Box
Operating systemLinux
DifficultyEasy
StatusRetired
Target IP10.129.23.46

Attack map

[21,22,139,445,3632] Recon: anonymous FTP, SSH, Samba, distccd
   │  The surface is noisy, but there's only one strong lead
   ▼
[139/445] Samba smbd 3.0.20-Debian
   │  CVE-2007-2447 — «username map script»: command injection via the SMB username
   ▼
[ROOT]  Samba runs as root → direct root shell (no privesc)

1. Initial setup and recon

Before scanning, we add the machine to /etc/hosts so we can refer to it by name instead of repeating the IP in every command:

echo "10.129.23.46 lame.htb" | sudo tee -a /etc/hosts

We check basic connectivity with a ping before running the port scan:

ping -c 1 lame.htb

Why the TTL matters: besides confirming the box responds, the response's TTL gives an early hint about the OS. Linux usually sits near 64; Windows near 128. Not conclusive, but it steers enumeration.

nmap -sC -sV lame.htb
21/tcp    open  ftp        vsftpd 2.3.4
22/tcp    open  ssh
139/tcp   open  netbios-ssn
445/tcp   open  netbios-ssn  Samba smbd 3.0.20-Debian
3632/tcp  open  distccd

The key clue isn't the number of open ports, but the Samba version: 3.0.20-Debian. It dates back to 2007 and carries a well-known, well-documented RCE.

🔒 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.