Skip to content

Fuzzing

Intro

Fuzzing se utiliza para identificar vulnerabilidades como errores de validación, inyecciones o fallos de manejo de entradas que controla el usuario.

Workflow

  1. Hacemos fuzz de los virtualhosts
  2. Hacemos fuzz de los subdominios
  3. Enumerar directorios.
  4. Hacemos fuzz de las extensiones de todos los subdominios/virtualhosts
  5. Hacemos fuzz recursivos
  6. Hacemos fuzz de parametros tanto GET como POST
  7. Probar bypasses a directorios sin acceso.
  8. Repetir ciclo: vhost -> subdominio -> dirs -> archivos -> params -> payloads

ffuf

Comando Descripcion
ffuf -u https://target.hmv/FUZZ -w wordlist.txt Fuzzing directorios y archivos.
ffuf -u https://target.hmv/FUZZ -w common.txt -mc 200,301,302,403 Muestra solo respuestas que respondan 200,301,302,403.
ffuf -u https://target.hmv/FUZZ -w common.txt -fc 404 Filtra respuestas con codigo 404.
ffuf -u https://target.hmv/FUZZ -w common.txt -fs 137 Filtra por tamaño de contenido 137.
ffuf -u https://target.hmv/FUZZ -w common.txt -fw 20 Filtra por numero de palabras.
ffuf -u https://target.hmv/FUZZ -w common.txt -e .php,.txt,.html,.bak,.zip Fuzzing de extensiones.
ffuf -u https://target.hmv/FUZZ -w wordlist.txt -recursion Fuzzing recursivo en directorios encontrados.
ffuf -u https://target.hmv/FUZZ -w wordlist.txt -recursion -recursion-depth 2 Fuzzing recursivo limitando profundidad.
ffuf -u https://target.hmv/FUZZ -w wordlist.txt -t 50 Fuzzing con 50 threads.
ffuf -u https://target.hmv/FUZZ -w wordlist.txt -rate 100 Limita la velocidad de requests por sec.
ffuf -u https://target.hmv/FUZZ -w wordlist.txt -timeout 10 Define el tiempo maximo de espera por request.
ffuf -u https://target.hmv/FUZZ -w wordlist.txt -o results.json Guarda la salida en JSON.
ffuf -u "https://target.hmv/index.php?FUZZ=id" -w params.txt Fuzzing de parametros GET.
ffuf -u "https://target.hmv/page.php?id=FUZZ" -w ids.txt Fuzzing de parametros GET.
ffuf -u https://target.hmv/login -X POST -d "username=admin&password=FUZZ" -w passwords.txt Fuzzing POST de password.
ffuf -u https://target.hmv -H "Content-Type: application/json" -d '{"FUZZ":"test"}' Fuzzing parametro json
ffuf -u https://target.hmv/FUZZ -b "PHPSESSID=abc" Fuzzing con cookie.
ffuf -u https://target.hmv -H "User-Agent: FUZZ" -w useragents.txt Fuzzing de User-Agent.
ffuf -u https://target.hmv -H "X-Forwarded-For: FUZZ" -w ips.txt Fuzzing para bypass de IP restrictions.
ffuf -u https://target.hmv -H "Authorization: Bearer FUZZ" -w tokens.txt Fuzzing de tokens de auth.
ffuf -u https://target.hmv -H "Host: FUZZ.target.hmv" -w vhosts.txt Fuzzing virtual hosts.
ffuf -u http://FUZZ.target.hmv -w subdomains.txt Fuzzing dominios.
ffuf -u https://target.hmv/FUZZ1/FUZZ2 -w dir.txt:FUZZ1 -w file.txt:FUZZ2 Fuzzing con dos wordlists.
ffuf -u https://target.hmv/FUZZ -w wordlist.txt -x http://127.0.0.1:8080 Reenviar al proxy.

dirsearch

Comando Descripcion
dirsearch.py -u http://target.hmv Escaneo basico
-e php,txt,html,js Buscar archivos con extensiones
-w /path/wordlist.txt Usar wordlist personalizada
--status=200,301,302,403 Mostrar solo respuestas con esos codigos
-r Escaneo recursivo
-t 50 Aumentar velocidad
--user-agent "Mozilla/5.0" Cambiar user agent
--cookie="PHPSESSID=abc" Usar cookie
-H "X-Forwarded-For: 127.0.0.1" Headers personalizados
--proxy=http://127.0.0.1:8080 Enviar trafico a proxy
--prefix=. Buscar .git, .env, etc
--exclude-sizes=1234B Ignorar respuestas por tamaño

feroxbuster

