Primary Resources

Monash students/staff can access our list of resources.

Access our workshop CTF scoreboard.

Missed a workshop? Recordings are on our YouTube channel!

Kali Linux Set-up

1 Hypervisor

  • Download a hypervisor (virtual machine manager) either via the official website or via your preferred package manager.

From here, you can set-up you Kali Linux virtual machine (VM) either manually with Kali’s pre-built images, or automatically with Windows Subsystem for Linux or Vagrant.

2 VM Set-up

Option 1: Manually

  1. Download your Kali Linux installer:
  2. Follow Kali’s documentation for you hypervisor:

Option 2: Windows Subsystem for Linux

Please make sure to review the following configuration before proceeding.

According to Microsoft’s documentation regarding Windows Subsystem for Linux (WSL) set-up:

  1. Install WSL by running wsl --install in an administrator command-line shell.
  2. Restart your machine.
  3. Install Kali’s WSL distribution by running wsl --install -d kali-linux in a command-line shell.
  4. Open the Kali app from the Start menu, and follow Microsoft’s best practices for setting-up your Kali user account.

Option 3: Vagrant

Please make sure to review the following configuration before proceeding.

  1. Download Vagrant either via their website or via your preferred package manager.
  2. Create a new file, named Vagrantfile in your current directory, with the following configuration:
    • Preferred hypervisor provider (virtualbox or vmware_desktop)
    • Allocated memory
    • Allocated threads
    • Optional: Launch with graphical interface (true or false)
    • Optional: VM name
    • Synced folder between host machine and guest machine
  3. Run vagrant plugin install vagrant-vbguest in your command-line in order to download the plugin that makes sure that VirtualBox Guest Additions is installed on the guest machine.
    • Note: This command will fail to complete if you run it on an Arch-based distribution of Linux. In this case, the Vagrantfile example below uses a password-based authentication instead of the key-based authentication in order to complete the VM set-up. For further information, refer to the Vagrant SSH configuration documentation.
  4. Run vagrant up in your command-line (at the same directory as your Vagrantfile) in order to start the VM.
    • You can follow Kali’s guide on setting-up a Vagrantfile.
    • At this stage you can wait for the VM to boot and interact with it graphically when it is ready.
  5. You can shut-down your VM either graphically, or by running vagrant halt at the same directory as your Vagrantfile.
  6. Run vagrant ssh in your command-line (at the same directory as your Vagrantfile), in order to start an command-line session. This is a great option if your host machine does not have lots of resources for a graphical session, or if you like working with the integrated terminal of your preferred IDE.
  • Example Vagrantfile:
    • VirtualBox hypervisor
    • 2 GiB of memory
    • 2 CPU threads
    • Vagrantfile’s directory on the host is synced to /home/vagrant/Documents/CTFs on the guest machine.
Vagrant.configure("2") do |config|
	if Vagrant.has_plugin?("vagrant-vbguest")
		config.ssh.insert_key = false
		config.ssh.forward_agent = true
	else
		config.ssh.username = "vagrant"
		config.ssh.password = "vagrant"
	end
	config.vm.provider "virtualbox" do |virtualbox|
		virtualbox.memory = 2048
		virtualbox.cpus = 2
		virtualbox.gui = true
		virtualbox.name = "Kali"
	end
	config.vm.box = "kalilinux/rolling"
	# creating a synced folder from current directory on host to /home/vagrant/Documents/CTFs on guest
	config.vm.synced_folder ".", "/home/vagrant/Documents/CTFs", create: true
end

3 Alternative Kali Mirrors

Please make sure to review the following configuration before proceeding.

It might be the case that the Administrator of your currently-used network intentionally blocked the https://kali.download and https://kali.org websites from being accessed. This means that Kali’s apt package manager is rendered unusable by default. In this case, in order to download additional packages, you have to change to default mirror to a different one.

Notable Kali mirrors include:

3.1 Manually

Run the following script from your Kali command-line session, with the alternative mirrors of your choosing:

sudo sed -i 's$http://http.kali.org/kali$https://mirrors.ocf.berkeley.edu/kali/$' /etc/apt/sources.list
sudo apt update

Optional: Automatically

Please make sure to review the following configuration before proceeding.

Add the following configuration to your Vagrantfile, with the alternative mirrors of your choosing:

config.vm.provision "shell", inline: <<-SCRIPT
	cp -f /etc/apt/sources.list{,.bkup}
	cp -f /etc/apt/sources.list /tmp
	sed -i 's$http://http.kali.org/kali$https://mirrors.ocf.berkeley.edu/kali/$' /tmp/sources.list
	cat /tmp/sources.list > /etc/apt/sources.list
	sudo apt update
SCRIPT

4 Additional Software

apt

sudo apt install ghidra docker.io python3-pycryptodome ropper python3-ropgadget

pip

pip install pwntools pwndbg

apt Troubleshooting

  • If sudo apt upgrade fails, try running sudo apt full-upgrade.