So every time the BackTrack development team release a new version I download it and use it from fresh. I don’t like following the dist-upgrade route as I’ve had trouble in the past and it’s a good idea to get a clean build now and again.
I used to maintain a BT5-fixit.sh script but just don’t have the time. Instead I just use this script here: bt5r3gnome32.sh
I’ll walk through the code explain bit by bit what each section does.
Starting from a fresh install of BT5r3 gnome 32bit (this was created using the VM image)
First add the extra repository sources and keys:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | apt-get install -y python-software-properties apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 4E5E17B5 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 9BDB3D89CE49EC21 echo "deb http://packages.fwbuilder.org/deb/stable/ lucid contrib" >> /etc/apt/sources.list echo "deb http://dl.google.com/linux/chrome/deb/ stable main #Google Stable Source" >> /etc/apt/sources.list echo "deb http://deb.opera.com/opera/ lenny non-free #Opera Official Source" >> /etc/apt/sources.list echo "deb http://archive.getdeb.net/ubuntu lucid-getdeb apps #GetDeb Software Portal" >> /etc/apt/sources.list.d/getdeb.list add-apt-repository ppa:chromium-daily/stable add-apt-repository ppa:shutter/ppa add-apt-repository ppa:tualatrix/ppa add-apt-repository ppa:ubuntu-wine/ppa add-apt-repository ppa:deluge-team/ppa add-apt-repository ppa:gnome-terminator/ppa add-apt-repository ppa:mozillateam/firefox-stable add-apt-repository ppa:nilarimogard/webupd8 wget -q -O - http://deb.opera.com/archive.key | apt-key add - wget -q -O - http://archive.getdeb.net/getdeb-archive.key | apt-key add - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - wget -q -O - http://www.fwbuilder.org/PACKAGE-GPG-KEY-fwbuilder.asc | apt-key add - |
Then we read in the packages from the repositories and apply updates:
1 2 | apt-get update apt-get -y dist-upgrade |
Now install all the additional tools I want:
1 2 3 4 | apt-get -y install jockey-gtk rungetty linux-headers filezilla synaptic geany shutter gnome-web-photo vino gufw nessus python-dev chromium-codecs-ffmpeg-extra chromium-codecs-ffmpeg-nonfree opera flashplugin-nonfree-extrasound flashplugin-nonfree file-roller giplet compiz-plugins fwbuilder gcalctool gtk-recordmydesktop mono-runtime mono-devel deluge tsclient meld launchpad-getkeys unetbootin wine1.3-gecko cmake tftp ntp rcconf rsh-client arp-scan dialog tree sslscan apt-get -y clean apt-get -y autoremove apt-get -y autoclean |
Now we need to make changes to the configuration of the system:
Allow bash completion(why isn’t this turned on by default???)
1 | sed -i '/# enable bash completion in/,+3{/enable bash completion/!s/^#//}' /etc/bash.bashrc |
Add the kernel sources
1 | prepare-kernel-sources ; cd /usr/src/linux ; cp -rf include/generated/* include/linux/ |
Generate ssh keys to allow the ssh server to run
1 | sshd-generate |
Fix the pulseaudio sound server bug (this has been around since bt5r0 and it’s still here… why isn’t it fixed!!!)
1 | cd /root/.config/ ; mkdir autostart ; cd autostart ; touch pulseaudio.desktop ; echo -e "\n[Desktop Entry]\nType=Application\nExec=/usr/bin/pulseaudio\nHidden=false\nNoDisplay=false\nX-GNOME-Autostart-enabled=true\nName[en_US]=PulseAudio Sound System\nName=PulseAudio Sound System\nComment[en_US]=Start the PulseAudio Sound System\nComment=Start the PulseAudio Sound System" > pulseaudio.desktop |
Add nessus and openvas users:
1 2 3 | nessus-adduser nessus-fetch --register YOURKEYHERE openvas-mkcert ; openvas-adduser ; openvas-nvt-sync |
Change the location to be UK for both time and keyboard layout:
1 2 | dpkg-reconfigure tzdata dpkg-reconfigure console-setup |
Fix warvox as it’s broke:
1 | rm -rf /pentest/telephony/warvox/ ; svn co http://www.metasploit.com/svn/warvox/trunk /pentest/telephony/warvox |
Complete the beef install:
1 | beef_install.sh |
Now we need to manually add tools that dont come with BT5r3 that I like to use:
1 2 3 4 | cd /pentest/passwords/ ; wget http://www.unix-ag.uni-kl.de/~massar/soft/cisco-decrypt.c ; gcc -Wall -o cisco-decrypt cisco-decrypt.c $(libgcrypt-config --libs --cflags) ; rm cisco-decrypt.c cd /tmp ; wget ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.1/enu/AdbeRdr9.5.1-1_i386linux_enu.deb ; dpkg -i AdbeRdr9.5.1-1_i386linux_enu.deb svn checkout http://phillips321.googlecode.com/svn/trunk/ /root/phillips321 echo 'export PATH=$PATH:/root/phillips321' >> /root/.bashrc |
And finally, every Sunday before I go on a job I like to update nessus, w3af, open-vas, metasploit and so on:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | /pentest/wireless/wifite/wifite.py -upgrade msfupdate svn up /pentest/web/w3af/ openvas-nvt-sync cd /pentest/exploits/set/ ; ./set-update svn up /pentest/exploits/fasttrack/ cd /pentest/database/sqlmap/ ; ./sqlmap.py --update cd /pentest/web/nikto/ ; svn up ; ./nikto.pl -update svn up /pentest/exploits/exploitdb ps -A | grep nessus > /dev/null /etc/init.d/nessusd start ; sleep 10 ; nessus-update-plugins svn up /pentest/telephony/warvox svn up /pentest/wireless/giskismet/ nmap --script-updatedb cd /pentest/web/fimap/ ; ./fimap.py --update-def ; rm /root/fimap.log svn up /pentest/wireless/fern-wifi-cracker svn up /root/phillips321 |
Leave a Reply
You must be logged in to post a comment.