Kali Linux Docker



DOCKER

A tool to create, deploy and run applications by using containers.

Docker build -t yourname/imagename path/to/theDockerfile (don’t actually put ‘Dockerfile’ in the path). Do change ‘imagename’ to something apropos, such as ‘kali’ Run it docker run -ti -p 80:80 -p 443:443 -v /Users/yourname/Desktop:/root yourname/imagename. The above examples require you to replace ‘yourname’ with your Mac username-ti.

  • Docker-compose ps. Yep, it’s that microservice that’s still buggy. No issue, I’ll just restart it: docker-compose restart. Okay now let’s try again. Oh wait the issue is still there. Docker-compose ps. Right so the service must have just stopped immediately after starting.
  • Install Docker: Getting minimal Kali image up and running is easy (https://www.kali.org/news/official-kali-linux-d.
  • Image built from the kali-dev development repository (for tests only) Container. 100K+ Downloads. By kalilinux. Updated 6 days ago.

Docker is a set of the platform as service products that use OS virtualization to deliver software in containers. A Docker container image is a lightweight, standalone, executable package of software that has everything you need to run an application like code, runtime, system tools, system libraries, and settings.

Docker is very convenient platform as a service as it is available for every device now like laptop, Desktop, Raspberry pi, Linux, etc.

Kali

Install Docker

Uninstall old version of Docker if you have:

Install latest version of Docker:

For installing Docker in Raspberry Pi, use the following command:

Note:

If you get aufs-dkms package error while installing Docker on Raspberry pi use –no-install-recommends switch to resolve this issue by not installing aufs-dkms package, that anyways is not much needed.

Configure Docker APT repository (Required)

For configuring in Raspberry Pi 32-bit:

For configuring in Raspberry Pi 64-bit:

STEPS TO SET UP KALI LINUX IN DOCKER

Note: Following steps will be same for installing kali linux in raspberry pi with Docker also.

1) Sign in to Docker account.

2) Get Docker Desktop application suitable for your system with steps above.

3) Go to terminal type:-

This will download and install the docker image.

4) Run Kali Linux image with the following command:-

This will start a reverse shell with this image. and you will get the command line control of Kali Linux.

5) Update all packages database of Kali Linux.

If there is a new version of the package available. apt-get will download this information (not the package itself).

6) upgrade all the packages that are already installed.

It looks for dependencies with the newer version of the package being installed and it tries to install new packages or remove existing ones on its own.

Necessary software for penetration testing

1) Install the necessary tools for cyber forensics:-

2) Get top 10 tools meta-package of Kali Linux with following command:-

3) Get only password cracking tools:-

4) Tools related to website penetration testing:-

5) Tools for wireless network penetration testing:-

All other bundles can be found by clicking this button:-

Some of Docker important commands

Here are some of the commands that you will need while running Docker.

  • docker images – Shows you all images present in the registry.
  • docker run – Runs a command in a new container.
  • docker start – Starts the stopped containers.
  • docker stop – Stops running containers.
  • docker build – Builds an image form a Docker file.
  • docker pull – Pulls an image or a repository.
  • docker push – Pushes an image or a repository to a registry.
  • docker export – Exports a container’s filesystem as a tar format.
  • docker exec – Runs a command in container.
  • docker search – Searches the Docker Hub for images.
  • docker attach – Attaches to a running container.
  • docker commit – Creates a new image from a container’s changes.

Top 10 Spying Apps for Android

A few times now, I find myself wondering why I need a full blown VM. I like need to quickly get my tools up and running on any hardware I find myself on. Most of the time that is a fresh installed Windows 10 on my Surface Book—I like messing things up to a point of no return… what can I say?

As I illustrated the beauty of “Bash on Ubuntu on Windows” in the Azure Security Center’s SQL-Injection Playbook, I realized there really must be a better way to bring Kali Linux over to Windows as well. As many know, Kali is a customized Linux distribution, based on Debian. I could, in theory, install Ubuntu and install the Kali repositories and go from there—in addition, I like to stay away from multiple repositories from multiple parties on the same packages. Possible, but a configuration nightmare to maintain and troubleshoot. Kali’s official documentation seems to agree with me.

The next best thing is Containers. In the Windows world, this requires Windows 10 Anniversary Edition+. You’ll be able to enable Containers, Install Docker, and pull a Kali Linux image all in 10 minutes or less (download speeds may vary ).

Installing the Containers Feature and Installing Docker

First, we must enable the “Containers” feature. Run (ctrl+r) “optionalfeatures”.

And make sure this “Containers” option is checked off.

Kali Linux Docker File

Kali

Once that completes, follow these instructions to install docker: https://docs.docker.com/docker-for-windows/install/. Grab the Stable channel Windows MSI and install it. Once you get it to install, you need to log out and log back in. NOTE: Although Docker stated it just needed a log-out/log-in, in order for the Docker service to run on my machine it required a reboot.

Kali Linux Docker Windows 10

After logging back in, in your notifications, you should get a “Docker is starting…”.

Pull Official Kali Linux Docker Image

We will be following the guidance here: https://www.kali.org/news/official-kali-linux-docker-images/

Open up your favorite command line interface (CLI). Then type “docker pull kalilinux/kali-linux-docker”. This will pull the image from the Docker Store.

Now, let us enter an interactive bash session with that image by typing “docker run -t -I kalilinux/kali-linux-docker /bin/bash”

We are now in our fresh install of Kali. Since this install is meant to be the minimal, you need to grab the packages you actually care about. This helps keep the image small but does require a good Internet connection to get up and running.

Before installing any package, let’s upgrade our Kali Linux and remove all packages we no longer need via “apt update && apt full-upgrade && apt auto-remove && apt-autoclean”

Installing the Metasploit Framework

Lastly, let us install the go-to package for most pentesters… Metasploit. A simple command of “apt install metasploit-framework ruby” will do the trick.


Just start up the PostgresSQL database that Metasploit uses, initialize the database, and to msfconsole we go!

Happy Hunting,

Andrew (@ciberesponce)