Created on Tue. 11 Aug 2020
In this post I will do a simple tutorial explaining on how to build a testing environment inside of Virtual Box to debug unknown binaries and test out some shady stuff that you wouldn't do on your physical machine!
For this tutorial you will need a few dependencies before you get started:
This part is very straight forward you first need to install the operating system, if you don't know how to do this bit just search on google how to install Ubuntu on Virtual Box:
After restarting your machine you should run those command for good practice:
$ sudo apt update $ sudo apt upgrade
After you ran those two command you need to install a few things so that you can share files from the host to the client (host: your physical computer, client: the virtual machine). The objective is giving read access to a folder on your host to the client so that you can work dynamically.
$ sudo usermod -a -G vboxsf `whoami` $ sudo apt install virtualbox-guest-utils virtualbox-guest-dkms
After installing those dependencies you need to mount an installation drive on the machine go in the top menu of the Window and click on
Devices > Insert Guest Additions CD Image
After that installation you need to add the shared folder:
Devices > Shared Folders > Shared Folders Settings
I recommend giving read only file access and automatically mounting it.
After that just reboot the system, you just completed the hardest part, well done!! To make things a bit more easy for you, you might want to change the permissions on the mounted drive so that your current user can copy files from it using:
sudo chown -R $(whoami):users /media/
You can just stop there if you are done but me personally there are a few packages I would recommend installing. I will provide a script at the bottom of this post so that you can take inspiration from it :)
Thank you for reading if you have any questions or feedback just contact me on twitter :)