Since 2023 V8 keeps its heap inside a sandbox: an arbitrary read/write inside the cage is no longer code execution. These challenges give you the in-sandbox primitive (often directly, via --sandbox-testing's Sandbox API) and ask you to escape: corrupt trusted pointers, bytecode, code entry points or the native stack until you control rip. Read V8's sandbox design docs first.
Where to start
Read the sandbox README and blog post, then run a recent d8 with --sandbox-testing and use the Sandbox object to corrupt objects by hand. Notice what you can reach: everything inside the cage, but raw pointers to the outside go through tables (external, trusted and code pointer tables) that you can index but not forge. For each challenge, list what still trusts in-cage data (bytecode and its register file, a table index, a length used outside the cage, the native stack) and aim to control rip. Check the V8 version: the 2022 sandbox is much weaker than the 2024 one.
Reading
- The V8 Sandbox: why the sandbox exists and what it promises (Samuel Groß).
- V8 Sandbox README: the design: the cage, the pointer tables, trusted space and what counts as a bypass.
- The V8 Heap Sandbox (OffensiveCon 2024 slides): the attacker's view of the sandbox, from its designer.
- V8 sandbox testing.cc: the
Sandboxmemory corruption API and crash filter that several challenges expose. - Code execution in Chromium's V8 heap sandbox (anvbis): getting code execution from inside the sandbox after the early techniques died.
Challenges
30-Day Scoreboard:
This scoreboard reflects solves for challenges in this module after the module launched in this dojo.
| Rank | Hacker | Badges | Score |