This is a Kali container with tools I use daily when pentesting - built monthly. This is designed to be a disposable container you can spin up and spin down when you want to do quick tasks. A more longstanding and systemd supported container is in dev which will also contain cloud tools.
sudo podman pull ghcr.io/sir-mudkip/kali-base:latestIf using docker then replace podman with docker. Both work as they are OCI compliant.
I have made this as a base image which can be built upon for your own purposes. You can do this in a Containerfile with:
FROM ghcr.io/sir-mudkip/kali-base:latest AS baseI suggest that you run the following command to run the container:
kali() {
sudo podman run \
-it \
--rm \
--security-opt label=disable \
--network host \
--privileged \
-v $HOME:/run/host \
ghcr.io/sir-mudkip/kali-base:latest
}- If using docker, replace the podman command with docker
--security-optis the required if SELinux is enabled--privilegedis for low level network access--netowork hostfor catching shells- You can update the mount to your desired directory.
Note
To use tools like hashcat in this container, you will need the Nvidia drivers and the Nvidias container toolkit to enable GPU passthru. The CUDA toolkit can be installed in the container and if you enable passthru it should just work. I have not included the toolkit to save space and efficiency, though if you would like to include it you can go here and build a dedicated .sh file for install. I personally would suggest a dedicated hashcat image which is a WIP.
I don't recommend using hashcat in this container as it's already quite big. I have an ongoing project which will seek to make a hashcat container more usable.
Systemd services like metasploit, docker, apache, etc, don't work in this image per se as containers not build with /sbin/init will not enable systemd usage. Stuff like msfvenom as a utility will work perfectly fine for when you need it. As I said at the top, systemd is a work in progress right now and will likely be in a dedicated cloud image or image where the container takes properties from a VM - for me that would be working onsite on a customer project and I would need to lean on msfdb.
Finpilot for the for ideas of how to structure the container as multi-build. More changes will likely be on the way to optimise the Containerfile, but this will suffice for now.
Inspiration and credit must go to cloud hacking guru "Shaunography", creator of Snotra. Please find the links below:
He has also got a containers which you can pull down for metasploit, OR you can dockerise it yourself from the Rapid7 github (I'd suggest the former due to the aliases provided):