Home > Linux, Perl, Tech > Getting the BackTrack menu structure (and tools) in Ubuntu

Getting the BackTrack menu structure (and tools) in Ubuntu

November 20, 2009 Leave a comment Go to comments

NOTE: I have moved this code to GitHub.

UPDATE [11-7-2010]: It is *best* to use the actual BackTrack distribution due to the patches and optimizations they make to the kernel. Patching the standard Ubuntu kernel would make it no longer *Ubuntu*. I’d highly suggest you either:

  1. Install BackTrack on a real or virtual machine environment
  2. Manually download and install the security tools you need to use on your system.


I recently outlined how to install all the BackTrack tools on your Ubuntu system. It’s a pretty easy process these days because BackTrack is Debian based. However, by default, BackTrack uses KDE, and therefore all of the tools, when installed in Ubuntu with Gnome show up in the “Other” folder as just one big really long list of tools.

There also were problems with launching the tools from the menu, because often times you’d get the error message below:

That’s not very helpful, so I have done a little work and gotten the BackTrack tools AND menu structure within Ubuntu 9.10. I’ve also written a Perl script that will fix the error message above.

So, here’s a brief overview of the steps in this lengthy blog post:

  1. Prepare the GNOME menu with the appropriate BackTrack menu structure
  2. Install BackTrack 4 tools within Ubuntu
  3. Run a Perl script to update the newly created menu entries so that they will launch a terminal correctly within Ubuntu

Here’s a quick preview of the finished product:

BackTrack 4 Menu in Ubuntu!

NOTE: This involves modifying your current GNOME menu settings, and could cause issues with your menu if done incorrectly. Make a backup first, and note that this worked on my system, but your mileage may vary!

The first step before installing any of the tools is to prepare the GNOME menu. Open up a shell:

sudo cp /etc/xdg/menus/applications.menu /etc/xdg/menus/applications.menu.original
sudo geany /etc/xdg/menus/applications.menu

Note that I am using the application Geany, which is a programmer’s editor for Linux, much like Notepad++ for Windows. You can use gedit if you’d prefer, but Geany may help you in modifying this XML file because it offers code folding and syntax highlighting.

If you opened it with Geany, click on the Document menu, Select Set Filetype, select Markup Languages, and then finally select XML Document.

Select file type within Geany

With Geany, I find it easiest to collapse the menu blocks for the other sub-menus within Gnome’s Applications menu.

After collapsing the System Tools section, paste the following XML directly after it. This will define the BackTrack menu’s and submenu’s:

Adding BackTrack menu structure with Geany

NOTE that because of the length, I have moved the XML code to a new post. Please obtain the BackTrack menu XML from this post.

After updating this with the BackTrack XML, you may now save and close the document.

At this point, we can follow the instructions in my previous post to install the BackTrack utilities.

Let’s begin by launching a root bash shell by typing:

sudo bash

The next step is to add the BackTrack repositories to your apt-get sources.list file:

1. Add the Backtrack repository:

sudo echo deb http://repo.offensive-security.com/dist/bt4 binary/ >> /etc/apt/sources.list

2. Import the Backtrack PGP key and update your sources (and set a proxy server to use if you need it):

export http_proxy="http://myproxyserver.com:8080"
wget http://repo.offensive-security.com/dist/bt4/binary/public-key && sudo apt-key add public-key && sudo aptitude update

3. Build your package list (NOTE that I am specifying a proxy server — remove this part from the command if you do not use a proxy):

links -http-proxy myproxyserver.com:8080 -dump http://repo.offensive-security.com/dist/bt4/binary/ | awk '{print $3}' | grep -i deb | cut -d . -f 1 > backtrack.txt

If you do not use a proxy server, then the command will look like this:

links -dump http://repo.offensive-security.com/dist/bt4/binary/ | awk '{print $3}' | grep -i deb | cut -d . -f 1 > backtrack.txt

4. Install packages:

for i in $(cat backtrack.txt); do sudo aptitude -y install $i; done

Credit for the BackTrack menu settings goes to or4n9e at Remote Exploit’s forums.

Next, we need to run a Perl script to ensure that the newly installed applications can be correctly executed from our GNOME Applications menu.

Copy the following code and save it to a file. I saved mine to a file called UpdateBTMenu.pl

# Written by Mick Grove
# https://micksmix.wordpress.com
#  [v0.1]		11/20/2009
# BSD Licensed
#       Redistribution and use in source and binary forms, with or without
#       modification, are permitted provided that the following conditions are
#       met:
#       * Redistributions of source code must retain the above copyright
#         notice, this list of conditions and the following disclaimer.
#       * Redistributions in binary form must reproduce the above
#         copyright notice, this list of conditions and the following disclaimer
#         in the documentation and/or other materials provided with the
#         distribution.
#       * Neither the name of the  nor the names of its
#         contributors may be used to endorse or promote products derived from
#         this software without specific prior written permission.
use strict;
use warnings;
use Tie::File;

