hypnguyen1209/offensive-claude / skills/browser-exploitation
browser-exploitation
VerifiedUse when building a client-side browser exploit — V8/JSC JIT type confusion to renderer R/W, V8 heap-sandbox escape, renderer-to-browser sandbox escape (Mojo IPC, GPU/Dawn/ANGLE), Electron/webview IPC abuse, 1-click RCE chains
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.6 KB |
| references/clientside-rce-chains.md | markdown | 8.6 KB |
| references/electron-webview-rce.md | markdown | 10.2 KB |
| references/renderer-to-browser-escape.md | markdown | 9.8 KB |
| references/v8-jit-typeconfusion.md | markdown | 9.3 KB |
| references/v8-sandbox-escape.md | markdown | 9.5 KB |
| scripts/chain_server.py | script | 7.7 KB |
| scripts/d8_debug.sh | script | 2.8 KB |
| scripts/electron_audit.py | script | 10.7 KB |
| scripts/mojo_fuzz_harness.py | script | 10.2 KB |
| scripts/sandbox_escape.js | script | 6.2 KB |
| scripts/v8_typer.js | script | 6.3 KB |
references/renderer-to-browser-escape.md
View on GitHub# Renderer → Browser Escape (OS Sandbox Breakout)
Input: native code execution inside a fully-compromised renderer (from `v8-sandbox-escape.md`). The renderer still runs under the **OS sandbox** (Windows: restricted token + AppContainer/Job + Win32k lockdown; Linux: seccomp-bpf + user namespaces; macOS: Seatbelt). It can do almost nothing to the host directly. This cluster escapes that sandbox via the two dominant 2024-2026 paths: **Mojo IPC logic bugs** and **GPU-process memory bugs**.
## Theory / Mechanism
### Chromium multi-process trust model
- The **browser (broker) process** is privileged (user's full token). Renderers are unprivileged and must ask the broker, over **Mojo IPC**, for anything that touches the OS (files, network sockets, process launch, device access).
- The **GPU process** runs in a *less restrictive* sandbox than the renderer (it needs access to graphics drivers/3D APIs). It is reachable from the renderer over Mojo (command buffers, WebGPU/Dawn, ANGLE). Compromising it is often an easier sandbox escape than attacking the broker directly.
- Mojo messages are typed interface calls; the broker is supposed to validate every message and every **handle** a renderer passes. Two bug classes break this:
- **Logic bugs**: the broker trusts a handle/argument it shouldn't (wrong handle type, missing permission check) → renderer makes the broker do a privileged action. *No memory corruption needed* — and MTE/CFI can't stop a valid-but-malicious control flow.
- **Memory bugs**: UAF/OOB in a Mojo-exposed interface or in the GPU process → hijack execution in the privileged process.
### Mojo handle-confusion (the CVE-2025-2783 pattern)
The broker receives a handle from the renderer and uses it without validating its type/permissions. By forging a specific IPC message, the renderer tricks the broker into performing a restricted action (file write, launch external executable) in the broker's privileged context. Because the control flow is legitimate, the only artifact is the *effect* (e.g. broker writing a file or spawning a process).
### GPU-process pivot (Dawn/WebGPU, ANGLE)
WebGPU's renderer-side API maps to **Dawn** running in the GPU process; cross-process object lifetimes are tricky → UAFs. **ANGLE** translates WebGL/WebGPU to native GL/D3D/Metal/Vulkan → OOB/translation bugs. Control freed/OOB memory via heap spray, hijack the dangling-pointer deref → execution in the GPU process → broader system access than the renderer had.
## Modern 2024-2026 variants (verified)
- **CVE-2025-2783 (Mojo IPC handle confusion, in-the-wild, "Operation ForumTroll", Mar 2025)** — logic bug at the Chrome-sandbox/Windows boundary: an *incorrect handle is provided under certain conditions*, letting a renderer escape into the broker context with the user's privileges. Found by Boris Larin & Igor Kuznetsov (Kaspersky); patched in 134.0.6998.177; added to CISA KEV. Espionage targeting (media/edu/gov). The archetypal modern, memory-safety-proof escape.
- **CVE-2025-4609 (Mojo/ipcz transport, 2025)** — insufficient validation in `Transport::Deserialize` (uses `header.destination_type` from the `from_transport`), lets an already-compromised renderer elevate to broker/host command execution. Fixed in 136.0.7103.113/.114. Notable supply-chain tail: downstream Electron-derived apps (Cursor, Windsurf) lagged the Chromium fix.
- **CVE-2025-6558 (ANGLE/GPU sandbox escape, in-the-wild, 2025)** — GTIG-documented full chain: renderer bug **CVE-2025-5419 (V8 OOB)** → **CVE-2025-6558 (ANGLE)** sandbox escape → **CVE-2025-38352 (Linux POSIX CPU-timers race)** for full system compromise on Linux. Demonstrates the canonical renderer→GPU→kernel chain.
- **CVE-2025-14174 (ANGLE OOB memory access, in-the-wild, Dec 2025)** — OOB in ANGLE's Metal renderer; because ANGLE is shared by Blink and WebKit, the same bug hit **Chrome (patched Dec 10, 2025)** and **Apple WebKit (Safari 26.2 / iOS, CVE-2025-14174 + CVE-2025-43529)**. Used in extremely sophisticated targeted attacks; CISA KEV.
- **Dawn/WebGPU UAF cluster (2025)** — **CVE-2025-10500** (Dawn WebGPU UAF, patched 140.0.7339.185, $15k bounty, researcher "Giunash") and **CVE-2025-12725** (WebGPU OOB write, CVSS 8.8, patched in Nov 2025 release). These are renderer-reachable GPU-process bugs that serve as the escape stage of a chain.
> Caveat: some 2026 Dawn CVE numbers circulating in AI-generated blogs (e.g. "CVE-2026-5281") are not yet corroborated by primary NVD/Chrome release notes as of writing — treat them as *unverified* and confirm against the Chrome release blog / CISA KEV before citing. The *class* (Dawn/WebGPU UAF used as a chain escape stage) is solidly established by the 2025 CVEs above.
Takeaway: in 2024-2026, the GPU/graphics stack (Dawn, ANGLE) is the soft underbelly, and **logic** Mojo bugs are the cleanest escapes because no mitigation catches them.
## Complete working code/commands
`scripts/mojo_fuzz_harness.py` is a complete coverage-guided harness skeleton for fuzzing Mojo interfaces (driving a Chromium build with `--enable-features=MojoLinkErrorRecovery` and an interface-mutation generator). It:
- enumerates `.mojom` interfaces from a Chromium checkout,
- generates structurally-valid-but-mutated messages (handle-type swaps, OOB indices, lifetime violations),
- replays them against a renderer-side test harness and watches for browser/GPU-process crashes.
```bash
# 1) Discover the reachable Mojo attack surface from a renderer (from inside an exploited renderer
# you call interfaces; for research, list them from the checkout):
python3 scripts/mojo_fuzz_harness.py --list-interfaces /path/to/chromium/src
# 2) Fuzz a specific broker-exposed interface for handle/logic bugs:
python3 scripts/mojo_fuzz_harness.py \
--chromium /path/to/chromium/src \
--interface blink.mojom.FileSystemAccessManager \
--mutate handles,indices,lifetimes \
--iters 200000 --crash-dir ./crashes
# 3) Triage a crash for broker-side impact (file write / process launch reached):
python3 scripts/mojo_fuzz_harness.py --triage ./crashes/000123.bin --chromium /path/to/chromium/src
```
From inside an exploited renderer (weaponization, conceptual), the handle-confusion primitive is:
```c
// Pseudocode of the post-renderer-RCE step (real impl is target-version specific):
// 1. Locate the renderer's Mojo bindings (message pipes to the broker) in memory.
// 2. Craft the vulnerable message: pass a handle whose TYPE the broker fails to re-validate.
// 3. Invoke the privileged operation the broker will now perform (e.g. open a file path
// outside the sandbox policy, or launch an executable) -> code runs as the user.
```
GPU path: from renderer-RCE, drive the WebGPU/Dawn or WebGL/ANGLE command stream that triggers the UAF/OOB, spray the GPU-process heap with controlled objects, and hijack the freed-object deref to execute in the GPU process.
## Detection
The escape's *effect* is the IOC: a privileged browser/GPU process doing something a sandboxed renderer never could.
```yaml
title: Browser Broker/GPU Process Spawning Suspicious Child (sandbox escape)
logsource: { product: windows, category: process_creation }
detection:
parent:
ParentImage|endswith: ['\chrome.exe','\msedge.exe','\brave.exe']
# Browser/broker or GPU process should essentially never parent a shell/LOLBin:
child:
Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\rundll32.exe'
- '\regsvr32.exe'
- '\mshta.exe'
- '\wscript.exe'
condition: parent and child
level: high
```
- Mojo message auditing: most EDRs don't inspect Mojo — instrument it where possible (the breakout happens there). Watch for malformed/oversized interface calls and handle-type anomalies.
- GPU IOCs: `--type=gpu` process crashes, Dawn/ANGLE assertion failures, `dxgkrnl`/Metal faults; GPU process touching files/registry.
- Linux: renderer/GPU process making syscalls outside its seccomp profile (`SECCOMP` audit logs), unexpected `clone`/`execve`.
## OPSEC
- **Touches (escape via broker logic bug)**: only the broker's *legitimate* capabilities — but those capabilities (file write, process launch) are exactly what defenders alert on. Prefer the quietest broker capability that achieves your objective.
- **Don't spawn a console child**: a broker spawning `cmd.exe`/`powershell.exe` is the #1 detection. If you have native exec already, do in-process work or inject into an existing process rather than launching a shell.
- **GPU path is often quieter** than broker process-launch (memory corruption stays in-process) but risks crashing the GPU process — fail closed (validate spray landed) before triggering the hijack.
- **Cleanup**: free your GPU-process spray objects and restore any corrupted Mojo state; a crashed browser/GPU process after a "successful" run is a glaring artifact.
- Match the target's GPU backend (D3D11 vs Vulkan vs Metal) — an ANGLE/Dawn trigger built for the wrong backend just crashes.
## References
- SecureLayer7, "CVE-2025-2783: Google Chrome Mojo IPC Sandbox Escape" — https://blog.securelayer7.net/cve-2025-2783-chrome-mojo-ipc-sandbox/
- Armis, "High-Severity Chrome Mojo Sandbox Bypass (CVE-2025-2783)" — https://www.armis.com/threat-alert/high-severity-chrome-mojo-sandbox-bypass/
- OX Security, "The aftermath of CVE-2025-4609: Critical Sandbox Escape (ipcz Transport::Deserialize)" — https://www.ox.security/blog/the-aftermath-of-cve-2025-4609-critical-sandbox-escape-leaves-1-5m-developers-vulnerable/
- Penligent, "Chrome 2025 Zero-Days: The ANGLE, V8, and Mojo Kill Chain (CVE-2025-5419/6558)" — https://www.penligent.ai/hackinglabs/chrome-2025-zero-days-the-angle-v8-and-mojo-kill-chain/
- Help Net Security, "Apple/Chrome ANGLE zero-day CVE-2025-14174 + CVE-2025-43529" — https://www.helpnetsecurity.com/2025/12/15/ios-macos-cve-2025-14174-cve-2025-43529/
- ZeroPath, "CVE-2025-10500 Chrome Dawn WebGPU UAF" — https://zeropath.com/blog/cve-2025-10500-chrome-dawn-webgpu-uaf
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |