
RSC Detect CVE 2025 55182
Utilità di rilevamento leggera per identificare applicazioni React Server Components e Next.js
RSC-Detect è uno strumento semplice e mirato progettato per identificare siti web che utilizzano React Server Components (RSC) e il framework Next.js. È utile per:
# Clona
git clone https://github.com/vijay-shirhatti/RSC-Detect-CVE-2025-55182.git
cd rsc-detect
# Installa
pip install -r requirements.txt
# Esegui
python main.py
requests)Modifica targetList in main.py:
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. Invia una richiesta HTTP GET all'URL target
2. Analizza il contenuto HTML e gli header della risposta
3. Confronta i pattern con gli indicatori noti
4. Riporta i risultati
HTML_RSC_PATTERNS = [
'__flight__', # Marcatore di streaming RSC
'react-server-streaming', # Indicatore di streaming server
'__REACT_SERVER_APP__', # Flag dell'applicazione RSC
]
CONTENT_TYPE_RSC_PATTERNS = [
'text/x-component', # Content type RSC
'text/vnd.rsc', # Tipo RSC del vendor
'application/x-react-server-component', # MIME RSC completo
]
HTML_NEXTJS_PATTERNS = [
"__NEXT_DATA__", # Idratazione dei dati Next.js
"/_next/static/", # Percorsi degli asset statici
"/_next/data/", # Percorsi di recupero dati
"next-head", # Componente head
"next-font", # Ottimizzazione font
"next/script", # Componente script
]
RSC-Detect-CVE-2025-55182/
├── main.py # Script principale di rilevamento
├── requirements.txt # Dipendenze Python
└── README.md # Documentazione
targetList = [
"https://site1.com",
"https://site2.com",
"https://site3.com/app",
]
# Aggiungi nuovi pattern RSC
HTML_RSC_PATTERNS.append('your-custom-pattern')
# Aggiungi nuovi pattern Next.js
HTML_NEXTJS_PATTERNS.append('custom-next-indicator')
# Modifica il timeout della richiesta (predefinito: 10 secondi)
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
# Utilizzo
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)
# Aggiungi logica di retry
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))
# Disabilita la verifica SSL (non consigliato per la produzione)
httpResponse = requests.get(targetUrl, timeout=10, verify=False)
# Gestisci diverse codifiche
httpResponse.encoding = httpResponse.apparent_encoding
Questo strumento è pensato per:
Assicurati sempre di avere il permesso prima di scansionare target che non possiedi.
requests>=2.28.0
urllib3>=1.26.0
I contributi sono benvenuti! Puoi aiutare:
Licenza MIT - Gratuita per uso personale e commerciale.
Semplice • Veloce • Efficace
⭐ Lascia una stella se trovi questo strumento utile!
| Categoria | Pattern rilevati |
|---|
| 🔵 Marcatori RSC | __flight__, react-server-streaming, __REACT_SERVER_APP__ |
| 📄 Content-Type | text/x-component, text/vnd.rsc, application/x-react-server-component |
| ⚡ HTML Next.js | __NEXT_DATA__, /_next/static/, next-font, next/script |
| 📋 Header | x-powered-by: next.js |
| Framework | Tasso di rilevamento | Note |
|---|
| Next.js 13+ | Alto | Molteplici indicatori presenti |
| Next.js 12 | Alto | __NEXT_DATA__ affidabile |
| React RSC | Medio | Dipende dall'implementazione |
| React personalizzato | Basso | Richiede pattern personalizzati |