Snort mailing list archives

Re: How to write a snort rule match NO content GET or POST in http request


From: Shaiming Hsiung <shaiming.hsiung () gmail com>
Date: Thu, 26 Jul 2012 16:38:01 -0300

Please help me to write a snort rule that matches http request with NO content GET or POST.

I have in the past used a regex like the following:

    pcre: "/^([^GP]|G[^E]|GE[^T]|GET[^ ]|P[^O]|PO[^S]|POS[^T]|POST[^
])/i"; http_method;

A bit hairy but works, and uses only non-negated rules.
It essentially matches a packet that begins with anything
but "GET " or "POST ":

The packet can start with:
    - any letter except G and P
    - or G followed by any letter except E
    - or GE followed by any letter except T
    - etc.

Beware; this is vulnerable to fragmentation.

Regards,

--
Shaiming Hsiung

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users

Please visit http://blog.snort.org to stay current on all the latest Snort news!


Current thread: