# RCE of Burp  Scanner / Crawler via Clickjacking 

Burp's headless Chrome exposed a remote-debugging WebSocket; a JS port scan plus clickjacking hijacked the debug GUID to write user.vmoptions and achieve RCE.

- Payout: $3,000
- Severity: high
- Program: PortSwigger
- Found by: mattaustin
- Disclosed: 2023-10-10
- Write-up quality: 8/10
- Original: https://hackerone.com/reports/1274695
- Library page: https://bugbountylibrary.com/r/h1%3A1274695
- Tags: area:os domain:browser domain:desktop impact:rce kind:bounty platform:hackerone sev:high tech:chromium technique:chained technique:recon vuln:clickjacking vuln:rce vuln:xss

**Target:** Burp Suite embedded headless Chrome remote-debugging WebSocket
**Root cause:** Burp launched headless Chrome with remote-debugging enabled over a WebSocket port instead of the safer remote-debugging-pipe, exposing the debug channel to page-level JS.
**Steps:**
1. Host `burp.html` on a local web server (`python -m http.server`)
2. Open a Chrome browser and navigate to the hosted exploit page
3. Page runs a JS port scanner to find the randomized Chrome remote-debugging port
4. Clickjacking payload renders; victim clicks 'CLICK ME!!!' to approve the debug WebSocket GUID
5. Use remote debugging APIs to download `user.vmoptions` into `/Applications/Burp Suite Professional.app/Contents/` with `-Xmx5m` and `-XX:OnOutOfMemoryError=open -a Calculator`
6. Restart Burp; JVM exhausts memory and launches Calculator
**How found:** Noticed Burp's embedded Chrome used remote-debugging WebSocket port rather than remote-debugging-pipe, making the debug channel reachable from page JS; combined with a known Chrome XSS and clickjacking to steal the GUID.
**Exploitation:** Attacker-controlled page is scanned by Burp's headless Chrome. JS port-sniffs the debug port, clickjacks the user into granting the WebSocket GUID, then via remote-debugging APIs writes a malicious user.vmoptions into the app bundle. On next launch the JVM OOM triggers the injected OnOutOfMemoryError command, running with the user's privileges.
**Escalation:** Chained Chrome XSS + port sniffing + clickjacking to hijack debug GUID, then file write to JVM options for persistent RCE on restart.
**Insight:** When a desktop app embeds Chrome for crawling, check whether it uses `--remote-debugging-port` vs `--remote-debugging-pipe`; a reachable debug port lets scanned pages pivot to full RCE via file writes like JVM options.

