Spinning Up Your First Virtual Machine

Virtual machines, emulations of computers, are an amazing learning tool. If you have a single computer and want to learn about computer networking, web application pen-testing, or try a new Linux distro, virtual machines are your very best friend. By setting up one or more servers as virtual machines you can experiment with quite a bit!

All you need is a hypervisor, a program to run the virtual machines, and installation media for your virtual machine.

The two main options you’ll hear a lot about are the lovely open source Oracle Box [https://www.virtualbox.org/] and VMWare. You can get VMWare Workstation Player for free (Windows), or get a trial of VMWare Fusion (Mac) or VMWare Workstation Pro (Windows). But Orcale Box is free, and can run on any OS.

Let’s say you install Oracle box on your personal computer. Now you need installation media to install the operating system. This is pretty similar to installing an operating system on a ‘real’ computer. There are a lot of options as far as that goes. For example:

  • Kali Linux : Built with the security pro/nerd in mind, Kali comes with a ton of tools like Burpsuite already installed.   https://www.kali.org/downloads/
  • FreeBSD : University of California Berkeley Unix https://www.freebsd.org/where.html
  • Free BSD also provides an open source firewall called pfsense
  • Ubuntu: A noob friendly Linux distro https://www.ubuntu.com/download

Of course, you’re welcome to pay for Windows too…

Once you have your system image (your copy of the OS) you can install it on a virtual machine quite easily. Below I’ve included a guide for Oracle Box.

1. Open up virtual box and, naturally, click “New” to begin setting up a virtual machine. After clicking 'New' button, you can enter the new virtual machine name, type of operating system and OS version. Memory size and whether the hard disk should be created now, later, or whether to use an existing virtual hard disk.

Give it a snazzy name, and make sure to set ‘type’ and ‘version’ appropriately.

Screen Shot 2018-10-31 at 3.05.58 AM

2. Determine how much memory to allocate to the VM. This will depend on your hardware specs, OS requirements, and how many virtual machines you want to be able to run on your hardware in the first place.

Screen Shot 2018-10-31 at 3.11.33 AM

Guided Mode isn’t that different than ‘Expert Mode’ by the way. It gives more detail about the options, and makes suggestions for the values, but provides the same options in reality. 

Screen Shot 2018-10-31 at 3.14.15 AM.png

3) If you’ve selected ‘create virtual hard disk now’ , and if this is your first vm you’ll need to, then you’ll be confronted with the following:

Screen Shot 2018-10-31 at 3.16.21 AM

It’s worth noting that you may find you have difficulty exporting the VM from Oracle Box either way. Your mileage will vary but there always seems to be some sort of hiccup in my experience. If you think you might want to try VMWare later, you can create it as a VMDK which is compatible with both programs.

The allocation on your local disk is pretty self-explanatory since Oracle gave such a thorough description. I prefer dynamic allocation to save space on my hard drive until I need it, but it’s up to you. Just make sure wherever you create the file, you don’t tamper with it later.

Screen Shot 2018-10-31 at 3.20.18 AM.png

Simply give that file a recognizable name and choose its size.

Screen Shot 2018-10-31 at 3.23.32 AM

From here, it’s more or less dependent on which OS you are installing and what virtualized hardware you’ll want.

For example, you can alter the virtual machine settings to add an optical drive (think CD player), which you can load a .iso file into. ISO is often used for operating system images or other archives.

I’m not sure how helpful this is or not, but if you have questions about basic set up let me know in comments. At some point, I’ll get started on an article to follow this one to explain various settings or options in depth, that may be confusing the first time you see them. My real agenda is to provide instructions on hosting a website from your virtual machine, in order to introduce tools like Burpsuite or OWASP’s testing tools.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s