VirtualBox Installation – Windows Host with a BackTrack 4 Guest and VirtualBox Linux Guest Additions
In this tutorial I shall be installing BackTrack 4 as a guest in my Windows XP host.
Background: Backtrack is a great hacking platform with pre-installed network security tools. It was originally designed to be used as a live-cd, but the latest version allows for an easy hard drive install. Later tutorials will explain how to get BackTrack talking to other virtual machines. One could thus set up a nice hacking testbed to further your own understanding of network security.
One word of warning though: If the aim of your BackTrack installation is to learn more about Wi-Fi hacking, I’d advise you to use a live-cd or install it to a computer. It is possible to run a wi-fi usb stick through the virtual machine, but its not just plug and play. VirtualBox does have USB issues and you are going to find it difficult to get everything working as it should. Chances are if you’re reading this tutorial it’s probably a bit over your head to attempt that right now. My advice is to get used to the system and then go for it at a later stage.
Notes on the tutorial:
When you are required to type in a command, it will be presented by firstly showing the command prompt and then whatever should be typed, eg
root@bt:# clear
This means that “clear” should be typed in (without the quotation marks).
Also note that Linux is case sensitive, thus “clear” does not equal “Clear”.
1. Download Backrack 4 from http://www.backtrack-linux.org/
In this example I downloaded the following file: bt4-final.iso
2. Download the latest VirtualBox application from http://www.virtualbox.org
In my example I have downloaded VirtualBox 3.1.2
3. Install VirtualBox.
During the installation you should elect to have all components installed.
During the installation you will get the following error message several times:
The software you are installing has not passed Windows Logo testing to verify its compatibility with Windows XP…
Click the ‘Continue Anyway’ button to proceed. Just so you know, what your installing are virtual network devices which enables your virtual machines to communicate with the host machine, other virtual machines, the internet, etc.
4. Set up your the Backtrack Virtual Machine
Start VirtualBox.
Type in a name for your virtual machine, in this example I’ve used “Backtrack 4”. Under the Operating System drop-down box select “Linux” and under Version select “Other Linux” (as indicated below). Click Next.
Next you have to select the amount of memory you wish your virtual machine to have. I would personally also not use more than half of your system memory. In this example I’ve used 512MB of memory as experience has shown that this is more than enough. Click Next.
Select “Create new hard disk” and then click Next.
This brings us to the “Create New Virtual Disk” window. Click Next.
You now have the option of using either selecting “Dynamically expanding storage” or “Fixed-size storage”. The difference between the two options is explained within the window. In this example, as my disk space is limited, I’ve selected “Dynamically expanding storage”. Click Next.
You now have the option to change the default location of where the hard disk of the virtual machine will be stored. Change the location if you need to. You also have the option of changing the maximum size of your hard drive. Unless you know for a fact that you’ll be placing large files in your virtual machine, don’t bother making the hard drive larger. In my example I’ve left it as 8 GB. Click Next.
Click Finish.
Click Finish again.
5. Prepping you virtual machine for the Backtrack installation
Make sure the ‘Backtrack 4’ virtual machine is selected and click
.
This brings up the Settings window. In the left navigation pane select ‘Storage’.
In the ‘Storage Tree’ box click on the logo of a CD. Its label should read ‘Empty’. This will change the ‘Attributes’ section on the right hand side of the window as indicated below:
In the ‘Attributes’ section, click the following icon: ![]()
This will open the ‘Virtual Media Manager’ window.
Click the ‘Add’ button and navigate to the your Backtrack ISO file downloaded in step 1 (the bt4-final.iso file in my case). Select the ISO file and click ‘Open’. This will take you back to the ‘Virtual Media Manager’ window. Make sure the correct ISO is highlighted and click ‘Select’.
This will take you back to the ‘Settings’ window. Click OK
6. Installing the Backtrack 4 operating system
(Before you start you should know that virtual machines capture your mouse movements and keyboard strokes after you click on them and to release them you need to press right Ctrl)
Make sure your Backtrack 4 virtual machine is highlighted and click on Start.
This will spawn the virtual machine and should load the Backtrack boot menu. Depending on your screen resolution you may either select “Start BackTrack FrameBuffer (1024×768)” or “Start BackTrack FrameBuffer (800×600)”. In my example I’ve selected the 1024×768 resolution. Select your option and press Enter.
Backtrack is now booting up. At the end of the process you’ll be presented with the command prompt – root@bt:#
root@bt:# startx
This should open up KDE, the Backtrack graphical front-end.
In the top left hand corner of the desktop is a file called “install.sh” script. Click on this icon. This will start the Backtrack 4 installation.
Select your time zone and click Forward.
Select your keyboard type. In my example its just the standard USA keyboard. Click Forward.
You should now be at the “Prepare disk space” screen. Make sure “Guided – use entire disk” is selected. Click Forward.
You should now be at the “Ready to install” screen. Click Install.
(Just a quick note: There are actually 7 steps in the install screen, but if you follow the above guide, you should automatically skip several of them).
Now wait. It takes quite a while to install. It took about 20 minutes on my system.
After the installation you’ll be presented with a message that states that the installation is complete. Click ‘Restart Now’.
You’ll be taken back to the command prompt and the following message will be displayed: “Please remove the disc and close the tray (if any) then press ENTER:” (as shown below).
At this point you need to unmount your loaded ISO. You do this by pressing right Ctrl (to release your mouse from the virtual machine). Then click on Devices –> CD/DVD Devices –> Unmount CD/DVD Device as indicated below. You might get an error message that says that the image could not be unmounted. Just click ‘Force Unmount’ if the error appears.
After you have unmounted the disc, click on the virtual machine screen (to recapture your mouse and keyboard) and press Enter. This will restart you machine.
After booting up, you’ll be presented with the login prompt.
The default login details for Backtrack 4 after a clean install are as follow:
login: root
password: toor
Note: if you want to shut down the virtual machine at this point and continue the tutorial later, type in the following after logging in:
root@bt:# shutdown –P –q now
7. Installing the VirtualBox Linux Additions
After booting up and logging in press right Ctrl to release your mouse and click Devices –> Install Guest additions.
Click on the virtual machine (to re-capture mouse and keyboard) and type in the following:
| root@bt:# cd / | This changes the path to the root directory. |
| root@bt:# mkdir /mnt/cdrom | This creates a directory under the ‘mnt’ directory. |
| root@bt:# mount /dev/hdc /mnt/cdrom | This mounts the VirtualBox additions disk to the newly created directory. |
| root@bt:# cd /mnt/cdrom | This changes the path to the mounted CD. |
| root@bt:# ls | This lists the contents of a directory. |
| root@bt:# ./VBoxLinuxAdditions-x86.run | Note the “./” at the beginning of the command. This tells Linux that you want it to to run a script. |
If all went well, your terminal should look like the one below:
Lastly enter the following command to shut down your virtual machine:
root@bt:# shutdown –P –q now
That’s it! You’ve successfully installed a Backtrack 4 virtual machine with the VirtualBox additions. When you boot up your virtual machine and log onto KDE your mouse and keyboard will automatically be captured and released and you can resize your window to suit your needs. If you want to run it in fullscreen mode, just press right Ctrl+F.
Dude.. Great article… I mean I have everything up and running.. Just couldnt get the vbox additions installed.
TY (Y)
Wonderful article! Me too, I was unable to install the Guest Additions. Your article helped out perfectly!
TY
Thank you for the guest additions part. I was looking everywhere to find out how do I configure the resolution as I need, and it works perfectly.
Great Post, thanks. Just what I was looking for
Thanks, helped me alot! Was struggeling with the vboxaddons
Check what device is your cd-rom
type dmesg in terminal
and replace
root@bt:# mount /dev/hdc /mnt/cdrom
with
root@bt:# mount /dev/”Your device maybe hdd or other” /mnt/cdrom
Excellent all the time i wasted on video tutorials with crap music. Thankyou for such simple step by step instructions. Much appreciated.
thanks a lot
you are the man
sir yr tutorial is very nice. I m new in this field i have windos xp n backtrack3 cd so i want to know before installing vb i have to download bt3.in xp.
Storege cd\dvd keep empty
thanks
Hey! I just installed Vbox with Windows 7 as Host and Backtrack 4 as guest but I have no internet on Backtrack, I don’t know how to solve it!
Amazing Article
Thanks In Advance
Awesome!
Thanks a huge lot for the help with the guest additions install.
Hello I have problem with R2 of Backtrack, can’t install guestadditions. Any help?
Thanks for this article! It is been a great help for me while trying to install the guest additions.
Dude you suck. This didn’t help at all.
Just kidding, thanks man.
Very nice post, helped me a lot.
“Guest addition”. I installed mine. I thought this will fix the wifi drive issue. So, what it is for?
Thanks I was struggling with bt4install.pdf which manually mounted partitions copied the cd with preserved rights etcetera. Verry interesting and high educational value on that tutorial by the way. But was not really working for me. This one is just a few clicks away and running smooth for me.
Now for the integration of Xplico and Samurai into a home brew BT4
Thank you very much, I’ve installed Guest Additions succesfully in a Backtrack 4r2
Thanks man, helped me a lot.
Was trying to install BT for over 2 months and found that tuto. Great job, worked all out with VB 4.0.2. However don’t use BT R2.
Best tutorial i’ve ever seen, hats off and lots of thanks!
Sorry to bother you but in the last step it says, “./VBoxLinuxAdditions-x86.run: No such file or directory.”
Please help, I need Shared Folders. And I read that we need Guest Additions for that.
Is there any other way to share files between the host and the guest?
My host – Windows XP
My guest – Backtrack 4 beta
Thanks!
I had the same problem. If you look at the results of the ls command in the cdrom directory you will notice different OS packages and it looks like he mixed 2 of the file names. He has the “-x86″ from the end of the VBoxWindowsAdditions-x86.exe executable. I’m no expert but I *think* it’s supposed to be ./VBoxLinuxAdditions.run NOT ./VBoxLinuxAdditions-x86.run as is written above. Take my advice at your own risk but it seems to have worked for me! =p
Very nice tutorial btw. Thank you.
I’m install Linux Backtrack 4 R2.. I got problem during first login. I can enter the login name “root” but can’t enter the password “toor”. It didn’t appear on it. Can u help me out? thanks.
ok. My problem solve already.
hello thanks for the articel it was cool but here is wat i got when i was in the terminal
root@bt:/# mount /dev/hdc/mnt/cdrom
mount: can`t find /dev/hdc/mnt/cdrom in /etc/fstab or /etc/mtab
can you help me plize
I’ve done this had no problem it claim to install it went through the whole process but everytime i reboot i can’t fullscreen it nor can i copy and paste text from host to vm no clue what im doing wrong because all the commands did work fine
it even shows me that its loading the guest additions before im able to login
“root@bt:# mount /dev/hdc /mnt/cdrom” this part has been driving me crazy.
I did the “dmesg” as recommended by Ziki but the only thing I saw (granted, I didn’t know what I was looking for) was hda1.
So this is where I stand now…http://i.imgur.com/iJCw8.jpg
Can you guide me through this last step?
Using VB 4.0.6 and BT4 R2