找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 12380|回复: 20

[其它] 【原创】端口扫描检测 PSD 参数详解

[复制链接]
发表于 2008-11-11 21:42:14 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
PSD (Port scan detecting) 端口扫描检测技术是保护routeros路由器安全的一项有效技术。 扫描开放的端口往往是黑客攻击的第一步,比如NMAP就是很好的端口扫描工具。
   在RouterOS加入以下规则
   add chain=input protocol=tcp psd=21,3s,3,1 action=drop comment="detect and drop port scan connections" disabled=no 可以有效阻断外部ip对Routeros路由器的扫描。
   在winbox下的对应设置如下
    psd.jpg input.jpg drop.jpg

  Action中可以直接drop,或者先log,再drop, 还可以将对你进行的端口扫描的ip地址放入 address list,禁止这些ip对路由器的后续访问。

  但是 Psd=21,3s,3,1 这四个参数的具体含义又是什么呢?

  iptables的官方文档是这样描述的

第一个参数 21  -> Portscan detection weight threshold  (端口扫描检测权重阈值)

第二个参数 3s  -> Portscan detection delay threshold   (端口扫描检测延迟阈值)

第三个参数 3   -> Privileged ports weight              (1-1024端口权重)

第四个参数 1   -> High ports weight                    (1024以上端口权重)

可能很多人看了还是一头雾水,那我们看下该模块作者对这几个参数的解释
Simply for for default config: imagine a sequence of packets with the
same source IP and differen destination IP/Port with an time interval
between two successive packets < 3 sec.(delay-threshold) arriving a psd
protected host. The packets with dest port <= 1024 are rated with 3
(lo-ports-weight), others with 1 (hi-ports-weight). The weights of
successive packets will be added and if limit of 21 (weight-threshold)
is reached, i.e. after 7 packets to low ports or 21 packets to high ones
or some mixed form of it, a port scan will be reported.


我来翻译一下,假设有一台机器对你的RouteROS路由器的不同端口持续发送一系列数据包,每两个数据包之间的时间间隔不超过3秒,这些包的目的端口如果是1024以下端口,
那么权重就记为3,如果目的端口是1024以上端口,则权重记为1,这些连续的包的权重将会被累加,如果累加的值超过21,将会启用以上的端口扫描检测防火墙规则,其后续的数据包将会被丢弃。
也就是说,对低端口连续发送7个至不同端口的数据包,或者对高端口发送21个,或者其混合权重达到21,都会触发该防火墙规则。

21,3s,3,1是默认参数,理解了以上参数的详细内容以后,可以根据自己的特定需求对其进行修改。


---------------------------------------------------------------------------------------------------------------------
RouterOS  QQ高级交流群: 5278776

[ 本帖最后由 zhjchina 于 2008-11-12 02:16 编辑 ]
routeros
发表于 2008-11-12 00:27:03 | 显示全部楼层
不错,顶下
routeros
回复

使用道具 举报

发表于 2008-11-12 09:18:46 | 显示全部楼层
支持,,希望多发点这方面的文章
routeros
回复

使用道具 举报

发表于 2008-11-12 11:54:35 | 显示全部楼层
支持
routeros
回复

使用道具 举报

发表于 2008-11-12 11:59:53 | 显示全部楼层
收藏了。
routeros
回复

使用道具 举报

发表于 2008-11-12 13:43:59 | 显示全部楼层
这类贴得多顶顶~
routeros
回复

使用道具 举报

 楼主| 发表于 2008-11-13 01:43:27 | 显示全部楼层
自顶一下
routeros
回复

使用道具 举报

发表于 2008-11-13 08:18:21 | 显示全部楼层
谢谢!!!!!!
routeros
回复

使用道具 举报

发表于 2008-11-13 11:27:44 | 显示全部楼层
好文,记号下来,谢谢
routeros
回复

使用道具 举报

发表于 2008-11-21 10:10:53 | 显示全部楼层
很久没有的好文
routeros
回复

使用道具 举报

发表于 2008-11-23 22:47:08 | 显示全部楼层
好吧,我顶一下,刚试了一下,把我的winbox都给断了,我是从外网连的,没法了我得到机器上去操作了。
routeros
回复

使用道具 举报

发表于 2008-11-24 10:49:49 | 显示全部楼层
好文章,多谢分享
routeros
回复

使用道具 举报

发表于 2009-3-8 21:44:57 | 显示全部楼层
好文章,多谢分享
routeros
回复

使用道具 举报

发表于 2009-3-8 21:57:35 | 显示全部楼层
好文章,多谢分享
routeros
回复

使用道具 举报

发表于 2009-3-8 21:58:03 | 显示全部楼层
又学会了点东西
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-5-3 05:44 , Processed in 0.088835 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

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