March 8, 2015 – Virtualization and Sandboxing using VirtualBox

Sway link: https://sway.com/A2RBtP8hk0cax4FL

Remember those adventure games with “save game” before something dangerous (or dinnertime!) and “restore game”?

Virtual Machines and sandboxes give you that capability for entire computers or applications! As long as you “take a snapshot” after you have the basics set up, you may instantly revert a virtual machine back to a safe state!

Oracle VirtualBox Manager - Snapshots browser
Oracle VirtualBox Manager – Snapshots browser

In VirtualBox, the Snapshots button on the top right will let you take a snapshot at any time as well as instantly restore previous snapshots (demoed, and see videos at the bottom of this file if you wish a refresher).

Using a Virtual Machine is a great way to try something new. Not sure you would like Linux? Not sure you would like a particular flavor of Linux (Mint, KDE vs. Gnome)? Heard about FreeBSD and want to check it out? Windows 10 Technical Preview? Trying it as a virtual machine is low risk other than some of your time!

It is also a huge relief to be able to “restore game” (go back to a snapshot) when something bad happens, like the Ask Toolbar suddenly appearing, clicking the wrong link and ending up on an adult content site, or finding out that your favorite website was sending out malware through infected advertisements…

An aside about Hypervisors and emulators:

VirtualBox is a Hypervisor. A Hypervisor splits a physical machine into several virtual ones. It is different from an emulator, in that the Hypervisor will only run software compatible with the host processor. Hypervisors are generally far faster than emulators. It is possible to run emulators inside of a Hypervisor, though (emulating a DEC VAX OpenVMS system on a Linux virtual machine is very possible, for example).

VMware is arguably the market leader in the hypervisor space. Microsoft weighs in with Hyper-V, which is available as part of many Windows 7, 8, 10, and Windows Server products with a simple click and reboot. Xen and KVM are also popular Linux-based hypervisors.

Xen is behind Amazon Web Services (AWS), the largest cloud provider in the world.

Hyper-V is behind Microsoft Azure, another huge cloud provider. Amazingly enough, a demo last year showed Hyper-V running Linux faster than some of the native Linux solutions, even though the host was running Windows Server 2012 R2! The virtual machine/hypervisor product space can be strange.

Oracle’s VirtualBox is what we will look at today, though, as it is a well supported, reliable, and remarkably flexible solution.

Be careful about running these solutions in for-profit/commercial scenarios. Most of them, including VirtualBox, have limits where they become non-free. For home use and commercial evaluations, however, everything we will be discussing today is fine.

Requires setting up a “hypervisor” such as VirtualBox (demoed), VMware Player, Hyper-V, or others:

VirtualBox itself: http://www.virtualbox.org/

Pre-built Windows (10 technical preview, 8.1, 7) with Internet Explorer: https://www.modern.ie/en-us/virtualization-tools#downloads

Pre-built VirtualBox Linux Mint distribution that includes Firefox: https://virtualboximages.com/LinuxMint+17.1+KDE+64bit+VirtualBox+VDI+Virtual+Computer
(this is a quick way to set up a sandbox that is nimble – log into it once and set it up, then take a snapshot, and each time you use it, revert to the saved snapshot! See below for the “why” of going to all this trouble)

Chromium OS (Chromebook) builds for VirtualBox, Vmware, etc.: http://chromeos.hexxeh.net/ (older, more stable images) http://chromium.arnoldthebat.co.uk/index.php?dir=daily%2F (newer images, may require hunting to find a stable release, the Camd64OS .vdi versions are intended for VirtualBox)
Notes: When setting up the VirtualBox virtual machine, be sure to pick Linux 2.6 32 bit operating system type, set the memory to 512MB (the default is too small), and before starting, edit the virtual machine and click the Enable PAE/NX box under System -> Processor. Under System -> Basic, also check that the correct pointing device (mouse) has been chosen.

Kubuntu Installation media (this may also be used as a Live, instant boot, system under VirtualBox):

Other pre-built virtual machine images for VirtualBox:
(this is a great way to “try something new” without any risk, but watch out, some of these images are quite outdated – always look for ones that are less than 6 months old to avoid dangerous security vulnerabilities with the included software if going on The Internet)

General notes about using VirtualBox or another Hypervisor:

SNAPSHOT THIS!

When using a hypervisor, after getting the configuration you wish, SET A SNAPSHOT (in VirtualBox, the button is near the top right of the window) so that you may restore the virtual machine back to base line after use. Set a meaningful comment like “Safe Startup”. This lets you leverage the full power of virtualization: near instant recovery if something undesirable happens! Instantly wipes out any malware, spyware cookies, and such, but it will also wipe out any files you have saved! If there are materials you want to keep, save them to a USB key or shared folder first.

Note that Chromium and Chrome OS are firmly in the Google services space and require logging into a Google account for full usability. Personally I am fine with that as I have several friends that work for Google, and I am “OK” being one of their products as their free services are quite good in my opinion. If you are NOT comfortable with signing in with a Google Account, they will work using their guest mode, but you will have difficulty saving files. Using a regular Linux or Windows operating system gives you choice on what cloud ecosystem you wish to use, or using none at all.

Seeing VERR_LDR_MISMATCH_NATIVE errors when starting your VirtualBox virtual machines under Windows? You may need to add C:\Program Files\Oracle\VirtualBox to your anti-virus program exceptions. In my case I had to add it to MalwareBytes Anti-Malware’s Malware Exclusions section. If you have trouble finding this please let me know (please e-mail marraccini@acm.org) and I will help you.

Self-contained virtualization and sandbox software:

Sandboxie (easy to set up sandbox for Windows, shareware/”nagware” after 30 days, free version can keep a browser safe and automatically reset to a safe configuration each time you start it):

AMIDuOS (Android virtualization – WARNING – DuOS can potentially access all your documents, music, and videos on your host system but the defaults are pretty secure and only provide access to a new folder called DuOSShare under your account. Please be cautious if you change the default paths!), $9.95 after 30 days, seems better than BlueStacks to me): Great to run Android version of Facebook, basic web browsing, Android games, etc.

BlueStacks (Android virtualization – WARNING – the default configuration allows the Android client access to your PC’s documents! Turn off access to your local file system after installing, it does not appear possible to redirect to more limited folders!): Great to run Android version of Facebook, basic web browsing, Android games, etc. Free for personal use.

Walkthroughs on YouTube:

Installing a Linux distribution using VirtualBox:

Setting up Chrome OS on VirtualBox:

Application Virtualization – Containers!

Docker is all the rage for virtualizing individual applications, even very complex ones that involve database servers, front ends, and pre and post processing. It can turn up complex applications much faster than the solutions above, and it is taking the virtualization world by storm. More information at:

Should I be playing in the sandbox?​

Personally I think these solutions are not yet friendly enough for all users.

I still personally use Firefox with an ad-blocker plug-in on my Android smartphone, and I use it to visit sites I am not sure about on my regular computers. I have it set to wipe cookies when I quit Firefox.

I also have Lookout installed, but like all anti-malware programs out today, it is only going to catch malware that is widespread.

So far, no malware on my computers nor my phone.

​The tools, though, are getting better. VirtualBox itself has vastly improved over the past year, and tools like Sandboxie are working to make browser sandboxing easy even for novice users. Please give virtualization and browser sandboxing a try!

Leave a Comment