BackTrack 3 (2007-12-14) is a penetration testing live Linux distribution. It is packed with plethora of tools organized by categories.
With this large amount of utilities, it is sometimes hard to pick the correct one for the job. At Shmoocon 2008, a BackTrack representative gave a talk which was good, but focused on exploiting a Windows binary using Olly, not on showing off the features of the distribution. So I took it upon myself to click on every single link and find the awesome and the less awesome tools among the bunch. Note that the work that I did was for a presentation. There are videos which are self-explanatory but at times need commentary. I will provide some explanation in writing.
1. CREDITS
BackTrack3 - www.remote-exploit.org
Tactical Exploitation – H.D.Moore & Valsmith (Defcon 2007)
Metasploit Videos - learnsecurityonline.com
2. RECORDING
BackTrack comes with a video recording utility, recordmydesktop. You can either record the whole desktop or just one window using a window id. Some useful commands are:
recordmydesktop –no-sound -o out.ogg
xwininfo |grep “Window id:”|sed -e “s/xwininfo\:\ Window id:\ // ;s/\ .*//” #gives you a window id
recordmydesktop –nosound -windowid 0×0442 -o out2.ogg
3. INFORMATION GATHERING
In this category, the focus is on information aggregators, network discovery tools and OS and application vulnerability scanning tools.
3.1. Maltego - Personal Discovery
This is a tool from www.paterva.com that can be used for personal discovery. It has been in development for a while now and switched from a web version to a standalone binary version. It is a total information aggregator. It can search social networks such as LinkeIn, public PGP key servers. It can pull down various information from inside documents and other aggregators such as serversniff.de and robtex.com. It offers services such as geoip resolutions, email verification. The tool has a graphical interface and you can start your search by domain, IP address, website, email, person, phone number etc. The information is presented as a directional graph and any results can be further interrogated producing new results. You can use this to do various things such as profiling users of a certain server, searching for groups of people, determining relationships between websites, building PGP trees etc.
Maltego commonly finds phone numbers, addresses, names, personal sites, resumes, newsgroup postings, usernames, email addresses.