Comando Descripcion
feroxbuster -u http://target.hmv -w wordlist.txt Escaneo basico
feroxbuster -u http://target.hmv -x php,txt,html,js Buscar por extensiones
feroxbuster -u http://target.hmv -t 50 Numero de hilos
feroxbuster -u http://target.hmv -r -d 2 Recursion con profundidad
feroxbuster -u http://target.hmv -s 200,301,302,403 Mostrar estados X
feroxbuster -u http://target.hmv -A "Mozilla/5.0" Cambiar User-Agent
feroxbuster -u http://target.hmv -C "PHPSESSID=abc" Usar sesion
feroxbuster -u http://target.hmv -p http://127.0.0.1:8080 Enviar trafico a proxy
feroxbuster -u http://target.hmv --hidden Busca .git, .env
feroxbuster -u http://target.hmv --filter-size 1234 Filtrar respuestas por tamaño
feroxbuster -u http://target.hmv -k Ignorar errores SSL

wenum

Comando Descripcion
wenum -u http://target.hmv/FUZZ -w wordlist.txt Enumerar directorios y archivos.
wenum -u http://target.hmv/FUZZ -w wordlist.txt -t 50 Ejecutar con 50 hilos.
wenum -u http://target.hmv/FUZZ -w wordlist.txt -e .php,.txt,.bak Buscar archivos con extensiones especificas.
wenum -u http://target.hmv/page.php?id=FUZZ -w wordlist.txt Fuzzing de parametros GET.
wenum -u http://target.hmv/login -X POST -d "user=admin&pass=FUZZ" -w passwords.txt Fuzzing POST.
wenum -u http://target.hmv/FUZZ -w wordlist.txt --hc 404 Ocultar respuestas con codigo 404.
wenum -u http://target.hmv/FUZZ -w wordlist.txt -H "User-Agent: Mozilla/5.0" Añadir Header.
wenum -u http://target.hmv/FUZZ -w wordlist.txt -b "PHPSESSID=abcd1234" Enviar cookies.
wenum -u http://target.hmv/FUZZ -w wordlist.txt -p http://127.0.0.1:8080 Enviar a proxy.
wenum -u http://target.hmv/FUZZ -w wordlist.txt -o result.html -f html Guardar resultado en HTML.

gobuster

Comando Descripcion
gobuster dir -u http://target.hmv -w wordlist.txt Enumeración basica de directorios.
gobuster dir -u http://target.hmv -w wordlist.txt -t 100 Usar 100 hilos.
gobuster dir -u http://target.hmv -w wordlist.txt -x php,txt,bak,zip Buscar archivos con extensiones especificas.
gobuster dir -u http://target.hmv -w wordlist.txt -s 200,204,301,302,307,401,403 Mostrar solo codigos específicos.
gobuster dir -u http://target.hmv -w wordlist.txt -b 404 Excluir codigo 404.
gobuster dir -u http://target.hmv -w wordlist.txt --wildcard Forzar escaneo cuando el servidor devuelve wildcard responses.
gobuster dir -u http://target.hmv -w wordlist.txt -k Ignorar errores de certificados SSL.
gobuster dir -u http://target.hmv -w wordlist.txt -r Seguir redirecciones.
gobuster dir -u http://target.hmv -w wordlist.txt -o results.txt Guardar resultados en txt.
gobuster dir -u http://target.hmv -w wordlist.txt -q Modo silencioso (menos verbose).
gobuster dir -u http://target.hmv/FUZZ -w wordlist.txt Fuzzear.
gobuster dir -u http://target.hmv -w wordlist.txt -H "Authorization: Bearer TOKEN" Añadir Header.
gobuster dir -u http://target.hmv -w wordlist.txt -c "PHPSESSID=abc123" Enviar cookies.
gobuster dir -u http://target.hmv -w wordlist.txt --proxy http://127.0.0.1:8080 Enviar a proxy.
gobuster dir -u http://target.hmv -w wordlist.txt --delay 200ms Añadir delay entre requests.
gobuster dir -u http://target.hmv -w wordlist.txt --timeout 10s Cambiar timeout de conexión.
gobuster dir -u http://target.hmv -w wordlist.txt -e Mostrar URL completa encontrada.
gobuster dir -u http://target.hmv -w wordlist.txt --exclude-length 1234 Excluir respuestas por tamaño.
gobuster dir -u http://target.hmv -w wordlist.txt -a "Mozilla/5.0" Cambiar User-Agent.

Subdominios

Comando Descripción
gobuster dns -d target.hmv -w subdomains.txt Enumerar subdominios.
gobuster dns -d target.hmv -w subdomains.txt -t 50 Usar multiples hilos para DNS.
gobuster dns -d target.hmv -w subdomains.txt -i Mostrar IP del subdominio.
gobuster dns -d target.hmv -w subdomains.txt -r 8.8.8.8 Usar DNS server específico.

Virtualhosts

Comando Descripcion
gobuster vhost -u http://target.hmv -w vhosts.txt Descubrir virtual hosts.
gobuster vhost -u http://target.hmv -w vhosts.txt -t 50 Usar multiples hilos.
gobuster vhost -u http://target.hmv -w vhosts.txt -H "Host: FUZZ.target.hmv" Usar host header.

Nota

Cada Vhost que encontremos deberemos agregarlo a /etc/hosts para poder visitarlo.

Webfuzz API

Para fuzzear APIs podemos usar Webfuzz_Api

Comando Descripcion
python3 api_fuzzer.py http://target.hmv/login Fuzzear API