Docker is really popular among the dev-ops community.
If you have never used Docker before, it’s basically a tool in which allows you to load core application files without having to run a whole OS inside a VM. It does all of this by running applications inside containers. If you want to learn more about docker, here is a handy link:
Aside from applications, you can also run core OS files such as Ubuntu or Debian. This allows you to spin up a Linux container by using Docker and Powershell. Since you can run Linux, you can also run Kali. It’s important to note that some people see Docker as a security threat. This is because by default, you are root so be careful when using Docker as it could be exploited.
Kali is a well known Debian-based Linux distribution which is used by security specialists, such as pen-testers. Now Kali can be run on USB, dual booted or simply ran as a VM. What Kali have also done is make it available over docker.
Below are a set of commands I use in order to spin up Kali and add a few tools. This are commands you run once Docker has started and you have opened up Powershell.
Download Image: docker pull kalilinux/kali-linux-docker
Run the container: docker run -t -i kalilinux/kali-linux-docker
Update and install Metasploit: apt-get update && apt-get install metasploit-framework
This will give you the basics but here are a few more commands you can run to add a few more tools:
Install Networking tools (Ifconfig): apt-get net-tools
Install ExploitDB: git clone https://github.com/offensive-security/exploit-database.git
Second Part: apt -y install exploitdb
If Metasploit is failing to load, here are a few commands you can run in order to fix it:
Move inside the Metasploit directory: cd usr/share/.. metasploit
Install Bundler: gem install bundler
Second part: bundle install
Update Gem: gem update –system
Install RubyGems: apt-get install rubygems
Once this is fixed, you can start the DB by running:
Start the DB: service postgresql start
Initialize the MSF DB: msfdb init
Restart the DB: service postgresql restart
You should now be able to start Metasploit and have a running container of Kali.