3.2. Nmap and Websites - Network Discovery
While doing network discovery, you are looking for variety of things such as MX records, internal networks, outsourced services, important server and open ports. The number one tool for this is still Nmap. A lot has been written about nmap, so I will just share my favorite usage and leave it at that:
nmap -sS -P0 -O -T Sneaky -p 445 -D 64.233.169.99 <ip_to_scan>
The above command initiates a stealth scan (-sS) which does not complete the TCP connection. This is fairly fast and unobtrusive. The -P0 flag tells nmap not to ping the IP which adds to stealth. The -T is a timing flag that can be set from Sneaky to Insane and determines the speed of packet generation. The -p flag specifies the port or a port range. You can use this flag either to add to stealth by specifying one or few ports, or add to thoroughness by providing a range of 1-65535. And last but not least, the -D flag allows you to specify a number of decoys. I usually put googlebot’s IP address. This makes nmap generate packets from your IP address and googlebots IP address (the response to which will go to google). This has an effect of confusing the target.
I would also like to share with you 2 less known network discovery tools. Two websites, www.domaintools.com and centralops.net provide nmap-like services. You can use these to create a domain dossier on any website that will include things like popular port scan, ping, traceroute, nslookup and whois. And best of all, the traffic is not going to come from you.
3.3. OS & Application Vulnerability Scanning
GFI LANguard is a tool I found as a useful replacement for Nessus (BackTrack does not include Nessus). It is only free with this BackTrack distribution. I found this tool to be a slightly slimmed down version of Nessus. On the other hand it was incredibly easy to use and it provides a wealth of information. It can scan a range of IPs to determine open ports, operating systems, common vulnerabilities, users, shares, running processes, security policies, missing patches, SNMP devices and functions they provide. This demo shows a limited use of its features and the results are more glorious on a larger network.
4. WIFI WEP Fun
BackTrack has an excellent collection of various wireless tools. I will present some of these here. I will use them to defeat WEP protection of my home router.
4.1 WEP Overview
WEP weakness stem from frequently repeating 24-bit IVs (initialization vectors) and the use of weak RC4 algorithm for keystream generation. This knowledge has been used to create a brute force attack. In this attack, you need to only capture a single encrypted packet and apply enormous amount of computing power to try all possible keys. This is possible due to the fact that the real key length is 40 for 64-bit keys and 104 for 128-bit keys. It has been shown that a weak key can be brute-forced in a manner of minutes. Another type of attack is FMS attack which is a statistical attack on known weak keys. You need to capture a lot of traffic to collect these keys, apply little CPU power and perform this attack. The tools that I describe below use the FMS attack.
4.2 Airo Tools
Below is a sequence of commands to use. I will not post the video due to its large size. You have to first bring up an interface in monitor mode. Then, you have to find a target with a command like “ wlanconfig ath0 list scan“. Then, use airodump-ng for collection of IVs, aireplay-ng for speedup of collection of IVs, and aircrack-ng for cracking of the key. In general, you need about 60KB of IVs before you should attempt to crack a 128-bit key. I waited until my filesize was a few megabytes. Depending on how fast the packets are flowing, the attack can take a few minutes or much more.
ifconfig wifi0 up
wlanconfig ath0 create wlandev wifi0 wlanmode monitor
ifconfig ath0 up
wlanconfig ath0 list scan
airodump-ng –ivs -c 6 –write dump –bssid <AP’s_MAC> ath0
aireplay-ng -2 -b <AP’s_MAC> -d ff:ff:ff:ff:ff:ff -m 68 -n 68 -p 0841 -h <Innocent_computer’s_connected_to_AP_MAC> ath0
aircrack-ng -f 2 -a 1 -b <APs_MAC> -n 128 dump-01.ivs
4.3 Wesside-ng Demo
This is a tool that automates WEP cracking. It is still in early stage of development and I could only get it working with an atheros chipset. It is simple to use and does everything on its own. It finds a nearby vulnerable network, collects traffic and cracks the key.
wesside-ng -i ath0
5. Other WIFI tools
5.1 WifiZoo
This is the most useful tool that I found. I believe it comes from the CoreImpact toolkit. It is used primarily for cookie stealing on unencrypted and possibly encrypted (untested) networks. On my test network I managed to steal Facebook cookies. I had unlimited control of the Facebook account of the “victim” and could do anything up to changing the password. I also managed to steal Gmail cookies. Pretty much the only things I could do was read email and set a forwarding email. I could not change the password.
I am not posting a demo of this due to size limitations and privacy issues. I am posting a screenshot. As you can see the tool also automatically collects FTP data and SMTP data. What you have to do to get it working is:
1. nano /pentest/wireless/wifizoo/wifizoo.py and change conf.iface=’eth0′ to you monitor interface
2. ./wifizoo.py to start the tool
3. Start Firefox and change its HTTP proxy to 127.0.0.1:8080
4. Point the browser to 127.0.0.1:8000 which is WifiZoo’z webinterface

