Home > Linux > VirtualBox Installation – Windows Host with a BackTrack 4 Guest and VirtualBox Linux Guest Additions

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.

Click image and then click Next.

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 image .

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:  image

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.

Unmount disc after installation

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.

About these ads
  1. De3ter
    31 March 2010 at 21:06

    Dude.. Great article… I mean I have everything up and running.. Just couldnt get the vbox additions installed.

    TY (Y)

  2. Cooler
    14 April 2010 at 17:50

    Wonderful article! Me too, I was unable to install the Guest Additions. Your article helped out perfectly!


  3. J
    2 May 2010 at 12:20

    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.

  4. Sea
    19 May 2010 at 22:22

    Great Post, thanks. Just what I was looking for :)

  5. bt
    26 May 2010 at 13:26

    Thanks, helped me alot! Was struggeling with the vboxaddons

  6. Ziki
    2 June 2010 at 08:15

    Check what device is your cd-rom
    type dmesg in terminal
    and replace
    root@bt:# mount /dev/hdc /mnt/cdrom
    root@bt:# mount /dev/”Your device maybe hdd or other” /mnt/cdrom

  7. WAX
    28 August 2010 at 13:49

    Excellent all the time i wasted on video tutorials with crap music. Thankyou for such simple step by step instructions. Much appreciated.

  8. mazen
    11 September 2010 at 03:28

    thanks a lot
    you are the man

  9. yusmusuf
    15 September 2010 at 07:25

    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

  10. Keliath
    6 October 2010 at 00:57

    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!

  11. 23 October 2010 at 18:45

    Amazing Article

    Thanks In Advance

  12. Rebelike
    13 November 2010 at 22:48

    Thanks a huge lot for the help with the guest additions install.

  13. Nem
    26 November 2010 at 13:32

    Hello I have problem with R2 of Backtrack, can’t install guestadditions. Any help?

  14. Makke
    29 November 2010 at 09:26

    Thanks for this article! It is been a great help for me while trying to install the guest additions.

  15. mikeyoung
    14 December 2010 at 18:42

    Dude you suck. This didn’t help at all.

    Just kidding, thanks man.

  16. 18 December 2010 at 17:38

    Very nice post, helped me a lot.

  17. iGUEVAC
    19 December 2010 at 16:50

    “Guest addition”. I installed mine. I thought this will fix the wifi drive issue. So, what it is for?

  18. roelsieg
    22 December 2010 at 16:25

    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

  19. Lu Simpsone
    7 January 2011 at 03:03

    Thank you very much, I’ve installed Guest Additions succesfully in a Backtrack 4r2

  20. Silencer
    11 January 2011 at 06:02

    Thanks man, helped me a lot.

  21. ompblus
    30 January 2011 at 22:00

    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.

  22. Sam
    17 February 2011 at 21:08

    Best tutorial i’ve ever seen, hats off and lots of thanks!

  23. Ashirwad
    6 March 2011 at 11:13

    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


    • 26 April 2011 at 03:52

      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.

  24. Joseph
    6 March 2011 at 14:10

    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.

  25. Joseph
    6 March 2011 at 15:13

    ok. My problem solve already.

  26. jimela
    15 April 2011 at 16:17

    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

  27. be3
    3 May 2011 at 09:30

    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

  28. be3
    3 May 2011 at 09:38

    it even shows me that its loading the guest additions before im able to login

  29. nero
    5 May 2011 at 10:42

    “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

  1. No trackbacks yet.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: