9 Haziran 2011 Perşembe

02/28 - A description on how to use the Firewalk network tool

Firewalk is an active reconnaissance network security tool that attempts to determine what layer 4 protocols a given IP forwarding device will pass. Firewalk works by sending out TCP or UDP packets with a TTL one greater than the targeted gateway. If the gateway allows the traffic, it will forward the packets to the next hop where they will expire and elicit an ICMP_TIME_EXCEEDED message. If the gateway host does not allow the traffic, it will likely drop the packets on the floor and we will see no response.

To get the correct IP TTL that will result in expired packets one beyond the gateway we need to ramp up hop-counts. We do this in the same manner that traceroute works. Once we have the gateway hopcount (at that point the scan is said to be `bound`) we can begin our scan.

It is significant to note the fact that the ultimate destination host does not have to be reached. It just needs to be somewhere downstream, on the other side of the gateway, from the scanning host.

Here is the usage information:
Firewalk 5.0 [gateway ACL scanner]
Usage : firewalk [options] target_gateway metric
[-d 0 - 65535] destination port to use (ramping phase)
[-h] program help
[-i device] interface
[-n] do not resolve IP addresses into hostnames
[-p TCP | UDP] firewalk protocol
[-r] strict RFC adherence
[-S x - y, z] port range to scan
[-s 0 - 65535] source port
[-T 1 - 1000] packet read timeout in ms
[-t 1 - 25] IP time to live
[-v] program version
[-x 1 - 8] expire vector

And here is an example on how to use it. We first do a traceroute to www.google.com
[me@host ~]$ traceroute -n www.google.com
traceroute: Warning: www.google.com has multiple addresses; using 66.249.91.103
traceroute to www.l.google.com (66.249.91.103), 30 hops max, 38 byte packets
1 * * *
2 * * *
3 195.69.144.247 0.959 ms 1.102 ms 0.933 ms
4 209.85.248.88 0.957 ms 1.325 ms 209.85.248.93 1.106 ms
5 64.233.175.246 3.876 ms 209.85.248.79 3.908 ms 3.772 ms
6 72.14.233.77 5.032 ms 4.967 ms 5.123 ms
7 66.249.94.146 8.294 ms 7.444 ms 7.198 ms
8 66.249.91.103 5.305 ms 5.328 ms 5.375 ms

So now we will look which ports are not filtered by the last hop (6.249.94.146):
[me@host ~]# firewalk -n -p tcp -s 80 -d 80 66.249.94.146 66.249.91.103
Firewalk 5.0 [gateway ACL scanner]
Firewalk state initialization completed successfully.
TCP-based scan.
Ramping phase source port: 80, destination port: 80
Hotfoot through 66.249.94.146 using 66.249.91.103 as a metric.
Ramping Phase:
1 (TTL 1): *no response*
2 (TTL 2): *no response*
3 (TTL 3): expired [195.69.144.247]
4 (TTL 4): expired [209.85.248.88]
5 (TTL 5): expired [209.85.248.79]
6 (TTL 6): expired [72.14.233.77]
7 (TTL 7): expired [66.249.94.146]
Binding host reached.
Scan bound at 8 hops.
Scanning Phase:
port 1: *no response*
port 2: *no response*
.
.
port 79: *no response*
port 80: A! open (port listen) [66.249.91.103]
port 81: *no response*
.
.
port 112: *no response*
port 113: A! open (port not listen) [66.249.91.103]
port 114: *no response*
.
.
port 1025: *no response*

Scan completed successfully.

Total packets sent: 139
Total packet errors: 0
Total packets caught 20
Total packets caught of interest 8
Total ports scanned 132
Total ports open: 2
Total ports unknown: 0

So we see that the router before www.google.com will allow access to www.google.com on port 80 and port 113, although port 113 is not listening on the host www.google.com.


View the original article here


This post was made using the Auto Blogging Software from WebMagnates.org This line will not appear when posts are made after activating the software to full version.

Hiç yorum yok:

Yorum Gönder