FriendZone
Executive summary — FriendZone is an Easy Linux box that chains several small flaws all the way to root: a DNS zone transfer (AXFR) reveals hidden subdomains; SMB exposes an anonymous share with credentials and a writable one; a LFI in the admin panel includes a webshell uploaded over SMB (RCE as
www-data); a leaked config file allows a password-reuse pivot to thefrienduser; and the final escalation abuses a world-writable Pythonos.pyrun by a root cron. A DNS → SMB → LFI/RCE → credential reuse → Python module → root path.
| Platform | Hack The Box |
| Operating system | Linux |
| Difficulty | Easy |
| Status | Retired |
| Target IP | 10.129.23.177 |
Attack map
[21/22] FTP (vsftpd 3.0.3) + SSH (OpenSSH 7.6p1) open, not exploited
[53] DNS → zone transfer (AXFR) → hidden subdomains
[139/445] SMB: «general» (anon → creds.txt) · «Development» (writable)
│ mount hint in the «Files» share comment (/etc/Files)
│ [443] administrator1: log in with the SMB creds → dashboard.php with LFI (pagename)
│ upload a webshell to Development (mounted at /etc/Development) → include it via LFI
▼
[RCE] www-data (id confirms execution)
│ /var/www/mysql_data.conf leaks MySQL credentials for «friend»
│ the same password works for the friend system account (reuse)
▼
[USER] friend (user.txt)
│ /usr/lib/python2.7/os.py is world-writable + root cron (run-parts/cron.hourly)
▼
[ROOT] inject a reverse shell into os.py → root cron runs it
1. Reconnaissance
nmap -sV -sC -p- -Pn 10.129.23.177
21/tcp open ftp vsftpd 3.0.3
22/tcp open ssh OpenSSH 7.6p1
53/tcp open domain ISC BIND 9.11.3
80/tcp open http Apache 2.4.29 ("Friend Zone Escape software")
139/tcp open netbios-ssn Samba
443/tcp open ssl/http (cert: friendzone.red)
445/tcp open microsoft-ds Samba
FTP and SSH are open but don't offer an entry point on their own (no anonymous FTP, no SSH credentials yet). Port 80 only serves a themed landing page ("Friend Zone Escape software"); the 443 certificate, on the other hand, is the first real lead: it reveals the domain friendzone.red.
Resumen ejecutivo — FriendZone es un Linux Easy que encadena varios fallos pequeños hasta llegar a root: una transferencia de zona DNS (AXFR) revela subdominios ocultos; SMB expone un share anónimo con credenciales y otro con escritura; una LFI en el panel de administración incluye una webshell subida por SMB (RCE como
www-data); un fichero de configuración filtrado permite pivotar por reuso de contraseña al usuariofriend; y la escalada final abusa de unos.pyde Python escribible por todos que ejecuta un cron de root. Recorrido DNS → SMB → LFI/RCE → reuso de credenciales → módulo Python → root.
| Plataforma | Hack The Box |
| Sistema operativo | Linux |
| Dificultad | Easy |
| Estado | Retired |
| IP objetivo | 10.129.23.177 |
Mapa del ataque
[21/22] FTP (vsftpd 3.0.3) + SSH (OpenSSH 7.6p1) abiertos, no explotados
[53] DNS → transferencia de zona (AXFR) → subdominios ocultos
[139/445] SMB: «general» (anónimo → creds.txt) · «Development» (escritura)
│ pista de montaje en el comentario del share «Files» (/etc/Files)
│ [443] administrator1: login con las creds SMB → dashboard.php con LFI (pagename)
│ subir webshell a Development (montado en /etc/Development) → incluirla vía LFI
▼
[RCE] www-data (id confirma la ejecución)
│ /var/www/mysql_data.conf filtra credenciales MySQL de «friend»
│ la misma contraseña sirve para el usuario del sistema friend (reuso)
▼
[USER] friend (user.txt)
│ /usr/lib/python2.7/os.py es escribible por todos + cron de root (run-parts/cron.hourly)
▼
[ROOT] inyectar reverse shell en os.py → lo ejecuta el cron como root
1. Reconocimiento
nmap -sV -sC -p- -Pn 10.129.23.177
21/tcp open ftp vsftpd 3.0.3
22/tcp open ssh OpenSSH 7.6p1
53/tcp open domain ISC BIND 9.11.3
80/tcp open http Apache 2.4.29 ("Friend Zone Escape software")
139/tcp open netbios-ssn Samba
443/tcp open ssl/http (cert: friendzone.red)
445/tcp open microsoft-ds Samba
FTP y SSH quedan abiertos pero no aportan una vía de entrada por sí solos (no hay anónimo en FTP ni credenciales todavía para SSH). El puerto 80 solo sirve una landing page temática («Friend Zone Escape software»); el certificado del 443, en cambio, es la primera pista seria: revela el dominio friendzone.red.
This content is Root Access only. Everything else on the site — the free tier, the whole public library — stays open.
See Root Access plansNo account? Create one free then upgrade from your console.
Este contenido es solo para Root Access. Todo lo demás del sitio — el nivel gratuito, toda la biblioteca pública — sigue abierto.
Ver planes de Root Access¿Sin cuenta? Crea una gratis y luego mejora desde tu consola.