netsniff-ng 0.5.8-rc5
[netsniff-ng.git] / astraceroute.8
blobdd33985ba8f10cf239f17a83336c9f237ea85a05
1 .\" netsniff-ng - the packet sniffing beast
2 .\" Copyright 2013 Daniel Borkmann.
3 .\" Subject to the GPL, version 2.
4 .PP
5 .TH ASTRACEROUTE 8 "03 March 2013" "Linux" "netsniff-ng toolkit"
6 .SH NAME
7 astraceroute \- autonomous system trace route utility
8 .PP
9 .SH SYNOPSIS
10 .PP
11 \fBastraceroute\fR [\fIoptions\fR]
12 .PP
13 .SH DESCRIPTION
14 astraceroute is a small utility to retrieve path information in a traceroute
15 like way, but with additional geographical location information. It tracks the
16 route of a packet from the local host to the remote host by successively
17 increasing the IP's TTL field, starting from 1, in the hope that each intermediate
18 node will send an ICMP TIME_EXCEEDED notification back to the local host when the
19 TTL value is decremented to 0.
20 .PP
21 astraceroute supports IPv4 and IPv6 queries and will display country and city
22 information, if available, the AS number the hop belongs to, and its
23 ISP name. astraceroute also displays timing information and reverse DNS data.
24 .PP
25 Due to astraceroute's configurability, it is also possible to gather some more
26 useful information about the hop regarding what it does and does not allow to pass
27 through. This is done by using clear text strings for probing DPIs or
28 ''great firewalls'' to determine if they will filter out blacklisted critical
29 keywords. This tool might be a good start for further in-depth analysis of such
30 systems.
31 .PP
32 .SH OPTIONS
33 .PP
34 .SS -H <host>, --host <host>
35 Hostname or IPv4 or IPv6 address of the remote host where the AS route should
36 be traced to. In the case of an IPv6 address or host, option ''\-6'' must be
37 used. IPv4 is the default.
38 .PP
39 .SS -p <port>, --port <port>
40 TCP port for the remote host to use. If not specified, the default
41 port used is 80.
42 .PP
43 .SS -i <device>, -d <device>, --dev <device>
44 Networking device to start the trace route from, e.g. eth0, wlan0.
45 .PP
46 .SS -b <IP>, --bind <IP>
47 IP address to bind to other than the network device's address. You must specify
48 ''\-6'' for an IPv6 address.
49 .PP
50 .SS -f <ttl>, --init-ttl <ttl>
51 Initial TTL value to be used. This option might be useful if you are not
52 interested in the first n hops, but only the following ones. The default
53 initial TTL value is 1.
54 .PP
55 .SS -m <ttl>, --max-ttl <ttl>
56 Maximum TTL value to be used. If not otherwise specified, the maximum
57 TTL value is 30. Thus, after this has been reached astraceroute exits.
58 .PP
59 .SS -q <num>, --num-probes <num>
60 Specifies the number of queries to be done on a particular hop. The
61 default is 2 query requests.
62 .PP
63 .SS -x <sec>, --timeout <sec>
64 Tells astraceroute the probe response timeout in seconds, in other words
65 the maximum time astraceroute must wait for an ICMP response from the current
66 hop. The default is 3 seconds.
67 .PP
68 .SS -X <string>, --payload <string>
69 Places an ASCII cleartext string into the packet payload. Cleartext that
70 contains whitespace must be put into quotes (e.g.: "censor me").
71 .PP
72 .SS -l <len>, --totlen <len>
73 Specifies the total length of the packet. Payload that does not have a
74 cleartext string in it is padded with random garbage.
75 .PP
76 .SS -4, --ipv4
77 Use IPv4 only requests. This is the default.
78 .PP
79 .SS -6, --ipv6
80 Use IPv6 only requests. This must be used when passing an IPv6 host as an
81 argument.
82 .PP
83 .SS -n, --numeric
84 Tells astraceroute to not perform reverse DNS lookup for hop replies. The
85 reverse option is ''\-N''.
86 .PP
87 .SS -u, --update
88 The built-in geo-database update mechanism will be invoked to get Maxmind's
89 latest version. To configure search locations for databases, the file
90 /etc/netsniff-ng/geoip.conf contains possible addresses. Thus, to save bandwidth
91 or for mirroring Maxmind's databases (to bypass their traffic limit policy),
92 different hosts or IP addresses can be placed into geoip.conf, separated by
93 a newline.
94 .PP
95 .SS -L, --latitude
96 Also show latitude and longitude of hops.
97 .PP
98 .SS -N, --dns
99 Tells astraceroute to perform reverse DNS lookup for hop replies. The
100 reverse option is ''\-n''.
102 .SS -S, --syn
103 Use TCP's SYN flag for the request.
105 .SS -A, --ack
106 Use TCP's ACK flag for the request.
108 .SS -F, --fin
109 Use TCP's FIN flag for the request.
111 .SS -P, --psh
112 Use TCP's PSH flag for the request.
114 .SS -U, --urg
115 Use TCP's URG flag for the request.
117 .SS -R, --rst
118 Use TCP's RST flag for the request.
120 .SS -E, --ecn-syn
121 Use TCP's ECN flag for the request.
123 .SS -t <tos>, --tos <tos>
124 Explicitly specify IP's TOS.
126 .SS -G, --nofrag
127 Set IP's no fragmentation flag.
129 .SS -Z, --show-packet
130 Show and dissect the returned packet.
132 .SS -v, --version
133 Show version information and exit.
135 .SS -h, --help
136 Show user help and exit.
138 .SH USAGE EXAMPLE
140 .SS astraceroute -i eth0 -N -S -H netsniff-ng.org
141 This sends out a TCP SYN probe via the ''eth0'' networking device to the
142 remote IPv4 host netsniff-ng.org. This request is most likely to pass. Also,
143 tell astraceroute to perform reverse DNS lookups for each hop.
145 .SS astraceroute -6 -i eth0 -S -E -N -H www.6bone.net
146 In this example, a TCP SYN/ECN probe for the IPv6 host www.6bone.net is being
147 performed. Also in this case, the ''eth0'' device is being used as well as a
148 reverse DNS lookup for each hop.
150 .SS astraceroute -i eth0 -N -F -H netsniff-ng.org
151 Here, we send out a TCP FIN probe to the remote host netsniff-ng.org. Again,
152 on each hop a reverse DNS lookup is being done and the queries are transmitted
153 from ''eth0''. IPv4 is used.
155 .SS astraceroute -i eth0 -N -FPU -H netsniff-ng.org
156 As in most other examples, we perform a trace route to IPv4 host netsniff-ng.org
157 and do a TCP Xmas probe this time.
159 .SS astraceroute -i eth0 -N -H netsniff-ng.org -X "censor-me" -Z
160 In this example, we have a Null probe to the remote host netsniff-ng.org, port
161 80 (default) and this time, we append the cleartext string "censor-me" into the
162 packet payload to test if a firewall or DPI will let this string pass. Such a trace
163 could be done once without, and once with, a blacklisted string to gather possible
164 information about censorship.
166 .SH NOTE
167 If a TCP-based probe fails after a number of retries, astraceroute will
168 automatically fall back to ICMP-based probes to pass through firewalls
169 and routers used in load balancing for example.
171 To gather more information about astraceroute's displayed AS numbers, see e.g.:
172 http://bgp.he.net/AS<number>.
174 .SH BUGS
175 The geographical locations are estimated with the help of Maxmind's GeoIP
176 database and can differ from the real physical location. To decrease the
177 possible errors, update the database regularly using astraceroute's \-\-update
178 option.
180 At some point in time, we need a similar approach to gather more reliable path
181 information such as in the paris-traceroute tool.
183 Due to the generic nature of astraceroute, it currently has a built-in mechanism
184 to stop the trace after a fixed number of hops, since the configurable TCP flags
185 can have anything included. It is possible to decrease this number of course.
186 In the future, if a SYN probe is sent out, there should be a listener so that we can
187 stop the trace if we detect a handshake in progress.
189 .SH LEGAL
190 astraceroute is licensed under the GNU GPL version 2.0.
192 .SH HISTORY
193 .B astraceroute
194 was originally written for the netsniff-ng toolkit by Daniel Borkmann. It
195 is currently maintained by Tobias Klauser <tklauser@distanz.ch> and Daniel
196 Borkmann <dborkma@tik.ee.ethz.ch>.
198 .SH SEE ALSO
199 .BR netsniff-ng (8),
200 .BR trafgen (8),
201 .BR mausezahn (8),
202 .BR ifpps (8),
203 .BR bpfc (8),
204 .BR flowtop (8),
205 .BR curvetun (8)
207 .SH AUTHOR
208 Manpage was written by Daniel Borkmann.
210 .SH COLOPHON
211 This page is part of the Linux netsniff-ng toolkit project. A description of the project,
212 and information about reporting bugs, can be found at http://netsniff-ng.org/.