« | September 2025 | » | 日 | 一 | 二 | 三 | 四 | 五 | 六 | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | | | | | |
| 公告 |
暂无公告... |
Blog信息 |
blog名称: 日志总数:10 评论数量:0 留言数量:1 访问次数:26882 建立时间:2009年5月6日 |

| |
modsecurity规则分析 电脑与网络
iisutm2 发表于 2009/5/6 21:26:14 |
modsecurity规则分析
原文: http://www.iisutm.com/
modsecurity是一个非常不错的开源web应用防火墙项目,就像snort一样,其规则是开源社区一大财富,至少提供了一种描述web攻击防护规则的共同语言。现在提供modsecuirty规则的主要有modsecurity和getroot。这两天分析了一下这两个规则集,初步整理如下。规则来源及版本:getroot免费规则:http://downloads.prometheus-group.com/delayed/rules/modsec-200809221633.tar.gzmodsecurity core rule:http://www.modsecurity.org/download/modsecurity-core-rules_2.5-1.6.1.tar.gz 分析采用缺省规则进行,缺省注释掉没有启用的规则不分析。 getroot统计有效规则(含SecRule关键字的规则)5373条, modsecurity有效规则126条。分析包括参数(Variables)统计、变换函数(Transformation functions)统计和规则关联关系统计(chian,skip)。参数统计是统计出现次数,一条有效规则中可能出现几次,比如ARGS,一条规则可能出现多次,出现几次统计几次。变换函数一条规则中只只出现一次,因此和规则条数统计一致。关联关系统计是统计chain,skip,skipafter的次数,反应规则之间相互联系的统计。
统计结果如下:
getroot参数出现次数及排名:7959 ARGS3647 REQUEST_URI313 REQUEST_BODY250 url237 REQUEST_HEADERS199 params136 link96 Referer95 User-Agent86 id79 team77 redirect76 comment73 website73 return73 referrer72 referer71 ref71 body71 helpbox71 ureferrer71 refertoyouby70 bg_image70 imageFile70 media_gallery70 outbound70 product70 oaparams70 loc70 out70 filecontent70 images69 redirect_to69 ajaxurl69 base_url69 helpurl69 backurl69 serverurl68 refer68 siteurl68 introtext68 Post68 resource68 url2send68 basehref67 userpicpersonal67 fck_body67 attach-url66 last_msg66 referredby66 stories_cat66 fulltext66 sUrl66 thelink66 HOMEPAGE_URL66 texty66 view66 ATTACHMENTS_URL66 resource_box66 fck_brief66 comments_commentFind66 altTag66 pay_list_type66 areaContent266 FULL_URL66 linkdescr66 website_link66 _wp_original_http_referer66 products_image66 inc66 oldmsg66 templatePath65 request_url64 blog_url64 x_receipt_link_url64 lk_url64 clickurl64 return_link_url64 config_helpurl64 install_url
getroot规则变换函数及排名:262 urlDecode262 urlDecodeUni181 lowercase170 compressWhitespace135 htmlEntityDecode110 replaceNulls106 normalisePath100 hexDecod100 base64Decode21 replaceComments1 none1 length
getroot规则关联关系次数统计: 1649 chain
modsecurity变量出现次数统计及排名:68 REQUEST_HEADERS30 XML29 REQUEST_FILENAME29 ARGS22 RESPONSE_BODY22 ARGS_NAMES21 Referer8 User-Agent6 REQUEST_METHOD5 REQUEST_HEADERS_NAMES5 REQUEST_HEADERS5 Content-Length4 RESPONSE_STATUS3 REQUEST_COOKIES3 X-OS-Prefs3 Host3 REQUEST_COOKIES_NAMES3 REQUEST_LINE3 REQUEST_URI3 Cookie2 Content-Type2 Transfer-Encoding2 &GLOBAL2 REMOTE_ADDR2 Accept2 Content-Encoding2 via2 REQUEST_BODY2 REQUEST_PROTOCOL
modsecurity规则变换函数出现次数及排名:123 none62 lowercase47 htmlEntityDecode31 urlDecode30 urlDecodeUni24 compressWhitespace16 replaceComments2 length
modsecurity规则关联关系统计次数及排名:19 chain13 skip
|
|
|