A Dockerized environment to execute SSRF via DNS rebinding; it contains the following:
- A container running rbndr; this is to allow DNS race conditions
- A container running a localhost site using Python's http.server; this is to receive SSRF hits
- A container running NodeJS with the default resolver set to rbndr (on localhost); this is to test the race condition against NodeJS code/libraries
(All of the containers have the same IP—which allows sending HTTP requests to the site container, or DNS queries to the rbndr container.)
- Create the containers:
docker-compose up- Go into the node container:
docker exec -it rebinding_node_1 sh-
The node container will have the
vulndirectory attached to/home/node/vuln; ALSO MAKE SURE YOU INSTALL THE NPM DEPENDENCIES OUTSIDE OF THE CONTAINER (npm install) -
Do yo testing!
sh /home/node/vuln/infinite.sh /home/node/vuln/C0oki3s-ssrf/index.jsYou can destroy the containers by running:
docker-compose downOr you can just stop them:
docker-compose stopAnd then start them again:
docker-compose start