How To Install Kali Docker Image To The Linux

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/install-kali-docker-image-linux/
PINTEREST
PINTEREST
INSTAGRAM

Kali is security distribution popular in the Cyber security community. Especially penetration testers really love it. Kali provides a lot of security exploitation tool  to test various systems like server, network, application server, database, voip etc. Kali is provided in different formats like virtual machine, iso file, usb image and container. In this tutorial we will look how to install Kali docker container in a Ubuntu box. Our host system is Ubuntu but it is the same for other distributions like Debian, Fedora, CentOS etc.

Install Docker

Docker have different names for different distributions because of some package name conflict. Docker name can be used for Fedora, RedHat, CentOS and other related distributions and installation can be done like below.

Fedora, RedHAT, CentOS:

Debian, Ubuntu, Mint:

Start Docker

Docker works as a daemon service. In order to use docker we need to start this service. There are different service and daemon management tools but sytemctl is supported by all of them.

Check Docker Service Status

Search Kali Image

Now we can use docker command to find Kali docker image. We will use search sub command with kali term to find available Kali container images in Docker Hub.

As we can see there are a lot of Kali container image. We will use most popular one which is provided by officially. Interestingly it is not check as official.

LEARN MORE  How To Get Docker Container Ip and Mac Address

Pull and Install Kali Container Image

We will pull Kali container image from the Docker Repository with the `pull sub-command like below. Container images uses layered file system and downloaded as multi part. This is an advantage for creating multiple containers from single image because only changed part will copied and unchanged part of the image will be used by multiple containers without problem.

Pull and Install Kali Container Image

Pull and Install Kali Container Image

Start A Container

We will start the container with the run sub-command. But there are some options we should provide. After container is started how can we connect to the Kali ? For this we will provide -t and -i options to specify we want to connect to the terminal interactively.

Update Package Information

We should update package information of the Kali container because the container have old versions of tools. Other cause is apt do not have recent and all package information. We will update package information with the following command.

Update Package Information

Update Package Information

Install Tools

By default Kali container comes very thin. We should install required tools by using apt package management. We will install nmap in the following example.

Install Tools

Install Tools

Install Tools Persistently

One of the fundamental rule of the containers is after the container stops all changes are lost. This is unwanted situation for us. We will save our Kali container current state and we can reuse this image again.

LEARN MORE  How To List All Users and Groups in Linux

Find Container

We will list currently running containers to find Kali container and get the Container ID which identifies the container uniquely. We will use ps sub-command.

Save Container With A Name

We have found that our container id is a64bcb9cdc9a . So we will save this container with a new name like mykali by using commit sub-command.

Save Container With A Name

Save Container With A Name

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/install-kali-docker-image-linux/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)