
RSC CVE 2025 55182 탐지
React Server Components 및 Next.js 애플리케이션 식별을 위한 경량 탐지 유틸리티
RSC-Detect는 React Server Components(RSC)와 Next.js 프레임워크를 사용하는 웹사이트를 식별하도록 설계된 간단하고 집중된 도구입니다. 다음과 같은 용도로 유용합니다:
이 가이드는 Windows 및 Linux 설치를 지원합니다. macOS는 DMG 파일로 제공됩니다.
Git과 Python이 설치되어 있는지 확인하세요.
Git 링크: https://git-scm.com/install/windows
Python 링크: https://www.python.org/ftp/python/3.13.12/python-3.13.12-amd64.exe
GIT CMD를 실행하세요.
git clone https://github.com/fBUZk2BH/RSC-Detect-CVE-2025-55182.git
cd RSC-Detect-CVE-2025-55182
py -m pip install -r requirements.txt
py main.py
requests만 사용)main.py에서 targetList를 편집하세요:
if __name__ == "__main__":
targetList = [
"https://example.com",
"https://another-site.com",
]
for urlItem in targetList:
analyzeTarget(urlItem)
python main.py
Analyzing target: https://example.com
[Framework Indicators] Detected: ['__NEXT_DATA__', '/_next/static/']
[Framework Headers] Detected: ['x-powered-by: next.js']
Analyzing target: https://another-site.com
No framework indicators detected
1. 대상 URL에 HTTP GET 요청 전송
2. HTML 콘텐츠 및 응답 헤더 파싱
3. 알려진 지표와 패턴 매칭
4. 결과 보고
HTML_RSC_PATTERNS = [
'__flight__', # RSC streaming marker
'react-server-streaming', # Server streaming indicator
'__REACT_SERVER_APP__', # RSC application flag
]
CONTENT_TYPE_RSC_PATTERNS = [
'text/x-component', # RSC content type
'text/vnd.rsc', # Vendor RSC type
'application/x-react-server-component', # Full RSC MIME
]
HTML_NEXTJS_PATTERNS = [
"__NEXT_DATA__", # Next.js data hydration
"/_next/static/", # Static asset paths
"/_next/data/", # Data fetching routes
"next-head", # Head component
"next-font", # Font optimization
"next/script", # Script component
]
RSC-Detect-CVE-2025-55182/
├── main.py # Main detection script
├── requirements.txt # Python dependencies
└── README.md # Documentation
targetList = [
"https://site1.com",
"https://site2.com",
"https://site3.com/app",
]
# Add new RSC patterns
HTML_RSC_PATTERNS.append('your-custom-pattern')
# Add new Next.js patterns
HTML_NEXTJS_PATTERNS.append('custom-next-indicator')
# Modify request timeout (default: 10 seconds)
httpResponse = requests.get(targetUrl, timeout=30)
def loadTargetsFromFile(filepath):
with open(filepath, 'r') as f:
return [line.strip() for line in f if line.strip()]
if __name__ == "__main__":
targetList = loadTargetsFromFile('targets.txt')
for urlItem in targetList:
analyzeTarget(urlItem)
import json
def analyzeTargetJson(targetUrl):
results = {
'url': targetUrl,
'rsc_markers': [],
'content_types': [],
'nextjs_html': [],
'nextjs_headers': []
}
try:
httpResponse = requests.get(targetUrl, timeout=10)
htmlContentLower = httpResponse.text.lower()
headersContentLower = str(httpResponse.headers).lower()
results['rsc_markers'] = [p for p in HTML_RSC_PATTERNS if p.lower() in htmlContentLower]
results['content_types'] = [p for p in CONTENT_TYPE_RSC_PATTERNS if p.lower() in headersContentLower]
results['nextjs_html'] = [p for p in HTML_NEXTJS_PATTERNS if p.lower() in htmlContentLower]
results['nextjs_headers'] = [p for p in HEADER_NEXTJS_PATTERNS if p.lower() in headersContentLower]
except Exception as e:
results['error'] = str(e)
return results
# Usage
results = [analyzeTargetJson(url) for url in targetList]
print(json.dumps(results, indent=2))
from concurrent.futures import ThreadPoolExecutor
def scanConcurrently(targets, maxWorkers=5):
with ThreadPoolExecutor(max_workers=maxWorkers) as executor:
executor.map(analyzeTarget, targets)
# Add retry logic
from requests.adapters import HTTPAdapter
from urllib3.util.retry import Retry
session = requests.Session()
retries = Retry(total=3, backoff_factor=0.5)
session.mount('https://', HTTPAdapter(max_retries=retries))
# Disable SSL verification (not recommended for production)
httpResponse = requests.get(targetUrl, timeout=10, verify=False)
# Handle different encodings
httpResponse.encoding = httpResponse.apparent_encoding
이 도구는 다음을 위해 설계되었습니다:
소유하지 않은 대상을 스캔하기 전에 항상 권한이 있는지 확인하세요.
requests>=2.28.0
urllib3>=1.26.0
기여는 언제나 환영합니다! 다음과 같은 방법으로 도울 수 있습니다:
MIT 라이선스 - 개인 및 상업적 용도로 무료입니다.
단순함 • 빠름 • 효과적
⭐ 유용하다면 스타를 눌러주세요!
| 범주 | 탐지 패턴 |
|---|
| 🔵 RSC 마커 | __flight__, react-server-streaming, __REACT_SERVER_APP__ |
| 📄 콘텐츠 유형 | text/x-component, text/vnd.rsc, application/x-react-server-component |
| ⚡ Next.js HTML | __NEXT_DATA__, /_next/static/, next-font, next/script |
| 📋 헤더 | x-powered-by: next.js |
| 프레임워크 | 탐지율 | 비고 |
|---|
| Next.js 13+ | 높음 | 다중 지표 존재 |
| Next.js 12 | 높음 | __NEXT_DATA__ 신뢰 가능 |
| React RSC | 중간 | 구현 방식에 따라 다름 |
| 사용자 정의 React | 낮음 | 사용자 정의 패턴 필요 |