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
- Download and install foxyproxy
- Click on the foxyproxy icon, click Options
- Click Add
- Specify Burp Suite for the Title
- Specify localhost for the DNS name
- Specify 8080 for the port
- Click Save
Install Burp cert
- Run burpsuite
- Select the Burp Suite profile we created in FoxyProxy previously
- Navigate to localhost:8080
- Click CA Certificate
- Click Save File
- Click the icon with the three lines in firefox (found the the upper right-hand side of the window)
- Click Preferences
- Search for certificate
- Click View Certificates…
- Click Import
- Select cacert.der in the Downloads folder, click OK
- Check the box next to Trust this CA to identify websites, click OK
Test it:
- Click the FoxyProxy icon and Select Use proxy Burp Suite for all URLs
- Turn intercept on
- 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:
- https://forums.kali.org/showthread.php?38858-apt-get-update-GPG-error-key-expired
- https://community.spiceworks.com/topic/2110904-kali-linux-expired-signature
Configure Firefox for Web App Testing
This also makes your web browser especially insecure, so don’t do anything important with it.
- Browse to
about:config
- Type in security.file
- Double click
security.fileuri.strict_origin_policy
This will disable the same origin policy blocks.
- Browse to
about:config
- Type in security.file
- Double click
security.insecure_field_warning.contextual.enabled
This will disable the “this connection is not secure” messages.
- Browse to
about:config
- Type in mixed
- 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