my $dir     = "/usr/local/share/applications";
my $section = "Desktop Entry";
my $in_section;
my @files;

opendir(BIN, $dir) or die "Can't open $dir: $!";
while (defined(my $file = readdir BIN))
    next if $file =~ /^\.\.?$/;    # skip . and ..
    if ($file =~ m/.*\.desktop$/i)
        push(@files, $file);

foreach my $curfile (@files)
    open( FH, "<", "$dir/$curfile" ) or die "$!";
    chomp( my @fileparts =  );

    my $termval = TerminalStatus(\@fileparts);
    next if $termval eq 0;    # skip if this is not a terminal application

    #lets see if this is actually a BT program
    my $btprogram = IsBTProgram(\@fileparts);
    next if $btprogram == 0;    # skip if this is not a BT application

    my $ExecKey     = "Exec";
    my $TerminalKey = "Terminal";
    my @tiedfile;

    #open this file for editing
    tie @tiedfile, 'Tie::File', "$dir/$curfile" or die "$!";

    #read file line by line here
    # updating "Exec" line
    foreach my $fline (@tiedfile)
        next if $fline =~ /^#/;       # skip comments
        next if $fline =~ /^\s*$/;    # skip empty lines

        if ($fline =~ /^\[$section\]$/)
            $in_section = 1;

        if ($fline =~ /^\[/)
            $in_section = 0;

        my $oldline;
        my $updatedline;
        if ($in_section and $fline =~ /^$ExecKey\s*=\s*(.*)$/)

            # this means we have the "Exec key"
            $oldline = $1;
            next if $oldline =~ m/^.*xterm -e.*;bash.*$/i;    #skip
            $oldline =~ s/"/\\"/img;
            $updatedline = "Exec=xterm -e \"$oldline;bash\"";
            $fline       = $updatedline;

            print "New exec: " . $fline . "\n";
        elsif ($in_section and $fline =~ /^$TerminalKey\s*=\s*(.*)$/)

            # this means we have the "Terminal key"
            # we will set it to "0" to turn it off --- we are launching
            #   xterm ourselves, if we set to 1, we'll get an extra
            #   terminal opened
            $oldline     = $1;
            $updatedline = "Terminal=0";
            $fline       = $updatedline;

    untie @tiedfile;

print "\n\nAll menu entries have been updated\n";

### Subroutines ###
sub TerminalStatus
    my @lines       = @{$_[0]};
    my $TerminalKey = "Terminal";
    my $ExecKey     = "Exec";
    my $termkeyval  = 0;            #default = 0 FALSE, 1= TRUE
    my $i           = 0;
    my $execkeyval = 0;  #default = 0 = this exec line probably wasn't set by us

    foreach my $fline (@lines)
        next if $fline =~ /^#/;       # skip comments
        next if $fline =~ /^\s*$/;    # skip empty lines

        if ($fline =~ /^\[$section\]$/)
            $in_section = 1;

        if ($fline =~ /^\[/)
            $in_section = 0;

        if ($in_section and $fline =~ /^$TerminalKey\s*=\s*(.*)$/)

            # this means we have the "terminal key"
            $termkeyval = $1;
            next;    #last;

        if ($in_section and $fline =~ /^$ExecKey\s*=\s*(.*)$/)

            # this means we have the "exec key"
            $execkeyval = $1;
            if ($execkeyval =~ m/^.*xterm -e.*;bash.*$/i)
                $execkeyval = 1;    # this script likely set this value before
            next;                   #last;

    if ($execkeyval eq 1)
        # force this to true, because this can be updated by this script,
        #   b/c we appear to have modified this entry before.
        $termkeyval = 1;
    return $termkeyval;

sub IsBTProgram
    my @lines    = @{$_[0]};
    my $key      = "Categories";
    my $isbtprog = 0;              #default = FALSE = 0
    my $i        = 0;
    foreach my $fline (@lines) {
        next if $fline =~ /^#/;       # skip comments
        next if $fline =~ /^\s*$/;    # skip empty lines

        if ($fline =~ /^\[$section\]$/) {
            $in_section = 1;

        if ($fline =~ /^\[/) {
            $in_section = 0;
        if ($in_section and $fline =~ /^$key\s*=\s*(.*)$/)

            # this means we have the "terminal key"
            if ($1 =~ m/.*BT-.*/i)
                $isbtprog = 1;
    return $isbtprog;

I saved that file to my home folder at /home/mick

Next we need to run the script, but first we will backup all menu files in case something goes wrong. Open up a terminal:

cd ~/
mkdir menu_backup
sudo cp /usr/local/share/applications/* ~/menu_backup

Now we have made a backup of the menus, so it is safe to run our Perl script now:

sudo perl ./UpdateBTMenu.pl

That’s it! Your BackTrack tools (with menu structure) are ready to use within Ubuntu!

If for some reason there was a problem with executing the Perl script or your menu isn’t working, you can copy the backed up menu items to their original location:

sudo cp ~/menu_backup/* /usr/local/share/applications/
Categories: Linux, Perl, Tech
  1. tanja
    November 21, 2009 at 9:27 AM

    thanks for the work!

  2. xroot2000
    November 24, 2009 at 5:38 PM

    After updating /etc/apt/sources.list with this command:

    sudo echo deb http://repo.offensive-security.com/dist/bt4binary/ >> /etc/apt/sources.list

    I’ve got the following error:

    E: Malformed line 55 in source list /etc/apt/sources.list (dist)

    This is line 55:
    deb http://repo.offensive-security.com/dist/bt4binary/

    Please help.

  3. nerk
    November 25, 2009 at 7:26 AM

    it should be:
    deb http://repo.offensive-security.com/dist/bt4 binary/

    Observe the space between bt4 and binary/!

    • Mick
      November 25, 2009 at 9:46 AM

      Thanks for catching that! I have updated the guide with the correct spacing.

  4. xroot2000
    November 25, 2009 at 3:58 PM

    After applying the space between bt4 and binary, it finally works :-)
    Thank you all for the support!

  5. nerk
    November 28, 2009 at 11:36 AM

    After installing all the tools, you still have to find some depends for ex. fasttrack.py and so on… and you might need some kernel patches that backtrack use… so the point of installing all the tools is… well not so big..


    • Mick
      November 29, 2009 at 9:05 AM

      True. I’ll take a look and see if there is anything I can do for this.

      • mack
        January 18, 2010 at 10:40 AM

        Thanks a lot for this guide!
        Since BT4 uses its own kernel patches and optimizations, I was wondering if you have any hints on how to replace Ubuntu’s default kernel with BT4’s latest kernel? (I mean, do they have a repo for their kernel or do we have to get their .config from BT’s CD and recompile?)

      • mack
        January 18, 2010 at 12:55 PM

        I was wondering if you have found a solution? I’d love to use BT’s tools on Ubuntu 9 (or even 10 in a few months) instead of that crappy intrepid/KDE3… but figuring out what dependencies are needed and patching the kernel looks like a lot of work…

  6. hp12c
    November 29, 2009 at 8:46 AM

    Thank you very much for your tutorials on incorporating Backtrack into ubuntu.

  7. David
    December 8, 2009 at 9:13 PM

    I have Ubuntu Netbook Remix, Does the instructions to get backtrack menu apply the same with my version?

    • Mick
      January 2, 2010 at 11:12 AM

      Yes, they should be the same. However, if you have problems this guide does outline how to backup your menu settings and restore them.

  8. Nerdlock
    December 9, 2009 at 10:44 PM

    On step 3 if you are not using a proxy use this:

    links -dump http://repo.offensive-security.com/dist/bt4/binary/ | awk ‘{print $3}’ | grep -i deb | cut -d . -f 1 > backtrack.txt

    • David
      December 10, 2009 at 6:50 PM

      What does not using a proxy have to do with Ubuntu Netbook Remix menu? The problem I’m getting is after everything is said and done, I get a Backtrack menu that is just a period. When I click on the menu item, it lists all of the utilities but within no folders or anything.

      • Nerdlock
        December 11, 2009 at 8:43 AM

        I was not replying to you, just making a note of that to anyone who has never used “links”.

        About your menu problem. I would run the backup the rerun the pearl script. You probably could put Ubuntu on your netbook. It runs fine on my EeePC 900A.

  9. Sequelae
    January 13, 2010 at 11:27 AM

    How about ubuntu Jaunty 9.04 ? please email me at Jbasth@gmail.com

    • Mick
      January 13, 2010 at 11:30 AM

      It should work exactly the same on 9.04. In fact, my first guide was created using 9.04.

  10. Edvinas
    January 14, 2010 at 3:25 PM

    Worked on the first try, thanks again! :)

  11. ducdm
    January 15, 2010 at 3:57 AM

    ducdm :
    I got the below error during run file UpdateBTMenu.pl. I’m using Ubuntu 9.10.
    Argument “false” isn’t numeric in numeric eq (==) at UpdateBTMenu.pl line 66.
    All menu entries have been updated

  12. edwardo
    January 16, 2010 at 3:04 PM

    Thank you for making this tutorial, after applying the perl script (with no errors in terminal) everything works great! thank you,

    SWFintruder gets the child proccess error, can i fix this? with Geany? :)

  13. Tee
    January 18, 2010 at 2:34 AM

    Thank you for making this tutorial!

    After applying the perl script (with no errors in terminal), my applications seem to have just gone i.e. I click applications nothing happens.

    I tried copying the backed up menu items to their locations using
    sudo cp ~/menu_backup/* /usr/local/share/applications/, but to on avail.

    Please advice

  14. adam
    January 18, 2010 at 9:58 AM

    ducdm :

    ducdm :
    I got the below error during run file UpdateBTMenu.pl. I’m using Ubuntu 9.10.
    Argument “false” isn’t numeric in numeric eq (==) at UpdateBTMenu.pl line 66.
    All menu entries have been updated

    I am having the same issue here, I have followed it up to the letter and so far everything looks great, but getting this one final error. please help. so close.

  15. Edvinas
    January 19, 2010 at 9:20 AM

    What would need to change in the UpdateBTMenu.pl file for programs to launch in gnome-terminal and not xterm? I tried to just change the xterm to gnome-terminal at line 107 (left the -e the same, and also changed it to -x), but i get the error “child process….”. Could you show how to launch the apps in gnome-terminal?

  16. Browny
    January 30, 2010 at 4:08 PM

    Is it just me or does repo.offensive-security.com not respond?

    Tried to connect many times. no success

  17. NeverAFK
    January 31, 2010 at 7:57 AM

    Outstanding job!

  18. vi0
    February 1, 2010 at 4:28 PM

    Browny : Is it just me or does repo.offensive-security.com not respond? Is it just me czy repo.offensive-nie security.com odpowiedzieć? Tried to connect many times. Próbował połączyć wiele razy. no success bez powodzenia

    i have same problem…

  19. teage
    February 6, 2010 at 6:08 AM

    Its not repo.offensive-nie security.com anymore. Its archive.offensive-security.com .

  20. Tarto
    February 6, 2010 at 9:44 PM
  21. Skullnick
    February 11, 2010 at 9:06 AM

    I also get the error:

    Argument “false” isn’t numeric in numeric eq (==) at UpdateBTMenu.pl line 66.
    All menu entries have been updated

    Any ideas on how to solve it?

  22. r00t
    February 14, 2010 at 3:28 AM

    hello! thanx for doing this awesome work!
    that repo i think is expired, what would be the new one and cmd for that?

  23. scott schanbaum
    February 17, 2010 at 11:52 PM

    will you posting an updated “how to” with updated web links.

    • Mick
      March 1, 2010 at 8:42 AM

      Yes, I’m working on it now.

  24. Asren
    February 20, 2010 at 2:37 AM

    Update please. Thx.

  25. Marsuvees
    February 22, 2010 at 9:58 AM

    for the step:

    export http_proxy=”http://myproxyserver.com:8080″

    wget http://repo.offensive-security.com/dist/bt4/binary/public-key && sudo apt-key add public-key && sudo aptitude update

    i get the following:

    Resolving repo.offensive-security.com…
    Connecting to repo.offensive-security.com||:80… failed: Connection timed out.

    it does this multiple times, and has yet to work. also, if i’m not using a proxy server, do i simply eliminate the first line of code? this may be an obvious question, but i am quite new to ubuntu and have no idea what im doing… ill learn :)


  26. Globalization
    February 24, 2010 at 3:57 AM

    same issue here guys, i hope some one will be able to help, best regards
    wget http://repo.offensive-security.com/dist/bt4/binary/public-key && sudo apt-key add public-key
    –2010-02-24 09:52:50– http://repo.offensive-security.com/dist/bt4/binary/public-key
    Resolving repo.offensive-security.com…
    Connecting to repo.offensive-security.com||:80… connected.
    HTTP request sent, awaiting response… 504 Gateway Timeout
    2010-02-24 09:56:00 ERROR 504: Gateway Timeout

  27. metallibam
    February 24, 2010 at 8:22 AM

    any ideas on the time out??

    • Mick
      February 24, 2010 at 8:45 AM

      The repo address is old. See the note at the top of the post.

  28. Tom Johnston
    February 24, 2010 at 12:16 PM

    I am stuck here and getting the following:

    root@ubuntu:~# links -dump http://sun.backtrack-linux.org/dists/pwnsauce/ | awk ‘{print $3}’ | grep -i deb | cut -d . -f 1 > backtrack.txt
    The program ‘links’ is currently not installed. You can install it by typing:
    apt-get install links
    links: command not found

    Not familiar with links.

    • Wayne McLemore
      February 24, 2010 at 8:48 PM


      When it says:

      The program ‘links’ is currently not installed. You can install it by typing:
      apt-get install links
      links: command not found

      The ‘links’ app is not installed and is pointing you to do the command of ‘apt-get install links’ and by doing that you are installing the ‘links’ program.

  29. Asren
    February 24, 2010 at 9:15 PM

    Any ideas about new repo link?

  30. Josh
    February 28, 2010 at 6:16 AM


    I’ve been able to get the new repository source added and working (http://archive.offensive-security.com), and I can install packages manually with apt-get or synaptic, but I am stuck following step 3 of your tutorial. The links command is broken now and substituting the new repo address does not seem to fix it. Can you post a sample backtrack.text file so I can see what the file should look like, so that I can (hopefully) replicate it with the new repositories? Any help you can give is appreciated.


    • Ren
      March 1, 2010 at 7:57 AM

      This is a sample backtrack.txt I downloaded when the old repo was still up: http://pastebin.com/raw.php?i=89LVka14
      Basically it’s just a list of security tools, however I don’t know if the new repo has new tools that need to be added/changed in the list.

  31. March 1, 2010 at 1:25 AM

    the list was blank in backtrack.txt :
    links -dump http://sun.backtrack-linux.org/dists/pwnsauce/ | awk ‘{print $3}’ | grep -i deb | cut -d . -f 1 > backtrack.txt

    please advice..

  32. March 1, 2010 at 5:11 AM

    root@m42h21-laptop:#perl UpdateBTMenu.pl
    Argument “false” isn’t numeric in numeric eq (==) at UpdateBTMenu.pl line 66.
    Argument “false” isn’t numeric in numeric eq (==) at UpdateBTMenu.pl line 66.

    All menu entries have been updated

    is this normal ??

  33. Mick
    March 1, 2010 at 8:20 AM

    FYI, I’m working on an updated guide. I hope to have it done soon. So far, things are mostly working, just working out a few kinks.

  34. Asren
    March 1, 2010 at 8:27 AM

    Good to hear that Mick :)
    We will wait for that.

  35. Globalization
    March 2, 2010 at 12:30 AM

    thanks Mick, you are such a great help mate

  36. Nic
    March 2, 2010 at 2:31 AM

    Please anyone i got stuck in
    links -dump http://sun.backtrack-linux.org/dists/pwnsauce/ | awk ‘{print $3}’ | grep -i deb | cut -d . -f 1 > backtrack.txt

    anyone can help me?

    • Straker
      March 13, 2010 at 5:35 AM

      You can’t just do it that way, it doesn’t make sense any more. I haven’t used Linux in 10 years (i.e. it’s been so long that everyone used Slackware then), and am not having much trouble getting it to work (under Ubuntu installed on a huge flash drive, no less) by making intuitive changes to this guide. Instead of that whole mess starting with “links” (which in and of itself was a bitch to install and turned out to be unnecessary), just wget http://sun.backtrack-linux.org/dists/pwnsauce/microverse/binary-i386/Packages and do what you want with the result – probably just grep Package, then use cut to remove everything before the colon, dead easy.

  37. Straker
    March 13, 2010 at 4:58 PM

    damn, spoke too soon. had to leave the mass apt-get update/upgrade going overnight and after coming back, restarting and sorting out the various resulting issues (not BT-related), I’m only seeing Backtrack->Information Gathering->[All> and Maltego 2.0.2 CE] :(
    pretty much have to leave SPM open to have a convenient list of all the BT tools I currently have installed, now, but this is still a great start. thanks, would have had no idea where to begin otherwise – I can’t just use BT because of a screwy issue with its kernel inherently being too old to support the Intel Wireless 1000 because of currently available firmware, and obviously it is tricky to upgrade.

    also, when you’re able to finish revising this, Aquire/Aquisition etc. is spelled starting with “Acq” :)

    • Mick
      March 14, 2010 at 10:58 AM

      Simply going the route that you outlined has caused problems for me. I initially planned to do it this way but it was not successful. I’m still working to get the new guide updated, but have not had much time lately to devote to it.

      The problem is that this will never be a 100% replacement for BackTrack, due to some of the modifications/patches to the kernel made in the official BT distribution.

  38. Ren
    March 15, 2010 at 9:12 AM

    IMO it’s not a problem, as only two categories of people would want to install pentesting tools – pentesters, and wannabe crackers (script kiddies). Surely it shouldn’t be a problem for any pentester to apply the patches found on the aircrack website and recompile their kernel. The whole operation only took me about 20 minutes on my pc.

    • Straker
      March 19, 2010 at 8:29 PM

      I think you missed the point, which is simply that BT is its own distribution, i.e. if you have all the tools installed but you’re not running BT then you’re not running BT… or you’re running what amounts to BT with a ton of other crap installed, rather than debian or ubuntu or whatever.

      Surely you also realize that what you’re suggesting is security through obscurity, right? Many (maybe even the majority) of the tools included in BT also have some legitimate interest for a lay audience, and it seems to me that most script kids wouldn’t be interested in the entire package in the first place.

      • Ren
        March 20, 2010 at 4:55 AM

        I was replying to Mick. I simply stated that if his guide cannot be “a 100% replacement for BT” it shouldn’t be a problem for computer security professionals who just need a quick way to add up-to-date security tools to their distro of choice, and don’t care about your true-BT vs fake-BT-with-crap-installed purism. What has this to do with security through obscurity? Bah, whatever.

  39. kira
    March 27, 2010 at 3:30 PM

    Argument “false” isn’t numeric in numeric eq (==) at ./bt.pl line 66.

    All menu entries have been updated

    i got this msg after runing the perl script
    so i got no backtrack menu and no tools

  40. sparky
    March 30, 2010 at 10:37 PM


    I was just wondering when/if you still plan on having a new tutorial available for installing BT4 on Ubuntu with the updated repositories? I really like your previous write-up and am interested in seeing if I can get it working again on my new system. -Thanks for the great work!

    • Mick
      April 1, 2010 at 3:36 PM

      I still plan on it. I’ve been working on it off and on lately.

  41. Vix
    April 1, 2010 at 3:33 PM

    I usually never post comments on blogs, but I found this post after digging and Googling for hours (to find precisely what I needed). I am very happy to have found this tutorial. I know there are others who feel the same. I have bookmarked this page because I am anxiously awaiting your newest update that includes the newest repositories. Also, I am curious to know if you will update again after Lucid Lynx Final is released April 29th? Thanks so much!

    • Mick
      April 1, 2010 at 3:36 PM

      My goal is to complete it this month.

      • enc
        April 3, 2010 at 5:15 AM

        Can’t wait for the newest update too! Hope it works with Lucid Lynx =)

      • Bryan
        April 19, 2010 at 2:55 PM

        C’mon Mick! You’re our only hope! ;) Ok, I guess we could go out and try to find the PGP key link ourselves, but you’ve done so much already. Please let me know when you have the time to update the guide. If you need help and can point a few people in the right directions, maybe others could help? The repository address update was good … but still can’t find that darn PGP (GPG) key.

  42. Japestinho
    April 9, 2010 at 12:14 PM

    When you will post new update of this usefull technique Mick? I need it very quick :P

  43. Taimoor
    April 18, 2010 at 4:54 AM

    Can’t wait….Need you to work more…:)Need soln for lucid lynx…..

  44. Ben
    April 21, 2010 at 2:36 PM

    any updates??

  45. Frahman
    April 27, 2010 at 4:25 PM

    Still waiting for the update you are trying hard to make.
    Thank you in advance. :)

  46. Krisler12
    May 1, 2010 at 12:22 AM

    Hi !

    Please make another tutorial about how to do this on Ubuntu LTS 10.04 and try to modify that perl script to use gnome terminal instead of xterm !
    Also,in Backtrack 4 the user is is root and it is not necessary anymore to write the password for root every time he is trying to run a Backtrack script (tool). Could you solve this problem, please, because I think it is useless to install all Backtrack tools on Ubuntu since you cannot run any of them without writing the root password ? (I think if this problem is not solved many real hackers/pentesers will prefer using Backtrack OS because of this it is faster and speed is needed. )

    Thank you in advance !

    PS: Expecting your answer !

  47. Krisler12
    May 1, 2010 at 12:39 AM

    Update: I’ve forgot to say that the menu structure and perl script don’t work on newly Ubuntu 10.04. Also I’ve tried to modify that applications.menu file which you are saying about and then install the tools but the menu structure still unchanged.
    Second, it gives me that error: Argument “false” isn’t numeric in numeric eq (==) at ./bt.pl line 67. when trying to run the perl scipt. I please you to fix that also if don’t bother.

    Thanks !

  48. Matt
    May 6, 2010 at 4:06 PM

    I am also waiting on the update for 10.04 with the new menu & list. Thanks for the help!!

  49. kiwiruss
    May 13, 2010 at 6:33 AM

    You are our only hope Mick. Im wanting to get bt4 on my ubuntu 10.04 netbook version.

  50. Ankhtahr
    May 22, 2010 at 6:56 PM

    Hi, thanks for this guide. I was wondering if it could work (if modified) under Debian GNU/Linux 4(Lenny) too, Backtrack is based on Debian if I’m right.

  51. Ankhtahr
    May 22, 2010 at 6:58 PM

    sorry, my mistake I meant Debian 5

  52. Visgean Skeloru
    May 24, 2010 at 4:25 PM

    Hello i have made my own way how to integrate backtrack to ubuntu: http://github.com/Visgean/BacktrackMenuEntries

    • a
      May 26, 2010 at 7:40 AM

      link doesnt work

  53. MCS
    May 30, 2010 at 11:43 AM

    Nice Job.
    I have one big problem thou. i cant connect to the link. it seems like that they moved the site. Any idea where to get the binarys and key now?

  54. Mike
    June 3, 2010 at 10:29 PM

    I think what we need to work on is a maintained package that installs the backtrack tools and menu system. Shouldn’t be too hard, and as long as we maintain it it should work fine with new updates. What do you guys think?

  55. Ivan
    June 7, 2010 at 3:40 AM

    Hey Mike, thanks for the guide! How about the one for 10.04???

  56. July 5, 2010 at 2:00 AM
    • Simiil
      September 13, 2010 at 1:30 PM

      woah thanks

  57. Naj
    July 30, 2010 at 3:52 PM

    Mick~! stuck at links -dump http://sun.backtrack-linux.org/dists/pwnsauce/microverse/binary-i386 | awk ‘{print $3}’ | grep -i deb | cut -d . -f 1 > backtrack.txt

    backtrack.txt seems empty. (get bactrack.txt from Endy but fail in next step *UpdateBTMenu.pl*) hope you can update it or anyone here lucky with 10.4 ubuntu?

  58. Jross
    July 30, 2010 at 11:50 PM

    Hey Mick whats the news on the new guide. I am using Ubuntu 10.04 and I get this error with the OPerl Script:

    Argument “false” isn’t numeric in numeric eq (==) at updateBTmenu.pl line 66.
    Argument “false” isn’t numeric in numeric eq (==) at updateBTmenu.pl line 66.

    All menu entries have been updated

    Line 66 is this:

    next if $termval == 0; # skip if this is not a terminal application

    Please help :)

  59. September 9, 2010 at 2:37 PM

    Thank you so much Mick :)
    Great job !!

    Do you mind if I translate it into my language ?
    There are many people would need it.

    • Mick
      September 9, 2010 at 9:39 PM

      Absolutely! I don’t mind at all, feel free!

  60. Semaan
    September 15, 2010 at 7:41 AM

    in your 2nd step! at the “wget http://repo.offensive-security.com/dist/bt4/binary/public-key && sudo apt-key add public-key && sudo aptitude update” comand i get
    “http request sent waiting response then a 504 gateway time-out”

    i am not using a proxy, my connection is good so i can t see what s generating that problem!

    Could you help me plz?!


  61. September 21, 2010 at 1:39 PM

    I really like your article. You said:

    UPDATE [2-14-2010]: I know the download repo’s used in this guide are out of date. I am working to update this guide to reflect the change because the repo change also requires more than a trivial change to my guide. If you want to experiment with it, the new repository is at — http://sun.backtrack-linux.org/

    will you update this guide? I think al lot of people would be thankful for this.


  62. Morcelu Atreides
    September 24, 2010 at 4:18 PM

    Serveral things I have found while trying to install BT4 into Ubuntu 10.04. Scapy will not install at all. you keep getting errors. and if you try to install all of the BT4 software, then your operating system gets fried and no longer works. Which results in the need to reinstall everything all over again. (Done this 15 time in an attempt to get all of the software install.) Any one got any ideas how to fix this problem? I am lost.

  63. jill
    September 28, 2010 at 10:30 PM


    I am looking forward to your updated guide. This is an excellent resource, thanks be to Mick!

    I will keep checking back…

    Thanks again for your hard work!

  64. vibils
    October 10, 2010 at 5:57 PM

    We should take a moment to thank Mick for his help.
    I cannot think of many resources/individuals who go through the trouble of making available such a useful and lengthy tutorial.
    Let’s pitch in when possible and make this a perfect resource.
    Looking forward to the new guide when ready!

  65. caki
    November 19, 2010 at 11:52 AM

    how to fix all error ….. please ?????

  66. Mad
    January 23, 2011 at 7:29 AM

    There is an alternative way of getting the packets list, but you need to have Backtrack installed (a bootable USB key / CD-ROM with a live version of Backtrack will do the job). Just run backtrack and use the following command:

    sudo dpkg –get-selections >backtrack.txt

    It will generate the file you’re looking for. Just remember to use CD to navigate to some convenient place before (especially if you use a non-persistent version of BT).

    • February 27, 2011 at 9:21 AM

      I’m sorry but the way you suggested would take DAYS to get even a semi-right list from…. That method gets EVERYTHING. Not just tools, also kernel installs, system stability applications, all the KDE stuff on BT4,…. you get the idea… And sorting through it would be a nightmare unless you knew what they were all called to begin with, and if you new that… then why the hell would you need the list in the first place ?

  67. deeds3353
    February 5, 2011 at 9:47 PM

    I’m still trying Mick, Hope you haven’t gave up!
    Please could you give us some idea if there will be a update to this tuturial as I’ve killed my synaptic package manager now trying this.
    I’ve got BT4 R1 and BT4R2, but I like the look and feel of ubuntu and the tools of BT4 so that is why I’d like to mix the 2…..Good luck and if you have the time, Keep up the Good work!!…………………deeds3353

  68. February 11, 2011 at 4:26 PM

    cause i had the same issues this is a a guide how to add backtrack repos easily. worked for me fine :-)


  69. Sirgold
    February 19, 2011 at 3:24 PM

    This worked for me:

    curl -s http://sun.backtrack-linux.org/dists/pwnsauce/microverse/binary-i386/Packages | grep -i Package: | sed ‘s/Package: //’ > backtrack.txt


  70. February 27, 2011 at 9:24 AM

    You guys wanna be hackers and pen-testers… yet you cannot take this guide, re-code it and make it work for a modern set-up? …. I’m workin this on Linux mint, got it from Gnacktrack, did this all on my own. Then i came here because that perl script was what i needed. So thanks but uh… good luck. *sigh* .. no wonder hackers got a bad name…….

    • February 27, 2011 at 9:26 AM

      And please… if you say “well some of us aren’t as good as you and need a toutorial” I will flame your but halfway across the globe. If you don’t know how, you aren’t good enough to be worthy to know yet. Simple. As. That. And most of you never will be good enough to use all the tools correctly. So just leave it alone. They aren’t toys.

      • February 27, 2011 at 10:55 AM

        And yea… I hate them so much, i couldn’t even spell tutorial right.

  71. y2k
    March 17, 2011 at 2:27 PM

    Connecting to repo.offensive-security.com||:80… failed: Connection timed out.

  72. Manny
    April 20, 2011 at 5:22 PM

    I cant find the file updateBTmenu.pl ? how do i locate it ??

    • Mick
      April 20, 2011 at 6:33 PM

      It’s the code on this page. Do a search on *this* page for “UpdateBTmenu.pl”. You have to copy and paste the code and save it into a file.

  73. April 30, 2011 at 10:34 AM

    It did well for me, but how can I remove all this stuffs out of my SPM? Thanks for your time.

    • April 30, 2011 at 11:08 AM

      Ok Micksmix, i made it.

  74. julian
    June 27, 2011 at 4:29 PM

    I did everything, no errors, no missing codes i just changed the line 48 for the pearl script and line 168 for the backtrack update cuz my menu file is not in local is in usr/shared anyway
    but nothing happened my menu still the same no changes, the only thing i have is the backtrack tools alredy in my software system

    so any ideas my dear Mick? what did i do wrong?

    thanks a lot

  75. August 3, 2011 at 5:41 AM

    if you get the message:
    Argument “false” isn’t numeric in numeric eq (==) at ./bt.pl line 66.
    bla bla
    edit the perl script at line 66, change ‘==’ to eq so it looks like this

    066 next if $termval eq 0; # skip if this is not a terminal application
    068 #lets see if this is actually a BT program
    069 my $btprogram = IsBTProgram(\@fileparts);
    070 next if $btprogram eq 0;

  76. dimz
    September 4, 2011 at 12:53 AM

    sorry, i’m a newbie,,
    how to install backtrack menu in natty?? is it the same way??
    thanks for help,,

  77. December 3, 2011 at 3:42 PM

    This is good post i am tried my computer using ubuntu 10.04 but its failed
    thank for your nice work

  78. December 10, 2011 at 7:20 PM

    hi ..dear,
    how i can .. make my user to root or how i can login like the root ?

  79. Renaissance2005
    August 28, 2012 at 10:06 PM

    Hi Mick and experts,

    Is the site http://repo.offensive-security.com/dist/bt4binary/ still valid? I tried to execute Step 2: Import the Backtrack PGP key and update your sources but there is no response?

  1. January 20, 2010 at 4:26 PM
  2. January 23, 2010 at 6:57 AM
  3. March 26, 2010 at 10:46 AM
  4. March 1, 2012 at 8:16 PM

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s