Creating a Virtual Machine

Doing CTF or Red Team work on your personal machine is like staring into the sun. You might get away with it for a second but you're going to regret it.

During a CTF you will be downloading untrusted tools and connecting to potentially risky networks. A virtual machine isolates your system and adds a critical layer of protection. It also makes cleaning up after a breeze.

Virtual Box

To run a virtual machine, you'll need a hypervisor. A hypervisor is software that emulates hardware, allowing you to run separate operating systems isolated from your main system.

You can use other solutions, but this is a dependable starting point.

Guided Tour

If you've never done this before, follow along with this video for your first time.

Thanks Chad!

Next Time

If this isn't your first time running a VM, consider using Debian as the guest OS.

Debian

Debian is a free, open-source Linux distribution known for its stability, simplicity, and huge package repository.

Debian is the foundation for a lot of other distributions you might have used, like Ubuntu and Kali, but without all the extra layers. Debian focuses on clean installs, minimal defaults, and giving you full control over how your system is built and maintained.

Download

Why not Kali?

Debian is a strong choice because it’s stable, production-ready, and encourages you to learn the way Linux actually works.

You’ll need to install tools like msfconsole, impacket, and chisel yourself. It's a small barrier that teaches you where things come from, how to get the latest versions, and how to set up any machine for real work.

You don’t need an all-in-one distro loaded with junk and overly configured.

Install

When in doubt, stick to the default options as you move through the installer menus. Debian’s defaults are safe, clean, and exactly what you want for a first build.

If you choose to install a desktop environment:

  • XFCE — lightweight, fast, and a good choice for VMs.
  • GNOME — the default, polished and a bit heavy.
  • KDE Plasma — sleek and customizable, but heavier on resources.
  • Cinnamon — simple, modern, easy to use.

If you don't pick any desktop environment, Debian will without one.

Guest Additions

In the VirtualBox menu of the running VM, select the "Devices" dropdown and select: Insert Guest Additional CD Image. You'll probably want to turn on a shared clipboard while you're in there.

Then, in a terminal of the Debian machine:

# become root
su -

# You may need to mount the disk image, run this
mount /media/cdrom

# AMD 64 processor?
sh /media/cdrom0/VBoxLinuxAdditions-amd64.run
# ARM 64 processor? (M series Macs)
sh /media/cdrom0/VBoxLinuxAdditions-arm64.run

## Restart the VM
reboot

After this your clipboard integration should work, and hopefully the resolution will automatically resize to the window.