This is an ansible playbook to set-up and configure a kali machine designed for CTF's like Hack the Box and Try Hack Me.
This is heavily based on Ippsec's Parrot build, but tailored for Kali with a handful of other useful tools thrown in for good measure.
Instructions for installation:
- Grab the pre-built VM image.
- Log in as kali:kali
- Change root password
sudo su -
passwd root
reboot
- Upon restart, login as root to change kali username
userdel -r olduser
groupdel groupname
adduser newuser
groupadd newgroup
usermod -aG adm,dialout,cdrom,floppy,sudo,audio,dip,video,plugdev,users,netdev,bluetooth,scanner,wireshark,kaboxer newuser
reboot
- Upon restart, login with new user and pass
- Update and upgrade
sudo apt update
sudo apt full-upgrade
- Install dependencies and configure git (see below)
python3 -m pip install ansible
sudo apt install ansible-core
cd ~
git clone git@github.com:jecpr/kali-build.git
- Run Ansible script - note you can leave the
extra-vars
part out if you don't have or use ngrok.
ansible-galaxy install -r requirements.yml
sudo whoami
ansible-playbook main.yml --extra-vars "ngrok_authtoken=INSERT_TOKEN_HERE"
- Restart
- I use syncthing to synchronise obsidian. If you want to use it, go to syncthing at 127.0.0.1:8384, make bookmark and configure.
- Configure foxy-proxy (the burp cert is already there).
- Enjoy :)