• Home »
  • Security »
  • Backtrack 4: Information Gathering: Route: 0trace – Traceroute Firewall Bypass Tool
Backtrack 4: Information Gathering: Route: 0trace – Traceroute Firewall Bypass Tool

Backtrack 4: Information Gathering: Route: 0trace – Traceroute Firewall Bypass Tool

This is the first in a series of Backtrack 4 articles I will be writing regarding the tools available within Backtrack 4. I am fairly new to Backtrack so please comment, teach me, ask questions, or whatever you prefer in the comments section below. I am going to try to go down the list of every single Backtrack 4 tool and write a complete description including instructions on how to use the tools. This first article is on 0trace (0trace.sh) which allows you to perform a traceroute from within an established TCP connection such as HTTP which will be demonstrated below.

Ever attempted to traceroute to a server such as cnn.com because you wanted to understand the entire path to some form of network device? Well 0trace allows you to get past pretty much any form of stateful packet inspection firewall that blocks such requests today. The 0trace application does this by setting up a listener and waiting for you to receive some form of approved connection to that device such as HTTP and then performs a traceroute within the already “approved” and “established” TCP connection. Below I demonstrate what you would normally see/understand from a network device using ping and traceroute followed by how you can find out more information using the 0trace command.

Obtain Network Route/Path Information About Target:

First we ping a domain name such as cnn.com to obtain the IP address of in this case a web server we would visit by opening the site in our browser. If you already have the IP address of the target then simply skip to the traceroute command.

Ping Target Network Device To Obtain IP Address:


  1. root@bt:~/# ping cnn.com
  2. PING cnn.com ( 56(84) bytes of data.
  3. --- cnn.com ping statistics ---
  4. 2 packets transmitted, 0 received, 100% packet loss, time 1008ms
  6. root@bt:~/#

As you can see the IP address of the web server is so with this information we will issue the traceroute command in an attempt to obtain the entire path from our location (client PC) to the CNN.com web site.

Traceroute Target IP Address To Obtain Route From Client To Target:


  1. root@bt:~/posts/2010-May# traceroute
  2. traceroute to (, 30 hops max, 40 byte packets
  3. 1  router (  2.154 ms  2.587 ms  3.111 ms
  4. 2  74-133-211-1.dhcp.insight.com (  24.118 ms  25.002 ms  25.155 ms
  5. 3  74-133-33-29.dhcp.insight.com (  25.571 ms  25.920 ms  26.459 ms
  6. 4 (  34.265 ms  34.599 ms  40.150 ms
  7. 5  xe-8-1-0.edge4.Atlanta2.Level3.net (  65.191 ms  66.506 ms  66.840 ms
  8. 6  ae-21-52.car1.Atlanta1.Level3.net (  67.296 ms ae-11-51.car1.Atlanta1.Level3.net (  20.669 ms  19.962 ms
  9. 7  * * *
  10. 8  * * *
  11. ....
  12. 29  * * *
  13. 30  * * *

In the above traceroute I saved you from having to view the entire 24 lines of failed hops indicated by the “* * *” but as you can see once we get six hops into the traceroute things go dark and we are not able to verify the entire route to the web server. This is where 0trace comes in by easily allowing you to obtain the entire route to the device. Below are the details of how you could for instance obtain the entire route to the CNN.com web server your client PC would be visiting. Keep in mind that this could be used in many different scenarios not only for web servers but also other network devices that will accept various forms of established TCP connections from client PC’s.

The 0trace application is run using 0trace.sh located in the /usr/local/bin directory. In the below example you would need to change “wlan0” to whatever network interface on the client PC you want to listen and then change the IP address to the network device you are attempting to gain full network route information from. Again in the example we are using one of the CNN.com web servers.

Configure Listener On Client PC Using 0trace:


  1. root@bt:~# /usr/local/sbin/0trace.sh wlan0
  2. 0trace v0.01 PoC by <lcamtuf@coredump.cx>
  3. [+] Waiting for traffic from target on wlan0...

So in the example above we are now listening on wlan0 (wireless network interface) for an established TCP connection from (CNN.com web server). After activating the listener you should work towards establishing the needed TCP connection in another shell window by doing something similar to the below depending on what the network device you are attempting to gain the entire route for. In the example below we will use telnet to open a connection to port 80 of the target IP address and then we will enter a command on the established connection that will generate some target/client traffic so we can accomplish our goal of obtaining the entire route.

Create Established TCP Connection To Target Device:


  1. root@bt:~/# telnet 80
  2. Trying
  3. Connected to
  4. Escape character is '^]'.
  5. GET / HTTP / 1.0
  7. telnet> quit
  8. Connection closed.
  9. root@bt:~/#

As you see above we first connected to port 80 via telnet which we followed with typing ‘GET / HTTP / 1.0’ and then hit enter twice a couple seconds apart. This should generate enough traffic to obtain the complete route information we wanted which is seen in the below example of our other shell window that is running the 0trace listener.

0trace Displaying Entire Route Info From Client To Target Device:


  1. root@bt:~# /usr/local/sbin/0trace.sh wlan0
  2. 0trace v0.01 PoC by <lcamtuf@coredump.cx>
  3. [+] Waiting for traffic from target on wlan0...
  4. [+] Traffic acquired, waiting for a gap...
  5. [+] Target acquired: -> (2048829642/3092775968).
  6. [+] Setting up a sniffer...
  7. [+] Sending probes...
  10. -------------
  11. 1
  12. 2
  13. 3
  14. 4
  15. 5
  16. 6
  17. 7
  18. Target reached.
  20. root@bt:~#

A quick explanation of the above shell output from 0trace. As displayed in one of the earlier shell outputs 0trace first sets up a listener waiting for an established TCP connection from the IP address of a target device. Once a TCP connection such as the telnet to port 80 of the target and some traffic is generated 0trace notes “Traffic aquired”. It doesn’t take a lot of time but the TCP connection must be established for at least a couple seconds and then 0trace will note the target is aquired and this is where the magic happens. 0trace will do its thing and provide the entire route from client to target IP address. If 0trace is successful in locating the entire route to the network device then “Target reached” will be displayed but if it is not then it will instead note “Probe rejected by target”. If you get the “Probe rejected by target” then you do not have a guarantee of the entire route to the target device even though numerous network hops may have been obtained.

Thats really it, 0trace is a simple yet very effective tool to obtain route information about network devices being protected by stateful firewalls and other such devices. I believe the tool was written by Michal Zalewski in 2007 so many thanks to him for a slick tool.

Gray Hat Hacking, Second Edition: The Ethical Hacker’s Handbook (Paperback)

List Price: $49.99
New From: $10.00 USD In Stock
Used from: $4.69 USD In Stock

Penetration Tester’s Open Source Toolkit, Vol. 2 (Paperback)

List Price: $61.95
New From: $14.50 USD In Stock
Used from: $0.01 USD In Stock