Kali Config

This encompasses the various things I do whenever I'm setting up a new Kali VM in Virtualbox.

Proxy Configuration

Configure proxy (if applicable) by inputting the required values into /etc/environment. It will probably look something like this:


Resource: https://askubuntu.com/questions/175172/how-do-i-configure-proxies-without-gui

Config apt with proxy (if applicable):
touch /etc/apt/apt.conf.d/95proxies

Input the required values into this file. It will probably look something like this:

Acquire::http::proxy "http://www.proxy.com:80";
Acquire::https::proxy "http://www.proxy.com:80";
Acquire::ftp::proxy "http://www.proxy.com:80";

Restart the server :

Welcome back, your proxy should be working now. Celebrate by taking a snapshot.

Install all of the updates

This will get you the latest and greatest:

apt update
apt upgrade -y
apt dist-upgrade -y

Install the VirtualBox Guest Additions:

apt update
apt install -y virtualbox-guest-x11

Install the linux headers:

uname -r
apt install -y linux-headers-*

Take a snapshot.


Install docker

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
echo 'deb https://download.docker.com/linux/debian stretch stable' > /etc/apt/sources.list.d/docker.list
apt update
apt install -y docker-ce

Start docker automatically upon reboot:

systemctl enable docker

Resource: https://medium.com/@airman604/installing-docker-in-kali-linux-2017-1-fbaa4d1447fe

Configure docker with proxy

mkdir /etc/systemd/system/docker.service.d
touch /etc/systemd/system/docker.service.d/http-proxy.conf

Setup docker with the proxy by inputting the required values into /etc/systemd/system/docker.service.d/http-proxy.conf. It will probably look something like this:


Restart the server :

Take a snapshot.

At this point, if you need to install any certs in your browser or configure your browser to work with your proxy, follow the instructions provided by your corporate IT provider.

Install firefox addons that you need like foxyproxy.

Configure foxyproxy with Burp

  1. Download and install foxyproxy
  2. Click on the foxyproxy icon, click Options
  3. Click Add
  4. Specify Burp Suite for the Title
  5. Specify localhost for the DNS name
  6. Specify 8080 for the port
  7. Click Save

Install Burp cert

  1. Run burpsuite
  2. Select the Burp Suite profile we created in FoxyProxy previously
  3. Navigate to localhost:8080
  4. Click CA Certificate
  5. Click Save File
  6. Click the icon with the three lines in firefox (found the the upper right-hand side of the window)
  7. Click Preferences
  8. Search for certificate
  9. Click View Certificates...
  10. Click Import
  11. Select cacert.der in the Downloads folder, click OK
  12. Check the box next to Trust this CA to identify websites, click OK

Test it:

  1. Click the FoxyProxy icon and Select Use proxy Burp Suite for all URLs
  2. Turn intercept on
  3. Navigate to https://www.google.com/ and observe that we're able to intercept and modify the requests

At this point, you should be good to go.

Install Ansible

bash -c "$(wget https://raw.githubusercontent.com/l50/bash-scripts/master/installAnsible.sh -O -)"

Fix for invalid signature on update

This means you haven't updated for a while, and that's very bad. You should really be updating. However, if you run apt update and get an invalid signature error, run this command: wget -q -O - https://archive.kali.org/archive-key.asc | apt-key add