找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5539|回复: 8

我对付网络尖兵 161 端口扫描的办法

[复制链接]
发表于 2007-11-16 10:22:32 | 显示全部楼层 |阅读模式

先添加这些规则
modify fwl global  blistprotect enable attackprotect enable dosprotect enable blistperiod 5 maxtcpconn 10 maxicmpconn 12 maxsinglehostconn 15

create ipf rule entry ruleid 510 ifname public dir in transprot eq num 6 destport eq num 161 log enable seclevel high medium low blistprotect enable logtag "DenyTCP161"
create ipf rule entry ruleid 512 ifname public dir in transprot eq num 17 destport eq num 161 log enable seclevel high medium low blistprotect enable logtag "DenyUDP161"
create ipf rule entry ruleid 600 ifname public dir in transprot eq num 1 seclevel high medium low blistprotect enable logtag "ICMP hack"
modify ipf global  seclevel low pubdefact accept dmzdefact accept
然后在防火墙设置里,把黑名单状态,设为允许,这样只要有人扫描你的161端口,就会自动加入黑名单,过了blistperiod 设定的时间,才能重新访问。
snmp用的是udp协议,不过我没有UDP的扫描工具,所以把TCP协议也加上,好测试。
create alg port portno 161 prot num 17 algtype snmp
下面是测试结果:
$get fwl blacklist
IP Address      Blacklist Reason    RuleId     Time Left(sec)
-------------------------------------------------------------
58.60.30.33     DenyTCP161          510        297
121.35.145.216  DenyTCP161          510        409
大家不妨可以扫描一下我的Modem试试,域名是 adscrz.3322.org
大家还有好多主意对付 网络尖兵,欢迎讨论 adscrz@163.com
谢谢!
 楼主| 发表于 2007-11-16 10:29:17 | 显示全部楼层

我对付网络尖兵 161 端口扫描的办法

但是对于以下这些扫描就没有办法了,有高手可以指点一下吗?
$get fwl stats
Sessions Used          : 78         ICMP Sessions       : 0
Half Open TCP Sessions : 0
Attack type        Time stamp at last log         After Log     Total
                   (Day Mon date HH:MM:SS YYYY)   (count)       (count)
-----------------------------------------------------------------------
TCP Sess Scan       Fri Nov 16 10:00:01 2007      7            28
TCP SYN ACK Scan    Fri Nov 16 09:50:37 2007      3            9
TCP ACK Scan        Fri Nov 16 10:18:41 2007      11           94
TCP RST Scan        Fri Nov 16 10:00:13 2007      15           47
UDP Scan            Fri Nov 16 09:55:29 2007      139          1235
 楼主| 发表于 2007-11-16 11:17:30 | 显示全部楼层

我对付网络尖兵 161 端口扫描的办法

刚刚又逮住2个IP:
$get fwl blacklist
IP Address      Blacklist Reason    RuleId     Time Left(sec)
-------------------------------------------------------------
58.60.30.33     DenyTCP161          510        169289
121.35.145.216  DenyTCP161          510        169401
203.213.183.181 ICMP hack           600        171861  (日本)
219.138.167.202 ICMP hack           600        171188  (湖北)
发表于 2007-11-17 11:43:11 | 显示全部楼层

我对付网络尖兵 161 端口扫描的办法

我是菜鸟,你能否讲详细点呀,看不大懂
发表于 2007-11-17 11:45:59 | 显示全部楼层

我对付网络尖兵 161 端口扫描的办法

我是菜鸟,你能否讲详细点呀,看不大懂。你写的规则要放在哪儿?你说的防火墙是windows自带的防火墙,还是别的?
发表于 2007-11-17 13:19:08 | 显示全部楼层

我对付网络尖兵 161 端口扫描的办法

电信早升级了,别误人子弟了。。
 楼主| 发表于 2007-11-17 23:19:11 | 显示全部楼层

我对付网络尖兵 161 端口扫描的办法

那请问这位“蓝眼睛 ”朋友,现在电信用什么来检测网络共享的呢?
发表于 2007-11-18 03:02:35 | 显示全部楼层

我对付网络尖兵 161 端口扫描的办法

包跟踪
 楼主| 发表于 2007-11-19 09:59:19 | 显示全部楼层

我对付网络尖兵 161 端口扫描的办法

以上是网络上最常见的一篇关于网络尖兵的文章,可以让大家对它有个初步了解。以下,我将收集整理一些各地网友讨论的破解方法,以供大家参考。
在软件路有论坛(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的技术的话,在目前是没有办法破解掉的。

*滑块验证:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|宽带技术网 |网站地图 粤公网安备44152102000001号

GMT+8, 2025-5-15 21:10 , Processed in 0.031273 second(s), 4 queries , Redis On.

Powered by Discuz! X3.5 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表