BackTrack 5 R2 – VirtualBox Guest Additions + USB Issues Fixes
by Thireus on Mar.16, 2012, under Guides and tutorials, Hack1ng. 34,887 views

The famous Linux-based penetration testing arsenal can run in VirtualBox. In the meanwhile, some tricks are needed to have the latest version fully functional with VirtualBox.
For the ST’HACK Ethical Hacking Contest tonight in Bordeaux (France), everything must be ready for the battle. MacBooks are armed, scripts are ready to be launched and beers are waiting in the fridge. During the preparation, BackTrack 5 R2 was installed on every teammate computers.
VirtualBox is of course the most suitable virtualization solution to run BackTrack. Unfortunately, with this latest version of BackTrack, the VirtualBox Guest Additions cannot be installed on a fresh new install. Fortunately after some modifications, everything can be fixed to compile these additions for the 3.2.6 Linux Kernel of BackTrack 5 R2.
Edit: VirtualBox Guest Additions solution updated with new fixes.
Download and Install
- BackTrack: http://www.backtrack-linux.org/downloads/
- VirtualBox + Oracle VM Extension Pack: https://www.virtualbox.org/wiki/Downloads
If you want support for USB 2.0 devices you must download and install Oracle VM Extension Pack for VirtualBox!
I will not describe the steps to install BackTrack on VirtualBox. A lot of tutorials can be found on the Internet to upgrade to BackTrack 5 R2 or to make a fresh install. But here are some screenshots about the VirtualBox configuration for my MacBook Air i7 1.8Ghz.
Issue #1 (solved): USB device descriptor error
usb 1-1: Device descriptor read/8, error -110 usb 1-1: Device descriptor read/64, error -110
Solution
Number of Processor for the Guest OS must be set to 1 or eventually 2…
For example, my MacBook Air has a Core i7 inside, multithreading displays 4 virtual cores. So I have to set a maximum of 2 cores to BackTrack VM Guest to fix this issue. (Even if the recommended number of cores VirtualBox displays is 4).
Issue #2 (solved): VirtualBox Guest Additions
After a fresh new install of BackTrack 5 R2, you should have no issues installing VirtualBox Guest Additions… So, before applying these patches, make sure the installation of VirtualBox Guest Additions fails.
After upgraded from an old version of BackTrack to BackTrack 5 R2, you can face issues installing VirtualBox Guest Additions. These two kinds of errors can occur and lead to a vboxguest kernel extension impossible to load.
The headers for the current running kernel were not found. If the following module compilation fails then this could be the reason.
and
Building the main Guest Additions module ...fail! (Look at /var/log/vboxadd-install.log to find out what went wrong)
Both issues result to:
Starting the VirtualBox Guest Additions ...fail! (modprobe vboxguest failed)
Solution
apt-get install linux-headers-$(uname -r) linux-headers xserver-xorg xserver-xorg-core file-roller # file-roller not needed cd /usr/src/ tar jxf /usr/src/linux-source-3.2.6.tar.bz2 rm /usr/src/linux ln -s /usr/src/linux-source-3.2.6 /usr/src/linux rm /usr/src/linux-headers-3.2.6/include/asm ln -s /usr/src/linux-source-3.2.6/arch/x86/include/asm /usr/src/linux-headers-3.2.6/include/asm ln -s /usr/src/linux-headers-3.2.6 /lib/modules/3.2.6/build ln -s /usr/src/linux-source-3.2.6/arch/x86/Makefile_32.cpu /usr/src/linux-headers-3.2.6/arch/x86/Makefile_32.cpu # Solution required for BackTrack x86 version by SphaZ
Please make sure you have linux-source-3.2.6.tar.bz2 into your /usr/src/ directory… Just in case you need it:
Ready to install VBOXADDITIONS
Verifying archive integrity... All good. Uncompressing VirtualBox 4.1.10 Guest Additions for Linux.......... VirtualBox Guest Additions installer Removing installed version 4.1.10 of VirtualBox Guest Additions... tar: Record size = 8 blocks Removing existing VirtualBox DKMS kernel modules ...done. Removing existing VirtualBox non-DKMS kernel modules ...done. Building the VirtualBox Guest Additions kernel modules Building the main Guest Additions module ...done. Building the shared folder support module ...done. Building the OpenGL support module ...done. Doing non-kernel setup of the Guest Additions ...done. You should restart your guest to make sure the new modules are actually used Installing the Window System drivers Installing X.Org Server 1.7 modules ...done. Setting up the Window System to use the Guest Additions ...done. You may need to restart the hal service and the Window System (or just restart the guest system) to enable the Guest Additions. Installing graphics libraries and desktop services components ...done. Press Return to close this window...
Good job, reboot and enjoy adaptative screen resolution, smooth mouse moves, folder sharing and copy/paste from Host to Guest and vis versa.
Incoming search terms:
- backtrack virtualbox (102)
- Error! Bad return status for module build on kernel: 3 2 6 (i686) (88)
- /var/log/vboxadd-install log (59)
- backtrack 5 virtualbox (58)
- backtrack macbook air (58)
- backtrack 5 r2 virtualbox guest additions (48)
- error! bad return status for module build on kernel: 3 2 6 (x86_64) (43)
- backtrack virtualbox guest additions (37)
- backtrack 5 virtualbox guest additions (35)
- backtrack on macbook air (33)
42 Comments for this entry
1 Trackback or Pingback for this entry
-
Jour Zéro » Installer les ajouts nécessaires pour VirtualBox dans BT5R2
April 10th, 2012 on 12:57 am[...] Voici un site qui m’a aidé a installer les additions pour VirtualBox dans Backtrack 5 R2. Here’s a site that helped me install the VirtualBox Guest Additions in Backtrack 5 R2. Categories: Outils Comments are closed. OpenDNS – Parental Controls RSS Twitter Contact [...]






