Complete Host Environment Setup before proceeding.
Throughout this documentation, you will see two options:
- Pre-built Disks: Ready-to-use VM images with everything pre-configured and pre-installed.
- Fresh Installation: Manual setup process to create your own VM images.
The pre-built disks were created using the exact steps described in the manual installation sections.
So while we recommend using the pre-built disks, you can also create your own VMs by following the manual installation steps.
Choose Setup Method link
Download Images link
Download both QCOW2 images and place them in /var/lib/libvirt/images/
:
# After downloading
cd ~/Downloads
sudo mv {attacker.qcow2,victim.qcow2} /var/lib/libvirt/images/
What You Get:
- Attacker VM: Ubuntu + project files + dependencies installed (tbh it’s the same Ubuntu 20.04 LTS with kernel 5.4.0 from the victim because I’m lazy)
- Victim VM: Ubuntu 20.04 LTS with kernel 5.4.0 (Fresh install with only autologin user
victim
and password jules
)
Check VMs link
Launch VMs link
# run this command before running the vm
newgrp libvirt
# then this command to launch the vm
sudo ./scripts/run_vms.sh
If you prefer to build the disks yourself because you don’t trust me (which is fair tbh), follow these steps:
Download Ubuntu ISO link
Create Disks link
sudo qemu-img create -f qcow2 /var/lib/libvirt/images/attacker.qcow2 10G
sudo qemu-img create -f qcow2 /var/lib/libvirt/images/victim.qcow2 10G
Install Ubuntu (Attacker) link
sudo qemu-system-x86_64 \
-enable-kvm -machine accel=kvm -cpu host \
-m 4096 -smp 4 \
-name attacker-install \
-drive file=/var/lib/libvirt/images/attacker.qcow2,format=qcow2,if=virtio,cache=writeback \
-cdrom vm/ubuntu-20.04-desktop-amd64.iso -boot once=d \
-netdev user,id=net0 -device virtio-net-pci,netdev=net0 \
-graphics vnc
Install Ubuntu (Victim) link
sudo qemu-system-x86_64 \
-enable-kvm -machine accel=kvm -cpu host \
-m 4096 -smp 4 \
-name victim-install \
-drive file=/var/lib/libvirt/images/victim.qcow2,format=qcow2,if=virtio,cache=writeback \
-cdrom vm/ubuntu-20.04-desktop-amd64.iso -boot once=d \
-netdev user,id=net0 -device virtio-net-pci,netdev=net0 \
-graphics vnc
Setup: Create user attacker
/victim
with password jules
for consistency.
Verification link
./scripts/check_vms.sh # Verify disks and files
Launch VMs link
Next Steps link
Configure individual VMs: