The setup we use to reproduce v8CTF submissions consists of two kCTF challenges:
tl;dr: the chrome container will run chrome headless that proxies all requests through the exploit container.
repro-chrome hosts a setup similar to the chrome challenge.
We run chrome in headless mode without a sandbox and there’s a flag on the filesystem.
The main difference is in how we start chrome (see challenge/chal):
--ignore-certificate-errorsrepro-exploit using the --proxy-server flag.repro-exploit hosts the exploit that needs to be added in challenge/exploit.tar.gz.
By default, it runs mitmdump (from mitmproxy) and a webserver.
The webserver runs on port 1234 and serves the contents of the provided exploit.tar.gz.
mitmdump listens on port 1337 and proxies all requests to the webserver.
Participants can provide their own script if they add a doit.sh in the exploit archive.
Note: the webserver needs to provide a /exp.html since that will be the URL that will get loaded initially.
To reproduce an exploit locally, you can check out the kCTF documentation.
You need to:
exp.html at repro-exploit/challenge/exploit.tar.gzrepro-chrome and repro-exploitrepro-chrome challenge (see local-testing.html)If the exploit works, it should print the flag.