
This Python tool exploits the CVE-2024-6043 vulnerability, which affects the SourceCodester Best House Rental Management System 1.0. The vulnerability allows remote attackers to perform SQL Injection via the `admin_class.php` file, specifically targeting the `username` parameter
# CVE-2024-6043 CVE-2024-6043
## 概述
该Python工具利用CVE-2024-6043漏洞,该漏洞影响SourceCodester Best House Rental Management System 1.0。漏洞允许远程攻击者通过`admin_class.php`文件中的登录功能,针对`username`参数执行SQL注入。该工具自动化检测易受攻击的端点并注入payload以绕过认证的过程。
## 功能
- **自动路径检测**:该工具检查目标服务器上是否存在易受攻击的`admin_class.php`文件。
- **SQL注入Payload**:如果找到路径,工具尝试注入SQL payload以绕过管理员登录。
- **成功检查**:工具通过搜索常见登录成功指示来验证SQL注入是否成功。
- **自定义User-Agent**:工具使用自定义User-Agent发送请求以模拟合法浏览器流量。
## 安装
1. **克隆仓库:**
```bash
git clone https://github.com/lfillaz/CVE-2024-6043.git
cd CVE-2024-6043
运行工具:
python CVE-2024-6043.py
输入目标URL:
当提示时,输入目标网站的URL(例如http://target-site.com)。
注入过程:
admin_class.php路径是否存在于目标服务器上。 ██████╗██╗ ██╗███████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗██████╗
██╔════╝██║ ██║██╔════╝ ╚════██╗██╔═████╗╚════██╗██║ ██║ ██╔════╝ ██╔═████╗██║ ██║╚════██╗
██║ ██║ ██║█████╗ █████╗ █████╔╝██║██╔██║ █████╔╝███████║█████╗███████╗ ██║██╔██║███████║ █████╔╝
██║ ╚██╗ ██╔╝██╔══╝ ╚════╝██╔═══╝ ████╔╝██║██╔═══╝ ╚════██║╚════╝██╔═══██╗████╔╝██║╚════██║ ╚═══██╗
╚██████╗ ╚████╔╝ ███████╗ ███████╗╚██████╔╝███████╗ ██║ ╚██████╔╝╚██████╔╝ ██║██████╔╝
╚═════╝ ╚═══╝ ╚══════╝ ╚══════╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝╚═════╝
BY @GhostByte discord.gg/byt
$ python CVE-2024-6043.py
Enter the target site (e.g., http://target-site.com): http://example.com
Checking if http://example.com/admin_class.php exists...
The path exists.
Do you want to inject the payload? (Y/N): y
Injecting... Done.
SQL Injection successful! Admin login bypassed.
此工具仅供教育目的使用。请负责任地使用,并仅在有明确权限的系统上进行测试。滥用此工具可能导致法律后果。