This is the write-up for the box Lame that was released at the 14th March 2017.
Let's put this in our hosts file:
10.10.10.3 lame.htb
Starting with a Nmap scan:
nmap -sC -sV -o nmap/lame.nmap 10.10.10.3
PORT STATE SERVICE VERSION
21/tcp open ftp vsftpd 2.3.4
|_ftp-anon: Anonymous FTP login allowed (FTP code 230)
| ftp-syst:
| STAT:
| FTP server status:
| Connected to 10.10.14.4
| Logged in as ftp
| TYPE: ASCII
| No session bandwidth limit
| Session timeout in seconds is 300
| Control connection is plain text
| Data connections will be plain text
| vsFTPd 2.3.4 - secure, fast, stable
|_End of status
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.X - 4.X (workgroup: WORKGROUP)
Service Info: OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel
Anonymous login is allowed but there is nothing on the FTP service. Version of vsftp is 2.3.4 so we try the Metasploit module exploit/unix/ftp/vsftpd_234_backdoor but it does not work.
Version of SMB is 3.0.20 so we try the Metasploit module exploit/multi/samba/usermap_script. It works an we get a shell as root!