zoukankan      html  css  js  c++  java
  • Snort规则中的逻辑关系

    0x01

    看一条规则
    alert tcp any any -> any any (content:"union";http_uri;nocase;content:"select":nocase;http_uri;)
    下面这两条会触发哪一条?
    http://foo.com?id=union select
    http://foo.com?id=select union
    实验结果是都会触发。
    这个实验说明content如果不加distance之类的修饰符的话,多个content匹配是没有顺序的。

    0x02

    再看一条规则
    alert tcp any any -> any any (content:"union";http_uri;nocase;content:"select":nocase;http_uri; pcre:"/unions+(alls+)?selects+/Ui";)
    还是这两条规则:
    http://foo.com?id=union select
    http://foo.com?id=select union
    实验结果是只会触发第一条。
    这说明,不同关键词之间(比如content和pcre)是“逻辑与”的关系。

    0x03

    最后一条规则
    alert tcp any any -> any any (content:"union";http_uri;nocase;content:"s3l3ct":nocase;http_uri; pcre:"/unions+(alls+)?selects+/Ui";)
    发现上面两条都匹配不到了,说明所有关键词之间都是“逻辑与”的关系。



    文/小天是我见过最单纯善良的人(简书作者)
    原文链接:http://www.jianshu.com/p/9d11a3e039e9
    著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。
  • 相关阅读:
    30 个最好的jQuery表单插件
    Jquery Tools——不可错过的Jquery UI库(三)
    RedHat Linux AS5安装Oracle 10g 及常见问题
    老婆一直在你身旁,写给咱们的孩子
    又一篇关于中航信的文章
    Java自定义异常
    php文件复制升级
    PHP文件复制
    hdu 2428
    hdu 1358 KMP的应用
  • 原文地址:https://www.cnblogs.com/UnGeek/p/5909776.html
Copyright © 2011-2022 走看看