March 19th, 2012 on 10:18 pm
Congratulations for the post… works perfectly!!
Thanks from SP-BR!
March 19th, 2012 on 11:34 pm
Thanks smutans, I’m glad I could help
March 24th, 2012 on 5:24 pm
I did everything exactly and Im still getting the build module ..fail line. Im clueless. I’ve been working on this for 8 hours
March 24th, 2012 on 5:36 pm
Hi,
Can you tell me what VirtualBox version you are using, your BackTrack uname -a, and all command details.
Let’s try to fix your issue! Reply back here please.
March 24th, 2012 on 6:00 pm
Hi, thanks for the quick reply:
VB version: 4.1.10 uname: Linux bt 3.2.6 #1 SMP Fri Feb 17 10:40:05 EST 2012 i686 GNU/Linux
Though Im on BT 5-r2 and using a windows 7 host. I followed your lead to the tee, and I still get the “Build main Guest Additions module .. fail. here is the vboxadd log:
Uninstalling modules from DKMS
Attempting to install using DKMS
Creating symlink /var/lib/dkms/vboxguest/4.1.10/source ->
/usr/src/vboxguest-4.1.10
DKMS: add Completed.
Kernel preparation unnecessary for this kernel. Skipping…
Building module:
cleaning build area….
make KERNELRELEASE=3.2.6 -C /lib/modules/3.2.6/build M=/var/lib/dkms/vboxguest/4.1.10/build….(bad exit status: 2)
Error! Bad return status for module build on kernel: 3.2.6 (i686)
Consult the make.log in the build directory
/var/lib/dkms/vboxguest/4.1.10/build/ for more information.
0
0
ERROR: binary package for vboxguest: 4.1.10 not found
Failed to install using DKMS, attempting to install without
make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/3.2.6/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
/usr/src/linux-headers-3.2.6/arch/x86/Makefile:39: /usr/src/linux-headers-3.2.6/arch/x86/Makefile_32.cpu: No such file or directory
make[1]: *** No rule to make target `/usr/src/linux-headers-3.2.6/arch/x86/Makefile_32.cpu’. Stop.
make: *** [vboxguest] Error 2
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
This comment is gettng long so I will leave it here. if you need anything else I will post it, I really appreciate the help. I’ve been using BT a long time and the host/guest sharing just went kaput recently after update
March 24th, 2012 on 6:29 pm
Alright, I’m not home right mow. I’ll have a look later tonight. I keep you in touch If I find something.
When you followed the instructions, did you faced any issues? Check if all ln -s directories exist.
March 24th, 2012 on 8:24 pm
Ok, sounds good. all the symlink directories exist – …/asm has alot of files and a couple of directories and …/linux-headers… has alot of directories with a couple files. I really appreciate the help, Thireus. Hope I can repay it someday. I’ll catchya tonight
March 25th, 2012 on 2:25 pm
fr|ct|on,
Your issue is related to the missing Makefile_32.cpu file. I think you’re using BackTrack x86, and this is why this file was not missing for me as I chose the x86_64 version
/usr/src/linux-headers-3.2.6/arch/x86/Makefile:39: /usr/src/linux-headers-3.2.6/arch/x86/Makefile_32.cpu: No such file or directory
To solve this, you have to link this file:
cd /usr/src/linux-headers-3.2.6/arch/x86
ln -s /usr/src/linux-source-3.2.6/arch/x86/Makefile_32.cpu
You can thank SphaZ for the solution
March 25th, 2012 on 11:14 am
I got the exact same issue as fr|ct|on. Tried twice. The build and asm symlink both exist, yet it still fails
March 25th, 2012 on 11:26 am
I posted too fast, I solved this by doing cd /usr/src/linux-headers-3.2.6/arch/x86 and then ln -s /usr/src/linux-source-3.2.6/arch/x86/Makefile_32.cpu
March 25th, 2012 on 2:12 pm
Thanks SphaZ
I’ll add your solution to this article, so anybody with the same problem can fix it.
March 25th, 2012 on 4:59 pm
I have you both to thank .. SphaZ for the final solution, and Thireus for the medium that brought it to me. Thanks both, that was the answer. I was so accustomed to seeing ‘fail’ everytime I tried this I must have double checked that it actually said ‘done’ instead for a full 2 minutes before I believed it. Thanks again, and good blog Thireus!
March 26th, 2012 on 11:27 pm
Can you please help me I have a similar issue as well. Upgraded from BT5R1 to R2 today and can’t get virtualbox to work.
root@bt:~/Desktop# more /var/log/vbox-install.log
Uninstalling modules from DKMS
Attempting to install using DKMS
Creating symlink /var/lib/dkms/vboxhost/4.1.10/source ->
/usr/src/vboxhost-4.1.10
DKMS: add Completed.
Kernel preparation unnecessary for this kernel. Skipping…
Building module:
cleaning build area….
make KERNELRELEASE=3.2.6 -C /lib/modules/3.2.6/build M=/var/lib/dkms/vboxhost/4.
1.10/build….(bad exit status: 2)
0
0
Failed to install using DKMS, attempting to install without
make KBUILD_VERBOSE=1 SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 CONFIG_MODULE_SIG=
-C /lib/modules/3.2.6/build modules
/usr/src/linux-headers-3.2.6/arch/x86/Makefile:39: /usr/src/linux-headers-3.2.6/
arch/x86/Makefile_32.cpu: No such file or directory
make[1]: *** No rule to make target `/usr/src/linux-headers-3.2.6/arch/x86/Makef
ile_32.cpu’. Stop.
make: *** [vboxdrv] Error 2
March 26th, 2012 on 11:43 pm
Hi Francis,
Your error is exactly the same as fr|ct|on: “arch/x86/Makefile_32.cpu: No such file or directory”
Have you applied all VirtualBox Guest Additions fixes provided into this article? Particularly that one:
ln -s /usr/src/linux-source-3.2.6/arch/x86/Makefile_32.cpu /usr/src/linux-headers-3.2.6/arch/x86/Makefile_32.cpu # Solution required for BackTrack x86 version by SphaZ
March 27th, 2012 on 12:50 am
Just uninstalled and reinstalled vbox and still the same issue
March 27th, 2012 on 12:51 am
Yes I’ve tried it my link already exists
ln -s /usr/src/linux-source-3.2.6/arch/x86/Makefile_32.cpu /usr/src/linux-headers-3.2.6/arch/x86/Makefile_32.cpu
ln: creating symbolic link `/usr/src/linux-headers-3.2.6/arch/x86/Makefile_32.cpu’: File exists
March 27th, 2012 on 1:14 am
1. Does the linked Makefile_32.cpu exist?
Please provide the following command results:
ls -l /usr/src/linux-headers-3.2.6/arch/x86/Makefile_32.cpu
ls -l /usr/src/linux-source-3.2.6/arch/x86/Makefile_32.cpu
ls -l /usr/src/
2. Type all commands and give me the results
Can you type one more time all commands provided here for VirtualBox Guest Additions solution, and paste here all Terminal results. (It doesn’t matter if you already applied patches earlier)
March 27th, 2012 on 2:00 am
I’ve listed the requested ouput below.
ls -l /usr/src/linux-headers-3.2.6/arch/x86/Makefile_32.cpu
lrwxrwxrwx 1 root root 52 2012-03-26 21:42 /usr/src/linux-headers-3.2.6/arch/x86/Makefile_32.cpu -> /usr/src/linux-source-3.2.6/arch/x86/Makefile_32.cpu
ls -l /usr/src/linux-source-3.2.6/arch/x86/Makefile_32.cpu
ls: cannot access /usr/src/linux-source-3.2.6/arch/x86/Makefile_32.cpu: No such file or directory
root@bt:/usr/src# ls -l /usr/src/
total 71256
-rw-r–r– 1 root root 4318822 2012-02-12 04:33 arduino-1.0-linux.tgz
lrwxrwxrwx 1 root root 27 2012-03-26 21:54 linux -> /usr/src/linux-source-3.2.6
drwxr-xr-x 23 root root 4096 2011-11-25 11:12 linux-headers-2.6.39.4
drwxr-xr-x 24 root root 4096 2012-03-26 21:54 linux-headers-3.2.6
-rw-r–r– 1 root root 65956128 2012-03-06 00:36 linux-source-2.6.32.tar.bz2
drwxr-xr-x 25 root root 4096 2012-03-26 18:17 linux-source-2.6.39.4
-rwxr-xr-x 1 root root 2671271 2012-02-17 11:52 truecrypt-7.1a-setup-x86
lrwxrwxrwx 1 root root 32 2012-03-26 23:35 vboxhost-4.1.10 -> ../share/virtualbox/src/vboxhost
March 27th, 2012 on 2:04 am
So… easy to know why the VirtualBox Guest Additions Cannot locate your file… because you do not have any linux-source-3.2.6.
Don’t you have noticed when typing the following command “tar jxf /usr/src/linux-source-3.2.6.tar.bz2″ that you don’t have any linux-source-3.2.6.tar.bz2 file?
Well, give me 30 seconds and I upload linux-source-3.2.6.tar.bz2 here.
March 27th, 2012 on 2:23 am
thx
March 27th, 2012 on 2:29 am
Thx Thireus. Appreciate the help. Will try again once you linux-source-3.2.6.tar.bz2 on here.
March 27th, 2012 on 2:35 am
I have updated the article, download and put the linux-source-3.2.6.tar.bz2 archive into your /usr/src/ directory. Then apply the patches one more time and check that everything is fine with “tar jxf /usr/src/linux-source-3.2.6.tar.bz2″.
Good luck and keep me in touch.
March 27th, 2012 on 2:50 am
Thireus its now working. Thx really appreciate the help first time I’ve ever done a upgraded the kernel. I will defintely remember this and take into the consideration when I upgrade backtrack again.
March 27th, 2012 on 2:52 am
Good
Enjoy BT5 R2
March 31st, 2012 on 2:42 am
THANK YOU SO MUUUUCH, you have no idea of how gratefull i am to all users here! you have helped so much, i was close to throwing my laptop out the window!
My best regards to Thireus and SphaZ
April 1st, 2012 on 2:02 pm
Thank you so much.. Now my Guest Addition works perfectly
April 30th, 2012 on 10:55 am
Hi there
thanks a lot for this really really helpful article! now i got a question which i just can’t seem to find a useful answer, even after two days of extensive google-searching: what usb wifi adapter do you use on a macbook – virtualbox setup, which works well, also with injection?
thanks so much in advance and wish you a nice week
April 30th, 2012 on 11:32 am
Hi deadbydawn,
If you are only looking for injection only, i’d recommend AWUS036H 1000mW v2, which is the best for b/g networks. AWUS036NH or AWUS051NH are quite good too and can be used for 802.11n networks. But these two ones are not as good as the AWUS036H version for b/g networks, plus the AWUS036NH version is not compatible with 5Ghz frequency.
To my point of view ALFA cards are the best, but you can still have a look here: http://www.backtrack-linux.org/wiki/index.php/Wireless_Drivers#Tested_and_working_cards
Have a nice week too
.
April 30th, 2012 on 11:40 am
hi thireus
thanks a lot for your quick reply!
what do you mean by “if you are only looking for injection only”? isn’t injection the most neccessary point in order to make the card able to do the full process of breaking into wifi (i’m using my second wifi for self-education in security topics)? sorry for the stupid question
i will also check out the link you provided, thanks a lot
April 30th, 2012 on 2:05 pm
Master mode can also be interesting to make rogue AP, or share Internet connection
.
Stability and connection speed are also other good points, as well as the ability to use the card on other operating systems with compatible drivers. It is always good to have a descent working card natively supported by your OS, which is not the case here on OSX and ALFA cards.
May 2nd, 2012 on 11:08 am
ah i see your point. well, i don’t need that, as i will use it solely for backtrack penetration testing
yeah that’s what i also read on the net and why i asked
as long as it works in on osx running in virtualbox everything is fine for me, i don’t need in on osx
May 3rd, 2012 on 2:43 am
i do everything that it says but i turn it off then on and guest additions doesn’t work
also sometimes when i retry it it says ,cannot open:not enough space left on device
May 5th, 2012 on 12:31 pm
Please provide any useful information (debug info -> use pastebin) so I can figure out what’s the problem.
May 6th, 2012 on 11:28 pm
Thanks man, VBoxAddiction finally installed!
May 15th, 2012 on 10:35 pm
new to backtrack awesome but, i can’t get wlan0 up on vitualbox no matter what, anyone any clue?
May 15th, 2012 on 10:40 pm
ifconfig -a
No seriously, we can’t help if you don’t provide any useful information about your config, WLAN card/USB, drivers used, BackTrack version, computer specs, virtualization or not, etc.
August 18th, 2012 on 2:59 am
Creating a Backtrack5 R2 and installing VB extension went as smoothly as can be. However I am unable to get my usb WNIC working on backtrack, whenever I try to select it from the USB devices it appears as busy (don’t know why) and if I select it I get the following error:
Código Resultado:
NS_ERROR_FAILURE (0×80004005)
Componente:
HostUSBDevice
Interfaz:
IHostUSBDevice {173b4b44-d268-4334-a00d-b6521c9a740a}
Receptor:
IConsole {1968b7d3-e3bf-4ceb-99e0-cb7c913317bb}
I also have an ALFA AWUS036NH which I haven’t even been able to get to work on my macbook with OS 10.8. Any help will be really appreciated.
August 18th, 2012 on 9:52 am
VirtualBox USB host system does not depend of VBox Guest Additions, but only Oracle VM VirtualBox Extension Pack (for USB 2.0 support) which can be downloaded here: https://www.virtualbox.org/wiki/Downloads.
You should take a look at this topic: https://forums.virtualbox.org/viewtopic.php?f=6&t=37622. People are facing the same issue that you have, maybe the solution can be found here. I never faced this issue with VirtualBox, but as far as I can tell, you probably should reinstall the latest version with Oracle VM VirtualBox Extension Pack.
Regarding your AWUS036NH, ALFA cards are not quite compatible with OSX. Just like I said in my previous comments:
“It is always good to have a descent working card natively supported by your OS, which is not the case here on OSX and ALFA cards.”
You can download the drivers for your card here: http://www.alfa.com.tw/in/front/bin/ptlist.phtml?Category=105397. Mountain Lion is not supported yet… so maybe you can try to install the driver version for Lion, but I assume some patches/hacks will be required to make it work properly.
Good luck!
August 18th, 2012 on 6:06 pm
I had also already Installed the extension pack, but still no luck. Can you recommend a good wireless card that is capable of packet injection and is supported by MAC OS ?? This is my first Mac so I’m pretty much shooting in the dark here. Both virtual box and the ALFA card work flawlessly on my win7 machinesas did my danets antenna with integrated card, both work right out of the box on ubuntu as well. Anyways, thank you for your help.
August 18th, 2012 on 6:38 pm
If I understand you correctly, you want to get rid of a BackTrack Virtual Machine under MacOS and use a wireless card that is natively supported by MacOS and does packet injection. So I assume you already have all the tool suite capable of managing what you’re planning to do with that wireless card, I mean airodump-ng, aireplay-ng and airmon-ng. So I suppose you already found that they are available in MacPort, or maybe you have compiled these tools by hand…
So if this is your plan, I can tell you you’ll face big issues with MacOS. MacOS is not as flexible as Linux for doing such things. This is why everyone uses ALFA cards in VirtualBox. First because ALFA cards are the best for that kind of things, and also because VirtualBox works perfectly well when it is well installed.
To sum up, there are no good wireless card that supports injection and that are natively supported under MacOS. The best thing you have to do is to reinstall properly VirtualBox to get your ALFA card working in it, because it should work, no matter if you’re using VirtualBox under MacOS/Windows/Ubuntu. It should work.
Keep trying!
Good luck.
December 28th, 2012 on 4:39 pm
thx brother
March 24th, 2013 on 1:54 pm
Hello
Sorry for writing after few months since last post, but maybe somebody will be able to help me.
When Im trying to install virtualbox on Backtrack 5r3 i get the following error
Error! Bad return status for module build on kernel: 3.2.6 (i686)
Consult the make.log in the build directory
/var/lib/dkms/virtualbox-ose/3.1.6/build/ for more information.
dpkg: error processing virtualbox-ose-dkms (–configure):
subprocess installed post-installation script returned error exit status 10
Errors were encountered while processing:
virtualbox-ose-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
I have already linked my Makefile_32.cpu file and exists, if you could tell me what to do now, please
root@bt:~# ls -l /usr/src/linux-headers-3.2.6/arch/
alpha/ cris/ i386/ m68k/ openrisc/ score/ um/
arm/ frv/ ia64/ microblaze/ parisc/ sh/ unicore32/
avr32/ h8300/ Kconfig mips/ powerpc/ sparc/ x86/
blackfin/ hexagon/ m32r/ mn10300/ s390/ tile/ xtensa/
root@bt:~# ls -l /usr/src/linux-headers-3.2.6/arch/x86/Makefile_32.cpu
lrwxrwxrwx 1 root root 52 2013-03-24 14:32 /usr/src/linux-headers-3.2.6/arch/x86/Makefile_32.cpu -> /usr/src/linux-source-3.2.6/arch/x86/Makefile_32.cpu
root@bt:~# ls -l /usr/src/linux-source-3.2.6/arch/x86/Makefile_32.cpu
-rw-rw-r– 1 root root 3257 2013-03-24 14:44 /usr/src/linux-source-3.2.6/arch/x86/Makefile_32.cpu
root@bt:~# ls -l /usr/src/
total 80660
drwxr-xr-x 2 root root 4096 2013-03-09 01:07 ati
lrwxrwxrwx 1 root root 18 2013-03-09 00:20 linux -> linux-source-3.2.6
drwxr-xr-x 24 root root 4096 2013-03-24 14:21 linux-headers-3.2.6
drwxr-xr-x 26 root root 4096 2012-02-24 14:35 linux-source-3.2.6
-rw-r–r– 1 root root 79900895 2012-02-17 17:10 linux-source-3.2.6.tar.bz2
-rwxr-xr-x 1 root root 2671271 2012-02-17 12:52 truecrypt-7.1a-setup-x86
drwxr-xr-x 12 root root 4096 2013-03-24 14:21 virtualbox-ose-3.1.6
root@bt:~#