Browser Exploitation: A CTF Study Path.
Real browser-exploitation CTF challenges from 2018-2026, grouped by technique and ordered as a study path from a first out-of-bounds array in V8 to escaping the V8 sandbox. Most are V8 (d8) challenges; a final module covers SpiderMonkey, SerenityOS LibJS and two small embedded JavaScript engines.
Every challenge runs its original, patched engine binary with the original challenge's flags: put your exploit at /home/hacker/exploit.js and run /challenge/run. As on the original servers, the engine runs as an unprivileged user that cannot read /flag; once your exploit runs code inside it, execute the flag helper the challenge names (/readflag, /catflag, ...). The few challenges where the original engine read the flag itself say so on their page.
Work through modules 01-06 in order; 07 (other engines) is a side branch you can take any time after 01. Inside a module, challenges go from easiest to hardest. A challenge that also relies on techniques from a later module says so on its page.
The challenges come from mito753/Browser-Exploit-Dojo, mito753's compilation of browser CTF challenges sorted by technique. mito753 compiled them; the challenges belong to their original authors, whom each challenge page credits along with its CTF.
Working on the challenges
On pwn.college
- Start a challenge, then use the Terminal or Workspace (VS Code) tab, or SSH in after adding a public key in your settings:
ssh -i key [email protected]. Each start gives you a fresh container, but/home/hackeris kept, so keep exploits and notes there. - Copy files with
scp/sftpover the same connection (scp -i key exploit.js [email protected]:~/exploit.js), or edit them in the Workspace. - Put your exploit at
/home/hacker/exploit.jsand run/challenge/run. It runs the challenge's original engine on a copy of your script with the original challenge's flags, and prints the exact command line. - As on the original servers, the engine runs as an unprivileged user (uid 1001) that cannot read
/flag, so file builtins likeread('/flag')do not help. Once your code runs inside the engine (shellcode, or a shell it spawns), execute the flag helper the challenge page names (/readflag,/catflag, ...), as in the original. The few challenges where the original engine read the flag itself say so on their page. - Practice mode (the lock icon) gives you
sudobut replaces/flagwith a practice flag. You do not need it for anything below.
Debugging on pwn.college
/challenge/run runs as root, so you cannot attach a debugger to it. Debug your own copy of the engine instead. The workspace has gdb (with pwndbg, gef and bata24-gef), and none of this needs root:
mkdir -p ~/dbg && cd ~/dbg && cp -r /challenge/. . && gunzip -fr . && chmod +x d8 # or js, ... (see the challenge page)
./d8 --allow-natives-syntax <the challenge's flags> ~/exploit.js # %DebugPrint(obj), %SystemBreak() and friends
gdb -q --args ./d8 --allow-natives-syntax <flags> ~/exploit.js # then `run`; %SystemBreak() stops in gdb
Each challenge page gives its exact command lines, including the bundled glibc loader for engines newer than the container's glibc. --allow-natives-syntax is for debugging only: /challenge/run uses the original flags, so remove the % calls before the real run. Release builds have no %DebugPrint object details; job and telescope from pwndbg/gef, plus addresses from %DebugPrint, get you a long way.
Running challenges locally
- Clone this dojo: each challenge directory is exactly what
/challengeholds. Unpack it withgunzip -fr .and run the engine as above; add V8'stools/gdbinit(from the matching V8 checkout) to gdb forjob. - Engines built for a newer glibc than your system's run through the bundled
glibc/ld-linux-x86-64.so.2 --library-path glibc, exactly as on pwn.college. To match pwn.college completely, run them in its image:docker run -it --rm -v "$PWD:/c" -w /c pwncollege/challenge-legacy. /challenge/runitself works only inside a pwn.college container (it needsexec-suid,/flagand/home/hacker).
Suggested workflow
- Read the challenge page, the patch (
*.diff/*.patch) and the engine flags; note the V8 version and whether the V8 sandbox and pointer compression are on. - Build your primitives (
addrof,fakeobj, arbitrary read/write) step by step in a debug copy with--allow-natives-syntax, checking each with%DebugPrintand gdb. - Remove the
%calls and run your exploit in your copy with exactly the challenge's flags, several times in a row: GC and JIT timing make exploits flaky. - Copy it to
/home/hacker/exploit.jsand run/challenge/runin normal mode: the real flag only exists there.
A note on AI agents
Please do not use AI agents to solve these challenges. This dojo is practice for building your own browser exploitation skills, and the challenges come from public CTFs whose writeups and exploits are very likely already in the agents' training data: an agent that solves one teaches you nothing.
If you really want AI help, use it as a tutor that asks you questions instead of handing you answers, for example with the socratic-tutor skill.
Problems or questions
For any concern or issue with this dojo (a challenge that does not run, a wrong flag location, missing or wrong credits), please open an issue on GitHub.
Award: 🌐
Stats
Modules
-
First V8 Bugs: Array OOB to Shellcode
0 / 6 -
Builtin Bugs: Coercion, Reentrancy and Elements Kinds
0 / 7 -
JIT Compilers: TurboFan and Maglev
0 / 11 -
The Hole, Maps and the Garbage Collector
0 / 5 -
WebAssembly Engine Bugs
0 / 6 -
Escaping the V8 Sandbox
0 / 8 -
Beyond V8: SpiderMonkey, LibJS, MuJS and mJS
0 / 4
30-Day Scoreboard:
| Rank | Hacker | Badges | Score |