
Command-line 보안 평가 프레임워크로, React 및 Next.js 애플리케이션을 대상으로 React Server Components의 잘못된 구성을 분석하며, 다중 대상 스캔, WAF 탐지 및 프록시 지원을 제공합니다.
React 및 Next.js 애플리케이션을 위한 웹 애플리케이션 보안 평가 프레임워크
이 도구는 승인된 보안 테스트 전용으로 설계되었습니다.
사용자는 모든 관련 법률 준수에 대한 단독 책임이 있습니다.
React2Shell Scanner는 보안 전문가가 React 및 Next.js 웹 애플리케이션의 잠재적 취약점을 식별할 수 있도록 설계된 명령줄 보안 평가 프레임워크입니다. React Server Components(RSC) 구현에서 일반적인 보안 오설정을 분석하는 데 중점을 둡니다.
| 기능 | 설명 |
|---|---|
| 🎯 다중 대상 스캔 | 단일 URL 또는 대상 목록 스캔 |
| 🔄 동시 테스트 | 효율적인 평가를 위한 멀티스레드 |
| 🛡️ WAF 탐지 | WAF 응답 식별 및 분석 |
| 📊 진행 상황 추적 | tqdm 기반 시각적 진행 표시줄 |
| 🔧 헤더 설정 가능 | 사용자 정의 헤더 주입 |
| 🌐 프록시 지원 | HTTP/HTTPS 프록시 경유 |
| 📝 출력 형식 | JSON 및 텍스트 보고서 생성 |
| 🎨 컬러 CLI | 명확하고 색상으로 구분된 터미널 출력 |
# 저장소 클론
git clone https://github.com/wi3memake/React2Shell-Scanner.git
cd react2shell-scanner
# 가상 환경 생성 (권장)
python -m venv venv
source venv/bin/activate # Linux/Mac
.\venv\Scripts\activate # Windows
# 의존성 설치
pip install -r requirements.txt
requests>=2.28.0 # HTTP 클라이언트 라이브러리
tqdm>=4.64.0 # 진행 표시줄 시각화
urllib3>=1.26.0 # URL 처리
# 단일 대상
python react2shell.py.py -u https://example.com
# 상세 출력 포함
python react2shell.py.py -u https://example.com -v
# 파일에서 스캔
python react2shell.py.py -l targets.txt
# 동시 스레드 사용
python react2shell.py.py -l targets.txt -t 10
# 사용자 정의 헤더
python react2shell.py.py -u https://example.com -H "Authorization: Bearer token"
# 프록시 경유
python react2shell.py.py -u https://example.com --proxy http://127.0.0.1:8080
# SSL 검증 건너뛰기
python react2shell.py.py -u https://example.com --no-verify
# 파일로 출력
python react2shell.py.py -u https://example.com -o results.json
| 인수 | 약어 | 설명 | 기본값 |
|---|---|---|---|
--url | -u | 단일 대상 URL | - |
--list | -l | 대상 URL이 포함된 파일 | - |
--threads | -t | 동시 스레드 수 | 5 |
--timeout | - | 요청 시간 초과(초) | 10 |
--proxy | - | 프록시 URL (http/https) | - |
--headers | -H | 사용자 정의 헤더 | - |
--output | -o | 출력 파일 경로 | - |
--no-verify | - | SSL 검증 건너뛰기 | False |
--verbose | -v | 상세 출력 | False |
--waf-bypass | - | WAF 우회 모드 | False |
--bypass-size | - | 우회 페이로드 크기 (KB) | 128 |
React2Shell Web Application Security Assessment Framework
[*] Starting assessment of https://example.com
[*] Analyzing React Server Components...
[*] Testing redirect behavior...
[+] Assessment complete
Target: https://example.com
Status: Analyzed
Response Code: 200
Server: Next.js
React Version: 18.2.0
RSC Detected: Yes
Assessment Time: 1.23s
{
"target": "https://example.com",
"timestamp": "2025-01-15T10:30:00Z",
"results": {
"status_code": 200,
"server": "Next.js",
"rsc_detected": true,
"headers": {
"content-type": "text/html",
"x-powered-by": "Next.js"
},
"assessment_time": 1.23
}
}
React2Shell-Scanner/
├── react2shell.py.py # 메인 스캐너 스크립트
├── requirements.txt # Python 의존성
└── README.md # 문서
한 줄에 하나의 URL이 포함된 텍스트 파일을 생성합니다:
https://target1.com
https://target2.com
https://target3.com/api
-H 플래그를 반복하여 여러 헤더를 전달합니다:
python react2shell.py.py -u https://example.com \
-H "Authorization: Bearer token123" \
-H "X-Custom-Header: value" \
-H "Cookie: session=abc123"
# HTTP 프록시
--proxy http://127.0.0.1:8080
# HTTPS 프록시
--proxy https://proxy.example.com:8443
# 인증 프록시
--proxy http://user:[email protected]:8080
# GitHub Actions 예시
security-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run security scan
run: python react2shell.py.py -u ${{ secrets.TARGET_URL }} -o results.json
import subprocess
import json
# 스캐너 실행
result = subprocess.run(
['python', 'react2shell.py.py', '-u', 'https://example.com', '-o', 'results.json'],
capture_output=True,
text=True
)
# 결과 파싱
with open('results.json') as f:
findings = json.load(f)
연결 시간 초과
# 시간 초과 증가
python react2shell.py.py -u https://example.com --timeout 30
SSL 인증서 오류
# 검증 건너뛰기 (테스트 전용)
python react2shell.py.py -u https://example.com --no-verify
속도 제한
# 스레드 수 줄이기
python react2shell.py.py -l targets.txt -t 2
다음 분야의 개선을 환영합니다:
GitHub에서 이슈와 풀 리퀘스트를 제출해 주세요.
이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여됩니다.
효율적인 보안 테스트
🔒 항상 책임감 있게 테스트하세요 🔒