/kali-artis3n

A kalilinux/kali-rolling container with extra juice.

Primary LanguageShellMIT LicenseMIT

artis3n/kali

A kalilinux/kali-rolling container with extra juice.

Deploy Docker Image GitHub release (latest SemVer) Docker Pulls GitHub last commit GitHub GitHub followers Twitter Follow

The kalilinux/kali-rolling container comes with no pre-installed services. It is meant to be lightweight and clocks in around 118 MB. You must configure every service and tool you need from that base image.

This container, uncompressed, is around 4.7 GB (or 2.4 GB without wordlists). It installs and pre-configures a number of frequently uses Kali tools. It is meant to allow you to quickly get up and running with a Kali environment on an ephemeral host. Don't spend time configuring and tweaking - pull, run, execute, pwn.

Wordlists

A premium is placed on keeping this image as small as is reasonable given its intended purpose. For example, searchploit is installed in this image but exploitdb-papers is not installed because this increases the image size by 6GB.

Seclists and Rockyou are pre-installed by default in the latest and semver tags, e.g. 1, 1.2, 1.2.0. This increases the image size by 1.5 GB. Therefore, if you do not need wordlists, you can use the <tagname>-no-wordlists tag. For example:

docker pull artis3n/kali:latest-no-wordlists

Currently, only latest is built without wordlists, as latest-no-wordlists. The semver tags (e.g. 1, 1.2, 1.2.0) are built with wordlists.

Image efficiency (Dive)

Docker Image Size (tag) Docker Image Size (tag)

Efficiency of the build image is checked with dive:

Image condition Image Size
With wordlists Dive image with wordlists efficiency
Without wordlists Dive image without wordlists efficiency

Last checked: 2022-02-18

The container is not meant for a persistent attacker environment. The intention is for a quick environment to run attacks and document the results outside of the container. The container does not expect a mounted volume for persistent storage - although, like any container, storage inside the container will remain until you docker rm and you may set up volumes as you prefer.

Usage

Download the image:

docker pull artis3n/kali:latest
docker pull artis3n/kali:latest-no-wordlists
# or
docker pull ghcr.io/artis3n/kali:latest
docker pull ghcr.io/artis3n/kali:latest-no-wordlists

Run the container:

docker run --name kali -it --rm artis3n/kali:latest
# Or detach the container and run commands through it
docker run --name kali -id artis3n/kali:latest
docker exec -t kali nmap -p- 127.0.0.1

Suggested: Alias a command to the container, run commands through the container from your terminal with ease:

alias kali="docker exec -it kali"
kali sqlmap -u ...

Docker Exec

Docker Exec AutoRecon

Get a terminal if you backgrounded the container:

docker exec -it kali /bin/bash

Docker TTY

Stop the backgrounded container, turn it back on whenever you need to run a command:

docker stop kali
docker start kali

Kill the backgrounded container:

docker stop kali && docker rm kali

Contributions

Missing a tool you would like pre-configured? File a ticket and I will add it. A pull request is also welcome.

For any new tools, you must add validation tests to .github/workflows/ci.yml. Use the existing tests as a baseline. These tests ensure the tools are installed and pre-configured correctly.

Recognition

Thanks Anit Gandhi for help optimizing the Dockerfile and build images.