Installing the OWASP Juice Shop on Kali with Docker is super fast because you don’t have to install anything but Docker. It also makes cleaning up the environment and/or starting over very easy, and all it takes is a couple of commands and mere seconds.
That’s assuming you already have a Kali Virtual Machine running, of course. If you don’t, here’s the quickest way to install Kali on VirtualBox.
Let’s get to it!
Installing Docker in Kali
If you prefer tutorials in a video format, here you go! Otherwise, written steps are below.
Code language: CSS (css)
sudo apt update sudo apt install -y docker.io
At this point, docker service is started but not enabled. If you want to enable docker to start automatically after a reboot, which won’t be the case by default, you can type:
sudo systemctl enable docker --now
The last step is to add our non-root user to the docker group so that we can use Docker:
Code language: PHP (php)
sudo usermod -aG docker $USER
We now need to reload settings so that this permissions change applies.
The best way to reload permissions, though, is to log out and back in. If that doesn’t work, try to reboot the system. Otherwise, you may found that other terminal windows haven’t reloaded settings and you may get “permission denied” errors. But, if you’d rather not log out or reboot at this time, you can use the above command.
Running the OWASP Juice Shop on Kali with Docker
With docker installed, we can now pull in different environments as we need them, without having to install any other software for those environments.
For this course, we use the OWASP Juice Shop a lot. The Juice Shop is one of the most modern and sophisticated insecure web applications designed to be used in security training, and it includes vulnerabilities for all of the OWASP top 10, making it a great choice to learn about today’s top web security threats.
Instead of having to spend a bunch of time setting up the application, we can run it with this simple command now that we have Docker installed:
docker run --rm -p 3000:3000 bkimminich/juice-shop
If that command doesn’t work, try this first:
docker pull bkimminich/juice-shop
…and then re-run the
docker run command above.
Once it pulls in the image and requirements, it launches the app which we can then access at http://localhost:3000/.
Since the Juice Shop is running on port 3000, we could run other environments on different ports (like 80) and easily switch back and forth.
At this point, you can explore the OWASP Juice Shop and have all the fun you want!
If you’d like to learn about SQL injections and other types of web-based injections, and perform them against the OWASP Juice Shop and other environments, check out our course: Injection Attacks: The Complete 2020 Guide.