Virtual Machines Explained

TLDR;

Wikipedia defines Virtual Machines as: In computing, a virtual machine (VM) is an emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized hardware, software, or a combination. This post will be a Hello World for getting up and running with them.

  • Virtual Machines Explained
  • Images Explained
  • VMs and Linux
  • VMs and Mac
  • VMs and Windows

Virtual Machines Explained

A Virtual Machine, also referred to as VM, is simply a system known as the Guest running inside another system known as the Host with software holding the boundaries between the two. The system running inside the Virtual Machines is based on something called an Image and I’ll cover what that is in the next section. Virtual Machines are useful for a number of reasons from protecting your system from potentially harmful software to keeping a backup of a system ready for deployment at anytime. But for the purposes of this post and most of the site I’ll be using VMs for loading images to test hacking skills against.

What is an Image

The image is the everything when it comes to VMs. It holds the OS, applications, preexisting files, and anything else a normal system could have. Think of an image as a snapshot of a system. This could be used for handing out identical systems to multiple people and is a great way to learn since differences in configurations aren’t a factor. While you can make your own images that will be out of the scope of this post. But luckily you can pick up tons of images from VulnHub. For this post I’m going to get the Mr. Robot Image for no other reason then I’m a fan of the show. So go ahead pick one that you like or you can just follow the link I put for the Mr. Robot image. Then simply download the ova (this is the file type VMs use) and check that the hash matchs.

Virtual Machines for Linux

For linux we are going to go with virtual box as our VM software of choice. You can find the download link here. This is the hardest of installs for virtual box as the number of linux distros is pretty high. The following are the basics if you don’t see your flavor of linux here and/or the steps aren’t working for you please check out the download page of virtual box for more details.

Oracle Linux

Users of Oracle Linux 6 and 7 can use the Oracle Linux yum

yum install VirtualBox-6.1

Debian-based Linux distributions

Add the following line to your /etc/apt/sources.list. According to your distribution, replace ‘<mydist>’ with ‘eoan’, ‘bionic’, ‘xenial’, ‘buster’, ‘stretch’, or ‘jessie’ (older versions of VirtualBox supported different distributions):

deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian <mydist> contrib

Then to download:

sudo apt-get update
sudo apt-get install virtualbox-6.1

Once you’ve installed virtualbox just run it and its as simple as clicking the import selecting the image file you’ve downloaded

Virtual Machine for Windows

Once again going with virtualbox for this instance the process is more straight forward then with linux installation. Just download the exe file format from here go threw your normal next next finish clicking and once you’ve finished the installation you’re ready for importing the ova to get started.

Virtual Machine for Mac

If you’ve made it this far in the post what I’m going to say next is obvious. Download virtualbox for Mac on the download page.