Posted in Howto Linux Security

BackTrack on USB drive

October 17, 2006 - 11 comments

First of, I’d like to thank Dries who kept me updated on this issue.

Indeed, back in the BackTrack beta days, you were able to install BT on your USB drive using a tool called MySLAXCreator (http://myslax.bonsonno.org).

When BT Final was released, it was no longer possible to use MySLAXCreator to install it on the USB drive.

The whole process is described by Dries in the comments, but I’m gonna try to make it clearer here.

1. Download BackTrack 2 Final ISO

http://www.remote-exploit.org/backtrack_download.html

2. Copy the content of the ISO to your USB drive

See here for more info : link

If you’re under Windows, you can use WinRAR.
Under Linux (tested under Ubuntu), a WinRAR like tool will allow you to extract the content to your USB drive.

Extract into the root of the USB drive !

You should now have two new folders at the root of the USB drive (/boot and /bt).

3. Make the USB stick bootable

This was the toughest point, the backtrack team made it simple by writing two scripts, one for Windows, and another one for Linux/OS X

Windows :
Under the command line, go under your USB drive, cd into boot, then execute bootinst.bat

I haven’t tested this, since I don’t have any Windows computer. Feedbacks welcomed as always.

Under Linux/OS X :
$ cd /media/USB_DRIVE/boot/
$ ./bootinst.sh

4. Boot under BackTrack !

5. Build a third party software for BackTrack (here aircrack-ptw)

The usual stuff :
$ cd /tmp
$ wget http://www.cdc.informatik.tu-darmstadt.de/aircrack-ptw/download/aircrack-ptw-1.0.0.tar.gz
$ tar -xzvf aircrack-ptw-1.0.0.tar.gz
$ cd aircrack-ptw-1.0.0

Patch the source file and build the binary :
$ sed -e "s/-O3 -lpcap/-O3/" -e "s/\(gcc.*b.c\)/\1 -lpcap/" Makefile > Makefile.new
$ cp Makefile Makefile.old; mv Makefile.new Makefile
$ make

Now you should delete everything under /tmp/aircrack-ptw-1.0.0/ except the binary you’ve just built.

Now always under /tmp/aircrack-ptw-1.0.0 :
# mkdir -p ./usr/bin
# mv /tmp/aircrack-ptw-1.0.0/aircrack-ptw ./usr/bin

This will create the tree for the module..

Finally create the module and copy it in the backtrack “filesystem” :
# dir2lzm /tmp/aircrack-ptw-1.0.0/ aircrack-ptw.lzm
# mkdir /mnt/sdb1_removable/bt/modules/
# cp aircrack-ptw.lzm /mnt/sdb1_removable/bt/modules/

Comments

Dries

April 22, 2007 - 16:36

doesnt seem to work anymore with backtrack final :/

do you use the copy to usb directly at the welcome screen or ?
what i try (mounting; raw copy; checking for modules) it doesnt seem to work for me

btw some nice tips on this page :)

Sébastien Wains

April 22, 2007 - 18:03

Hi,

In myslax creator, I was selecting ISO-default, picking up the BT ISO, it was not necessary to mount it as far as i remember though. Then I was going to the “Create Myslax stick” menu.. The whole process was pretty painless except when I tried to change some boot options, the install would not work for some reason..

Hope this helps.. :)

Dries

June 13, 2007 - 14:31

http://backtrack.offensive-security.com/index.php?title=Howto:USB_Stick

this works

and if you want to save something: for example installing aircrack
$ cd /tmp
$ wget http://www.cdc.informatik.tu-darmstadt.de/aircrack-ptw/download/aircrack-ptw
-1.0.0.tar.gz
$ tar -xzvf aircrack-ptw-1.0.0.tar.gz
$ cd aircrack-ptw-1.0.0
$ sed -e “s/-O3 -lpcap/-O3/” -e “s/\(gcc.*b.c\)/\1 -lpcap/” Makefile > Makefile.new
$ cp Makefile Makefile.old; mv Makefile.new Makefile
$ make
delete all files except the binary
$ mkdir -p ./usr/bin
$ mv aircrack-ptw ./usr/bin/

$ dir2lzm /tmp/aircrack-ptw/aircrack-ptw-1.0.0/ aircrack-ptw.lzm
$ mkdir /mnt/sdb1_removable/bt/modules/
$ cp aircrack-ptw.lzm /mnt/sdb1_removable/bt/modules/

all done in backtrack

still in there after a reboot

beuz

July 5, 2007 - 23:14

thx ! :)

Dries

July 11, 2007 - 0:28

i havent really tested it out further (it was working fine but i partioned it wrongly so i have to do it again some day :p)

you made a more user friendly version of my explanation; i used it for my site; i hope you dont mind

i believe i ran the windows version; and it worked: not sure though as i was using them both

greetz

Kriblom

July 14, 2007 - 10:07

“Under Linux (tested under Ubuntu), a WinRAR like tool will allow you to extract the content to your USB drive.”

Under linux, you can use the command “mount” :

sudo (or be logged in root ) mount bt2final.iso /your_directoy -o loop

I’m going to test your method, thanks for the howto !

BackTrack en llave USB | TechnoBytes MX

August 31, 2007 - 0:33

[...] BackTrack on USB drive [Sébastien Wains]. [...]

anonymous

September 14, 2007 - 5:35

i got backtrack 2 final working off usb by doing this: http://www.andrewstrohman.com/backtrack.html

szizman

November 16, 2007 - 7:11

I have BT2 , ophCrackLiveCd, Bouldowz LiveCd, how can I make a multiboot on my USBstick ?
… my OS is xp

thanks

Sébastien Wains

November 17, 2007 - 11:42

szizman,

Never attempted that.. and I guess it must be quite tricky and a lot of work.. unless someone proves me wrong.

ZerOnenOreZ

September 28, 2008 - 15:05

Thanks man, ^v^

Leave Comment

Please consider visiting the partners below if you enjoyed this article :

If this post saved you time and money, please consider checking my Amazon wishlist.

Before submitting, some rules :
- Is your comment related to the article ?
- You're having a problem ? Have you checked Google, other howtos, docs, manpages ?
- You're still having the problem ? Have you raised log verbosity, checked traces, ran tcpdump ?
- Have you checked your configuratoin for typo ?
Unless your comment is providing additional info or respect the rules above, DON'T comment.
If you don't understand what you are doing, I urge you to read the documentation, I'm not your free Level 1 helpdesk guy.