以上是网络上最常见的一篇关于网络尖兵的文章,可以让大家对它有个初步了解。以下,我将收集整理一些各地网友讨论的破解方法,以供大家参考。
在软件路有论坛(http://www.routerclub.com),我找到了关于NAT(即大家说的路由共享)检测技术的相关介绍。( http://www.routerclub.com/viewthread.php?tid=4075&extra=&page=1)
NAT检测技术来源:http://www.sflow.org/detectNAT/
以及思科的NAT 检测的功能介绍:
http://www.cisco.com/en/US/products/sw/ios...0080110ae9.html
大体上主要是以下技术:
The NAT detection technique is based on two observations about the IP TTL (Time To Live) field.
Host operating systems have characteristic initial TTL values. This property of individual operating system implementations of TCP/IP is well known and can be used as part of a "fingerprint" to identify the operating system that a host is running merely by examining its traffic. The technique is well described in Passive OS Fingerprinting: Details and Techniques by Toby Miller.
NAT devices or gateways decrement the TTL on packets that they forward.
sFlow provides a stream of sampled packet headers captured at the two switches. These packet headers can be decoded and IP source addresses and TTL values can be extracted.
Suppose all the hosts use the Windows operating system, each host would then generate IP packets with a TTL value of 128. Since the TTL value is decremented each time the packet traverses a router, a packet seen at the firewall from Host C would always have a TTL of 127. Similarly, a packet from Host C seen by the other switch (Switch 10.10.49.204) would also have a TTL of 127. However, the switch connecting Host C to the network (Switch 10.10.67.1) should always see a TTL of 128. The algorithm for detecting NAT routers relies on the observation that switches directly connected to a host, or in the same subnet as a host, will always see packets from the host with a TTL that is characteristic of the host operating system.
In this example the sFlow Analyzer would see a TTL of 127 when examining packets sampled by switch 10.10.49.1 that apparently originated from "host" 10.10.49.1. The TTL values in packets from Hosts A and B are decremented by the NAT router before they are passed to the switch, revealing the existence of the router.
The effectiveness of this algorithm is easily demonstrated using sFlow data from a production network.
中文介绍:
sFlow步入实用
一项不太为人所知的实时网络监测标准,将为高速网络用户带来价值。
尽管IETF的sFlow草案标准已经公布多年了,但还没有几家厂商实施它。专家和用户表示,随着一些企业中的网络传输流速度增加到千兆和万兆,sFlow将成为跟踪网络性能和提供网络安全的一种越来越重要的工具。
2001年被IETF批准成为一项草案标准的sFlow是一种网络监测技术,它利用对整个网络上传送的局域网和广域网数据包流的随机采样,让用户详细、实时地掌握网络传输流的性能、趋势和问题。
网络监测功能一般是通过将网络探测器设备(如运行探测器软件的PC或专用设备)安装在网络的某一网段上采集数据实现的。探测器常常被插入到局域网交换机上的镜像端口中,即被配置为复制来自交换机上另一个端口的传输流的端口。探测器将只能够从镜像端口采集传输流数据。
sFlow被部署在运行于网络中实际的交换机和路由器上的各个网络管理信息库中(MIB)中,MIB是基于硬件或基于软件的代理。sFlow支持者表示,这样做可以更全面地展示网络性能。监测发生在每台具有sFlow功能的交换机的每一个端口上,而不是只出现连接探测器的端口或网段上。
sFlow MIB对流经端口的数据包随机采样,而不是捕获和记录交换机或路由器端口上的每一个数据包。这些叫做sFlow数据报的样本被转发给网络上的一台sFlow采集服务器。在这台服务器上,样本数据报利用一种算法进行处理,算法根据采样的数据建立网络传输流的完整模型。
sFlow背后的技术是由交换机监测软件生产商InMon的工程师、HP以及Foundry Networks的开发人员联合开发的。将sFlow技术应用在局域网交换机中的厂商包括HP、Foundry和 Extreme Networks。HP OpenView、NetScout的nGenius Performance Manager 和InMon Traffic Server等产品中提供了对sFlow的软件支持。
sFlow应用实例
在佛罗里达州Tampa市的Moffit癌症中心中,具有sFlow功能的交换机被用于测量网络性能以及用作一种安全工具。该中心表示,“sFlow为其提供了网络中每一个端口的实时网络统计数据。有关传输流模式信息的详细程度非常高,详细到了协议和端口级。如果网络上有人做错了什么事,你可以跟踪他们,一直找到他们插入PC的地方。”
Kingdon Capital Management是纽约一家小型对冲基金公司,该公司也计划使用sFlow。在其网络上传输着很多的实时数据,这种实时数据流基本是由平均价值为每笔1千万美元的交易构成的,他们希望sFlow能更好地了解网络性能的总体情况。了解更多的数据包和协议专有信息的能力将会对其有更大的帮助,它将使该公司可以得到比通常得到的信息更加详细的内容。
安全功能
一些专家表示,除了提供网络性能的实时快照外,sFlow还可被用作一种网络安全工具。检测作为网络地址翻译(NAT)设备的未经授权的网络设备就是一个例子。sFlow草案标准作者、InMon公司工程师Peter Phaal表示,这可能包括一台具有NAT功能的普通无线路由器。尽管连接到网络上的NAT设备也许看似合法的端点节点,但这些设备可能成为有线或无线用户的后门,提供对未经授权的连接访问。
由于sFlow对来自网络中每一个端口的数据流进行采样,sFlow数据分析器可以通过比较交换机和NAT设备间的子网数据,识别网络中作为NAT设备的节点。
该论坛高手支招:
可以击败网络尖兵了
Each of these methods can be easily defeated through better sterilization by the router itself. In the first example, if the TTL for each TCP packet was re-written by the router for each packet to the value of 128, the first method would no longer function. For the second method, sterilizing IP header information and stripping unneeded TCP flags would successfully undermine this scheme. For the last Method, counting hosts behind a router. Striping the fragmentation flag for syn packets, and setting the IP ID to ';0';, (like Linux and Free BSD both do) would make it impossible to count hosts behind a NAT router.
在第一个例子,如果所有的tcp包通过iptables重新把TTL写为128,就可以破解掉了。
在第二种方法,清除IP头的信息和抽取掉不需要的TCP标记,也可以完美的破解掉
在第三种方法,剥离破碎的syn包的标记,设置IP的ID为“0”,也使它无法计算出在NAT后面的主机有多少台。
猜测认为网络尖兵只使用了比较TTL的技术,所以可以很容易的破解掉!!而如果是用cisco的接入设备的话,可能需要三者同时兼顾才行!
本来以为有希望了,可是该高手又发了回帖:
络尖兵监测的是ip包的指纹特征,我查了国外很多资料,只有:
http://ippersonality.sourceforge.net/
提供的包可以重新定义所有包的特征,如:把linux下发出的包伪装为windows发出的包。使nmap也探测不出来,更不用说用网络尖兵了。
不过http://ippersonality.sourceforge.net/这个项目好象在2年前已经停止了。
我用它提供的patch来进行编译的时候会报错。
所以目前用http://ippersonality.sourceforge.net/的解决办法是不可行了。
待我慢慢查查资料,或许大家可以帮帮我。
另外:网络尖兵最可能使用的技术就是探测IP包的ID 数值来判断NAT后面有多少台主机。而win系统产生的ID是根据系统时间产生而递增的。linux系统的ID值为0,openbsd系统的ID是随机的。
又看了一篇文章:
http://www.dslreports.com/shownews/27754
Re: Just use a tweak tool and up your TTL by 1?
This is NOT the TTL they are talking about, it';s the ID portion of the the IP packet header.
Look at the following RFC »
www.faqs.org/rfcs/rfc791.html
which explains the IP packet. Page 8 has a diagram of the sections of the packet, and Page 10 talks about the identificaition section of the packet.
When a machine sends out packets, they put a number (somewhat random) into this section of the packet, and incrament it for each packet after that. This helps the reciever put the packets back into the proper order (this is needed because not all packets always take the same route, so some later packets can actually arrive before earlier packets, so they need something to identify what order then need to be reassembled in)
Mangling this CAN be done, but some higher end firewalls and Linux type NAT boxes, but they have to track it in a very percise order, to make sure that the packets ID numbers still make some sense.
This method of identifying multiple machines works by relaying on the fact that each machine will be sending out packets in order, but will be in different number ranges. I.E. if you see 9 packets, and 3 have IDs of 55,56,57, 3 have ID';s of 1001, 1002, 1003, and 3 have ID';s on 50000,50001,50002, you can sort of determine that there are 3 machines. It';s a bit more complex then this, but this is an simplification.
--NetGeek
--
如果网络尖兵不只采用检测ttl的技术的话,在目前是没有办法破解掉的。
|