Proxy Configuration

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

http_proxy=www.proxy.com:80
https_proxy=www.proxy.com:80
no_proxy=.proxy.com,localhost,127.0.0.1

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 : reboot

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-*
reboot

Take a snapshot.

Resources: https://www.ceos3c.com/hacking/install-kali-linux-virtualbox-guest-additions-june-2017-edition/ https://docs.kali.org/general-use/kali-linux-virtual-box-guest https://www.youtube.com/watch?v=lvY-Qn54W98

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
sudo apt update
sudo 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:

[Service]
Environment="HTTP_PROXY=http://www.proxy.com:80/"

Restart the server : reboot

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/install_ansible.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

Enable SSH

In /etc/ssh/sshd_config change PermitRootLogin without-password to PermitRootLogin yes Resource: https://www.drchaos.com/enable-ssh-on-kali-linux-enable-ssh-on-kali-linux/

Command line vnc viewer

vncviewer [target]::[vnc port]

Fix Java for Burpsuite

Burp does not presently (8/3/2018 is when I’m writing this) support Java 10, which is the default java on Kali at this point in time. To fix this, simply run update-alternatives --config java and then select the number that corresponds to /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java from the menu.

Fix kali apt update issue

If apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys 7D8D0BF6 isn’t doing it, try wget -q -O - https://archive.kali.org/archive-key.asc | apt-key add

Resources:

Configure Firefox for Web App Testing

This also makes your web browser especially insecure, so don’t do anything important with it.

  1. Browse to about:config
  2. Type in security.file
  3. Double click security.fileuri.strict_origin_policy

This will disable the same origin policy blocks.

  1. Browse to about:config
  2. Type in security.file
  3. Double click security.insecure_field_warning.contextual.enabled

This will disable the “this connection is not secure” messages.

  1. Browse to about:config
  2. Type in mixed
  3. Double click security.mixed_content.block_active_content

This will disable the block active content lock.

Fix hash mismatch issue

Try another mirror from the official mirror list.

Replace the existing entry in /etc/apt/sources.list with this: deb http://mirrors.ocf.berkeley.edu/kali kali-rolling main non-free contrib

Resource: https://unix.stackexchange.com/questions/382617/kali-linux-apt-get-update-returns-hash-sum-mismatch-error