Nuevos labs cada semana — Accede a todos desde 5€/mes

Nivel BásicoGratis

Recon completo — subdominios, fingerprinting, ASN y origin IPs

Metodología práctica de recon para bug bounty: enumeración pasiva/activa de subdominios, fingerprinting, ASN mapping, origin IPs bypass WAF y mining de git history.

Gorka El Bochi11 de mayo de 202612 min

Respuesta rápida

Recon es el 70% del bug bounty. La metodología que funciona: pasiva (subfinder + amass passive + assetfinder + wayback) → activa (puredns bruteforce + ffuf vhosts) → probe (httpx alive) → fingerprint (naabu + wafw00f + JS files) → ASN expansion (amass intel + masscan). Cierra el loop con git history mining (TrashCash) para secrets eliminados de repos públicos del target.


Subdomain enumeration

Dos pases: pasivo primero (rápido, no toca al target) y activo después (bruteforce con wordlist).

Pasivo

bash
subfinder -d target.com -o subs.txt
amass enum -passive -d target.com -o amass_subs.txt
assetfinder --subs-only target.com >> subs.txt

Activo

bash
puredns bruteforce wordlist.txt target.com -r resolvers.txt -w active_subs.txt

Merge + probe alive

bash
cat subs.txt amass_subs.txt active_subs.txt | sort -u > all_subs.txt
cat all_subs.txt | httpx -o alive.txt

[!tip] Wordlists de calidad n0kovo_subdomains_huge.txt (3M entries) es el sweet spot. Para targets grandes: combina con commonspeak2-subdomains.txt (Assetnote). Resolvers frescos del repo de janmasarik/resolvers.


API recon

Endpoints expuestos en documentación

PathSuele revelar
/swagger, /swagger-uiSpec OpenAPI completa
/api-docs, /openapi.jsonJSON spec con todos los endpoints
/graphql, /graphiqlIntrospección habilitada → schema completo
/v1/docs, /api/v2/docsDocs versionados con endpoints internos

Dorking de Google

makefile
site:target.com inurl:api
site:target.com filetype:json
site:target.com inurl:graphql
"api_key" OR "apikey" OR "api-key" site:target.com

Fuzzing de endpoints

bash
ffuf -u https://api.target.com/FUZZ -w /path/to/api-wordlist.txt -mc 200,301,302,403

Fingerprinting

Port scan

bash
naabu -l subs.txt -top-ports 1000 -o ports.txt
nmap -sV -sC -p- target.com

Detección de WAF

bash
wafw00f https://target.com

Headers a observar manualmente:

HeaderWAF
cf-ray, cf-cache-statusCloudflare
x-sucuri-idSucuri
x-akamai-transformedAkamai
x-amzn-requestid + Server: AmazonS3CloudFront
x-iinfoIncapsula/Imperva

Origin IP behind WAF

Cuando todo está protegido por Cloudflare/Akamai, encontrar el IP real del origen suele exponer endpoints sin filtros:

bash
hakoriginfinder -h target.com

Búsqueda por hash:

bash
shodan search "ssl.cert.subject.cn:target.com"
shodan search "http.favicon.hash:<hash>"

[!warning] Verificación Nunca asumas que un IP candidato es el origen — siempre valida con curl -H "Host: target.com" https://CANDIDATO_IP/ y compara contenido. Falsos positivos abundan.


ASN mapping para targets grandes

Para programas con scope *.target.com + infra propia (Coinbase, Tesla, GitLab), el ASN te da TODOS los IPs registrados a esa organización.

Reverse Whois

bash
amass intel -whois -d target.com

ASN enumeration

bash
whois -h whois.radb.net -- '-i origin AS<number>' | grep route
amass intel -asn <ASN_NUMBER>

Brute force IPs

bash
masscan -p80,443,8080,8443 <IP_RANGE> --rate=10000 -oL scan_results.txt

Luego httpx para identificar qué responde y aquatone para screenshots batch.


Virtual hosts

Si un IP responde a múltiples vhosts (común en infra compartida), bruteforce el header Host te expone aplicaciones que no son alcanzables por DNS público:

bash
ffuf -u http://<IP>/ -H "Host: FUZZ.target.com" -w vhosts-wordlist.txt -fs <default-size>

-fs <default-size> filtra el tamaño de respuesta default — los vhosts válidos suelen tener un tamaño distinto.


Git history mining — TrashCash

Minar el historial de commits de repos públicos del target para encontrar archivos borrados que contenían secrets. La técnica TrashCash (amrelsagaei.com) ha generado bounties de $1000-$5000 múltiples veces.

Workflow

bash
git clone https://github.com/target/repo.git && cd repo

# Listar TODOS los archivos eliminados
git log --diff-filter=D --summary | grep "delete mode"

# Recuperar contenido del archivo borrado
git show <commit-hash>:<path>

# Buscar secrets en TODO el historial
trufflehog git file://. --json
gitleaks detect --source . -v

[!success] Por qué funciona Los developers borran credenciales accidentalmente comiteadas pero el commit anterior sigue ahí — los secrets siguen siendo válidos en producción semanas después. Cazar .env, .aws/credentials, config.json, *.pem en historial es low-hanging fruit infinito.


Hunting checklist

  • Pasivo: subfinder + amass passive + assetfinder + wayback
  • Activo: puredns con wordlist huge + resolvers frescos
  • httpx probe → alive.txt
  • aquatone screenshots batch
  • naabu top-1000 + nmap full-port en candidatos críticos
  • wafw00f para identificar protección
  • LinkFinder en todos los .js de hosts alive
  • Shodan/Netlas por SSL cert CN + favicon hash
  • ASN expansion si el scope incluye *.target.com
  • vhosts bruteforce en IPs detectados
  • Repos públicos del target: TrashCash en cada uno

Labs relacionados

Practica recon completo en un entorno que simula infra real (subdomains + WAF + ASN scope) con labs de Recon.

Practica esto en un lab

Recon Basico

Resolver

Sigue aprendiendo · cuenta gratis

Guarda tu progreso, desbloquea payloads avanzados y rankea tus flags.

Crear cuenta
Premium · 1 técnica más

Hay un payload extra al final

Cómo cazar origin IPs cuando el target esconde todo detrás de Cloudflare Pro+, incluyendo búsqueda por hash de favicon y SSL cert subject CN — sin tooling de pago.

Desbloquear

5 €/mes · cancela cuando quieras

Artículos relacionados