Enumeración web

Las rutas de diccionario son las de SecLists en Kali y Parrot (/usr/share/seclists). Con -fs o -fw filtras las respuestas por tamaño o número de palabras.

Tus datos Se guardan en este navegador y se aplican a todas las chuletas.

Fuzzing

Tecnologías

whatweb
whatweb http://box.htb
Cabeceras de respuesta
curl -sI http://box.htb

Directorios y ficheros

Directorios con ffuf
ffuf -u http://box.htb/FUZZ -w /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt -ic -t 100
Ficheros con extensiones
ffuf -u http://box.htb/FUZZ -w /usr/share/seclists/Discovery/Web-Content/raft-medium-words.txt -e .php,.txt,.bak,.zip -ic -t 100
gobuster
gobuster dir -u http://box.htb -w /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt -x php,txt -t 50
Recursivo con feroxbuster
feroxbuster -u http://box.htb -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt

Subdominios y vhosts

Vhosts con ffuf
ffuf -u http://10.10.11.20 -H 'Host: FUZZ.box.htb' -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt -fs 0

Lanza una vez, mira el tamaño de la respuesta por defecto y fíltralo con -fs.

Vhosts con gobuster
gobuster vhost -u http://box.htb -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt --append-domain
Añadir el subdominio a /etc/hosts
echo '10.10.11.20 box.htb dev.box.htb' | sudo tee -a /etc/hosts

Parámetros

Nombres de parámetros GET
ffuf -u 'http://box.htb/index.php?FUZZ=test' -w /usr/share/seclists/Discovery/Web-Content/burp-parameter-names.txt -fs 0
Valores en POST
ffuf -u http://box.htb/api/user -X POST -H 'Content-Type: application/x-www-form-urlencoded' -d 'id=FUZZ' -w ids.txt -fs 0
Generar números para IDOR
seq 1 1000 > ids.txt

Hallazgos típicos

Código fuente expuesto

Descargar un .git expuesto
git-dumper http://box.htb/.git/ repo
Revisar el historial
cd repo && git log --oneline && git show HEAD~1
Buscar secretos en todos los commits
git log -p | grep -iE 'pass|secret|token|key'

CMS

WordPress
wpscan --url http://box.htb -e ap,u --plugins-detection aggressive
Joomla
joomscan -u http://box.htb
Versión de Drupal
curl -s http://box.htb/CHANGELOG.txt | head

Fuerza bruta de logins

Formulario HTTP con hydra
hydra -l admin -P /usr/share/wordlists/rockyou.txt box.htb http-post-form '/login.php:user=^USER^&pass=^PASS^:F=incorrect'

Lo que va tras F= es un texto que solo aparece cuando el login falla.

Autenticación básica
hydra -L users.txt -P passwords.txt box.htb http-get /admin
SSH
hydra -l root -P /usr/share/wordlists/rockyou.txt ssh://10.10.11.20 -t 4