神秘的互联网之旅---探测ISP包过滤系统
- 原理:通过指定IP头部中的TTL值,以及结合TCP路由跟踪和IP选项字段记录路由的特性来查找---ISP的包过滤系统
- 也可用于决定在哪一跳上ISP封了ICMP协议
- .nping --icmp -tr 121.10.122.100 or(tracert -d 121.10.122.100) ICMP traceroute ICMP路由跟踪
- 相关文件:icmptraceroute.pcap and icmptraceroute.jpg
- 1 <1 ms <1 ms <1 ms 192.168.1.1
- 2 2 ms 1 ms 1 ms x.x.x.x
- 3 1 ms 2 ms 1 ms x.x.x.x
- 4 2 ms 2 ms 2 ms x.x.x.x
- 5 1 ms 1 ms 2 ms x.x.x.x
- 6 3 ms 3 ms 3 ms x.x.x.x
- 7 4 ms 3 ms 4 ms 183.59.6.1
- 8 12 ms 12 ms 12 ms 183.59.6.182
- 9 21 ms 13 ms 14 ms 113.107.116.98
- 10 88 ms 17 ms 13 ms 121.10.116.185
- 11 ^C
- 2.nping --tr --tcp -p 80 121.10.122.100 TCP traceroute TCP路由跟踪
- tcptracoute.pcap and tcptracoute.jpg
- SENT (0.2500s) TCP 192.168.1.169:64448 > 121.10.122.100:80 S ttl=1 id=6587 iplen=40 seq=2792625429 win=1480
- RCVD (0.2970s) ICMP 192.168.1.1 > 192.168.1.169 TTL=0 during transit (type=11/code=0) ttl=128 id=59874 iplen=68
- SENT (1.2820s) TCP 192.168.1.169:64448 > 121.10.122.100:80 S ttl=2 id=6587 iplen=40 seq=2792625429 win=1480
- RCVD (1.2970s) ICMP x.x.x.x > 192.168.1.169 TTL=0 during transit (type=11/code=0) ttl=254 id=0 iplen=72
- SENT (2.2820s) TCP 192.168.1.169:64448 > 121.10.122.100:80 S ttl=3 id=6587 iplen=40 seq=2792625429 win=1480
- RCVD (2.2970s) ICMP x.x.x.x > 192.168.1.169 TTL=0 during transit (type=11/code=0) ttl=253 id=0 iplen=72
- SENT (3.2820s) TCP 192.168.1.169:64448 > 121.10.122.100:80 S ttl=4 id=6587 iplen=40 seq=2792625429 win=1480
- SENT (4.2820s) TCP 192.168.1.169:64448 > 121.10.122.100:80 S ttl=5 id=6587 iplen=40 seq=2792625429 win=1480
- RCVD (4.2970s) ICMP x.x.x.x > 192.168.1.169 TTL=0 during transit (type=11/code=0) ttl=250 id=0 iplen=56
- SENT (5.2820s) TCP 192.168.1.169:64448 > 121.10.122.100:80 S ttl=6 id=6587 iplen=40 seq=2792625429 win=1480
- RCVD (5.2970s) ICMP x.x.x.x > 192.168.1.169 TTL=0 during transit (type=11/code=0) ttl=249 id=0 iplen=56
- SENT (6.2820s) TCP 192.168.1.169:64448 > 121.10.122.100:80 S ttl=7 id=6587 iplen=40 seq=2792625429 win=1480
- RCVD (6.2970s) ICMP 183.59.6.9 > 192.168.1.169 TTL=0 during transit (type=11/code=0) ttl=249 id=16669 iplen=56
- SENT (7.2820s) TCP 192.168.1.169:64448 > 121.10.122.100:80 S ttl=8 id=6587 iplen=40 seq=2792625429 win=1480
- RCVD (7.2970s) ICMP 183.59.6.182 > 192.168.1.169 TTL=0 during transit (type=11/code=0) ttl=248 id=33622 iplen=56
- SENT (8.2820s) TCP 192.168.1.169:64448 > 121.10.122.100:80 S ttl=9 id=6587 iplen=40 seq=2792625429 win=1480
- RCVD (8.2970s) ICMP 113.107.116.98 > 192.168.1.169 TTL=0 during transit (type=11/code=0) ttl=247 id=61219 iplen=56
- SENT (9.2820s) TCP 192.168.1.169:64448 > 121.10.122.100:80 S ttl=10 id=6587 iplen=40 seq=2792625429 win=1480
- RCVD (9.2970s) ICMP 121.10.116.185 > 192.168.1.169 TTL=0 during transit (type=11/code=0) ttl=248 id=37746 iplen=56
- SENT (10.2820s) TCP 192.168.1.169:64448 > 121.10.122.100:80 S ttl=11 id=6587 iplen=40 seq=2792625429 win=1480
- RCVD (10.2970s) ICMP 113.107.100.14 > 192.168.1.169 TTL=0 during transit (type=11/code=0) ttl=247 id=14822 iplen=56
- SENT (11.2820s) TCP 192.168.1.169:64448 > 121.10.122.100:80 S ttl=12 id=6587 iplen=40 seq=2792625429 win=1480
- RCVD (11.2970s) TCP 121.10.122.100:80 > 192.168.1.169:64448 SA ttl=119 id=5452 iplen=52 seq=238308353 win=16384
- ^C
- 3.nping -c 1 --icmp --icmp-type 8 --icmp-code 0 --ttl 1 121.10.122.100 TTL value +1 ICMP ping请求每次TTL值增加1,用来探测在哪一跳,ISP放置了包过滤系统(说不定是GFW哦,嘻嘻)
- 相关文件:TTl1-3.pcap and TTl1-3.jpg
- 4.nping -c 1 --icmp --icmp-type 8 --icmp-code 0 --ttl 10 121.10.122.100 ICMP ping请求指定TTL值为10,正常的话如果没有收到TTL值达到限制(Time-to-live exceeded)的包的话,那么就说明ISP在这一跳放置了包过滤系统或者路由器不处理ICMP包
- 解释下Time-to-live exceeded:当路由器在处理数据包的过程中,如果将IP头部中的TTL值减一后TTL值为0,那么路由器就会将这个包丢弃,并发送
- ICMP type 11 and icmp code 0的数据包,返回给源主机,报告TTL过期,数据包被丢弃了。。。
- nping -c 1 --icmp --icmp-type 8 --icmp-code 0 --ttl 11 121.10.122.100 ICMP ping请求指定TTL值为11
- 相关文件:TTl10-11.pcap and TTl10-11.jpg
- 5.nping -c 2 --icmp --icmp-type 8 --icmp-code 0 --ip-options R --ttl 10 121.10.122.100
- nping -c 2 --icmp --icmp-type 8 --icmp-code 0 --ip-options R --ttl 10 121.10.122.100
- the server replyed ....
- so in the 10 hop and the 11 hop have a ISP filters(GFW)
- 相关文件:TTL-ip-option10-11.pcap and TTL-ip-option10-11.jpg
由于隐私的关系所以PCAP暂时不能给出,需要的可以E-mail我。。。