5. After that, it’s smooth sailing - click on the cookies link, click on a captured cookie, select “Set Cookie” and it will take you to the IP address of the website. You usually have to change the IP address to the name manually (e.g. change 69.63.176.140 to www.facebook.com in the browser location bar).
5.2 MDK3
I don’t know if this stands for “Murder Death Kill 3″ but it sure looks like it. I could not fully test this tool as I did not want to attack a large network and this is mainly where it would shine. This tools allows you to deploy a 3-part attack. First, you can deauthenticate clients from all nearby or a selected Access Point thus providing a denial of service. Second, you can flood the nearby APs with authentication requests. This can lead to a situation where some APs will need to be restarted or the become full and will not accept any new users. Third, you can create a beacon flood of fake APs specifying some ssid or generating random ssid names. After this step, the legitimate clients that were booted from their APs in step 1 will have a lot of problems reconnecting. This sounds like it could create some major havoc on unsuspecting networks. Most of this can probably be mitigated by a combination of MAC filtering and good firmware. The commands are:
mdk3 eth0 d # deauthentication attack
mdk3 eth0 a -a <AP_MAC> # authentication flood
mdk3 eth0 b -n MyEssid -w -c 11 # beacon flood mode
6. EXPLOITATION FRAMEWORKS
Backtrack comes with Metasploit, Inguma, W3AF and a few others. I have tested Metasploit and W3AF and will present my results here.
6.1 Metasploit 3 - unlocking a workstation
The problem is simple, I have a Windows 2000 VMware workstation that I don’t know the password to. Since it turns on, it probably goes online and gets an IP address. A nmap scan reveals that to be true. After that, I take a random exploit for windows 2000 and throw it at the box. This one happens to be a Net32Api CanonicalizePathName() stack overflow. The payload is set to vncinject. By default, it provides a “Courtesy Shell”. Typing “explorer.exe” in that shell bypasses the authentication window and allows the change or Administrator password. Note that I am using the Windows GUI Metasploit. I had to do this due to my need to start a VM.
6.2 Metasploit 3 - SMB Relay Attack
Multiple videos already exist for this attack elsewhere and while doing this I used a tutorial from learnsecurityonline.com. The attack mechanism is described nicely here and here. In a few words, whats going on here is - a man in the middle reflection attack based on the weakness of the Microsoft SMB file sharing authentication protocol. Note that I am using a web interface this time.
7. PENTESTING A WEBSERVER
The tools that you want to use for this are: webspiders, webserver vulnerability scanners, exploitation frameworks for web, credential brute-forcing utilities.
7.1 Nikto
This is web server scanner which performs tests against web servers for multiple items, including over 3500 potentially dangerous files/CGIs, versions on over 900 servers. It commonly finds outdated software versions (SSL, Apache, PHP), allowed HTTP methods, and various directories that are missing index files.
7.2 W3AF
This is a web application attack and audit framework. I have not experimented much with it. I used its webSpider to collect all the links of a webserver. Then I wrote a script to extract the users of the server by searching for “~”.
Summary: Using the information collected from just the above two tools, we can now go ahead and try to exploit the server by looking for existing vulnerabilities for the outdated software, examining the files in directories that are missing index files to try to find .htpasswd files or embedded passwords in PHP files. We can also try to bruteforce the accounts of the users we collected from the webspider. The tools to use for bruteforcing are Hydra, Medusa, and SSHater. They come with modules that allow you to attack most popular protocols (ssh, ftp, telnet, imap etc).
8. TOOLS I DIDN’T LIKE
There were a few that I didn’t like but others I just didn’t find useful. The list would be too long if I had to list it here. I will mention the fact that THC-Hydra and Medusa, both online password brute forcers, core dumped when I tried to use them.













does BT3 has SQLIX tool in it .
i also been looking for Oedipus-Beta-1_8_3.tar.gz and i cant find due to it has been taking off
Azag, I’m not sure about BackTrack, but you might want to try the OWASP LiveCD. Although I haven’t checked, I’m pretty sure SQLiX is on it :-).
http://www.owasp.org/index.php/Category:OWASP_Live_CD_Project
Really nice article to start playing with BT3.
Cheers!
after watching the metasploit video, I’ve tried the smb relay exploit on mine, but I didn’t find that specific exploit, you mention that it was just showcase last year, but after doing an update of my metasploit still no luck, my question is where did you get your version of metasploit?
thanks
Jorge, the version I have is “Metasploit Framework v3.1-release” for Windows (downloaded from “http://www.metasploit.com/framework/”). The exploit is in exploits > windows > smb > smb_relay (use any of web, console, or gui version). Not sure about the Unix version. The machine I had the framework on was XPSP2 and the test machine was Windows 2000 random service pack. I have just installed the latest 3.1 version of framework and the smb module is still there.
I finally got it going, nice exploit…in my case it didn’t work until I joined the target machine to a domain, is that the case..this exploit only works for machine that are part of a domain?…also is it possible to pull a mitm attack on a target when is accessing a share on the network instead of opening an email or web page with the UNC name embedded?
thanks
No, it should work without joining the domain, perhaps its a bit flaky? I remember I had to disable SMB on the framework machine plus some other services before I got it working.
I think that yes, you can do a mitm attack on a target when it is accessing a share on the network. First you would have to become the man in the middle. Then, you would wait for the target to try to connect to a share on the network (some other legit machine). Intercept that first challenge request and proceed same as the reflection attack except you are now also masquerading as that legit network share. Don’t think metasploit module will do this.
Awesome article, there are other sites that explain what these tools do, however none as indepth as yours. As a novice Backtrack user I plan to research and use this more effectively - Thanks for your help
Thanks man