Shocker
Executive summary — Shocker is the textbook Easy Linux box about Shellshock: an Apache 2.4.18 with a Bash CGI script (
/cgi-bin/user.sh, physically at/usr/lib/cgi-bin) lets us inject commands through theUser-Agentheader (CVE-2014-6271) for RCE asshelly. Escalation is direct:sudoallows running Perl as root without a password. A CGI/Shellshock → shelly → sudo perl → root path.
| Platform | Hack The Box |
| Operating system | Ubuntu Linux |
| Difficulty | Easy |
| Status | Retired |
| Target IP | 10.129.3.102 |
Attack map
[80] Apache 2.4.18 (Ubuntu) + CGI
│ gobuster -x sh,cgi,txt → /cgi-bin/ → /cgi-bin/user.sh (Bash script)
│ CVE-2014-6271 (Shellshock) via User-Agent header → RCE
▼
[SHELL] shelly (/usr/lib/cgi-bin) → user.txt
│ sudo -l → (root) NOPASSWD: /usr/bin/perl
▼
[ROOT] sudo perl -e 'exec "/bin/bash"' → root.txt
1. Reconnaissance
We start with a standard service scan: basic NSE scripts (-sC) plus version detection (-sV) against the target.
nmap -sC -sV 10.129.3.102
80/tcp open http Apache 2.4.18 (Ubuntu)
2222/tcp open ssh OpenSSH 7.2p2 Ubuntu
Port 80 (Apache): the interesting one. Apache can run CGI scripts, and Shellshock specifically affects Bash — if those CGI scripts invoke Bash, the box is a direct candidate for the vulnerability. The homepage shows no title or relevant content, suggesting the real functionality lives on paths not linked from the index.
Port 2222 (SSH), why we don't attack it first: it's on a non-standard port but gives us nothing without credentials — there's no obvious vulnerability in OpenSSH 7.2p2. On Easy boxes, SSH is usually the later access point once credentials or a key are obtained, not the initial vector.
Resumen ejecutivo — Shocker es el Linux Easy de manual sobre Shellshock: un Apache 2.4.18 con un script CGI en Bash (
/cgi-bin/user.sh, físicamente en/usr/lib/cgi-bin) permite inyectar comandos a través de la cabeceraUser-Agent(CVE-2014-6271) y conseguir RCE comoshelly. La escalada es directa:sudopermite ejecutar Perl como root sin contraseña. Recorrido CGI/Shellshock → shelly → sudo perl → root.
| Plataforma | Hack The Box |
| Sistema operativo | Ubuntu Linux |
| Dificultad | Easy |
| Estado | Retired |
| IP objetivo | 10.129.3.102 |
Mapa del ataque
[80] Apache 2.4.18 (Ubuntu) + CGI
│ gobuster -x sh,cgi,txt → /cgi-bin/ → /cgi-bin/user.sh (script Bash)
│ CVE-2014-6271 (Shellshock) vía cabecera User-Agent → RCE
▼
[SHELL] shelly (/usr/lib/cgi-bin) → user.txt
│ sudo -l → (root) NOPASSWD: /usr/bin/perl
▼
[ROOT] sudo perl -e 'exec "/bin/bash"' → root.txt
1. Reconocimiento
Empezamos con un escaneo de servicios estándar: scripts NSE básicos (-sC) y detección de versión (-sV) contra el objetivo.
nmap -sC -sV 10.129.3.102
80/tcp open http Apache 2.4.18 (Ubuntu)
2222/tcp open ssh OpenSSH 7.2p2 Ubuntu
Puerto 80 (Apache): es el punto más interesante. Apache puede ejecutar scripts CGI, y Shellshock afecta específicamente a Bash — si esos scripts CGI invocan Bash, la máquina es candidata directa a la vulnerabilidad. La página principal no muestra título ni contenido relevante, lo que sugiere que la funcionalidad real vive en rutas no enlazadas desde el index.
Puerto 2222 (SSH), por qué no se ataca primero: está en un puerto no estándar pero no aporta nada sin credenciales — no hay vulnerabilidad evidente en OpenSSH 7.2p2. En máquinas Easy, SSH suele ser el punto de acceso posterior una vez se tienen credenciales o una clave, no el vector inicial.
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.