Information Gatheringtraceroutetcpnetworkbypassfirewall

0trace

Traceroute tool that runs within an existing TCP connection. Bypasses some types of stateful packet filters.

Description

0trace is a traceroute tool designed to operate within an existing, open TCP connection. This capability allows it to bypass certain stateful packet filters that would typically block traditional traceroute probes. The tool is particularly useful in environments with strict firewall rules that inspect and drop unsolicited packets.

Use cases include network reconnaissance where standard traceroute tools fail due to firewall restrictions. By piggybacking on established TCP sessions, 0trace can map network paths without triggering filter alerts. It consists of multiple components including 0trace.sh, sendprobe, and usleep.

The package has a small installed size of 43 KB and depends on libc6 and tcpdump. It is pre-packaged for Kali Linux, enabling quick deployment for penetration testing and network diagnostics.

How It Works

0trace leverages an existing TCP connection to send traceroute probes, avoiding detection by stateful firewalls. The primary script 0trace.sh takes an interface, target IP, and optional target port to initiate probes over the open session. sendprobe handles packet crafting with source IP, destination IP, source port, destination port, sequence, and acknowledgment numbers. usleep provides microsecond-precision delays for timing control during probe transmission.

Installation

bash
sudo apt install 0trace

Flags

-hShow usage help for 0trace.sh
ifaceNetwork interface to use
target_ipTarget IP address
target_portOptional target port
src_ipSource IP for sendprobe
dst_ipDestination IP for sendprobe
sportSource port for sendprobe
dportDestination port for sendprobe
seqTCP sequence number for sendprobe
ackTCP acknowledgment number for sendprobe

Examples

Display usage help for 0trace.sh
0trace.sh -h
Run traceroute to 192.168.1.1 using eth0 interface (default port)
0trace.sh eth0 192.168.1.1
Run traceroute to 192.168.1.1 port 80 using eth0 interface
0trace.sh eth0 192.168.1.1 80
Display usage help for sendprobe
sendprobe -h
Send probe packet from 192.168.1.100 to 8.8.8.8:80 with source port 12345, seq 1, ack 0
sendprobe 192.168.1.100 8.8.8.8 12345 80 1 0
Send probe with custom source/dest IPs, ports, seq, and ack values
sendprobe 10.0.0.1 10.0.0.254 54321 22 1000 2000
Suspend execution for 100000 microseconds (0.1 seconds)
usleep 100000
Suspend execution for 50000 microseconds (0.05 seconds) for fine-grained timing
usleep 50000
Updated 2026-04-16kali.org ↗