Showing posts with label Kali-Linux. Show all posts
Showing posts with label Kali-Linux. Show all posts

Saturday, March 6, 2021

Kali-Linux on Chromebook / Crostini (LXC/LXD linux container)

Intro

let me first state that this is not the normal intended use of containers.
In the normal use case containers are supposed to be ephemeral.
However, in this specific use case I want to use it as a light-weight virtual machine, and therefore I do want to keep it's state at all times. 
---


Objective: 

  1. Running a Kali-Linux docker-container inside the Crostini LXC/LXD- Debian-container on a Chromebook. 
  2. Keeping an up-to-date Kali-Linux image with any updates, pen-test-data, and changes made inside the active kali-Linux container so it is easy to create new and/or transport containers with all the latest changes and data. (back-up image with the current state of the current container)

Assumptions:

The Linux-container is active on your Chromebook

 

Linux-Terminal @ Chromebook


Setup Docker:

  1. Update your Debian LXC/LXD container:

    sudo apt update && upgrade -y

  2. Install dependencies:

    sudo apt install -y \
    apt-transport-https ca-certificates \
    curl gnupg2 software-properties-common


  3. Import gpg-key:

    curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

    (note: don't forget the "-" at the end of the line!)

  4. Add the docker repo to the source list:

    sudo add-apt-repository \
    "deb [arch=amd64] https://download.docker.com/linux/debian \
    $(lsb_release -cs) stable"

  5. Update the new resources:

    sudo apt update

  6. Install the docker engine (community edition):

    sudo apt install -y docker-ce docker-ce-cli containerd.io