Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: [Snort-sigs] Strange PCRE usage in standard snort rules |
|---|---|
| Date: | Mon, 9 May 2005 10:50:57 -0400 |
On Mon, May 09, 2005 at 02:15:59AM -0500, Frank Knobbe wrote:
If the above are correct, then shouldn't we be able to split pcre matches in order to improve processing speed?
No. Unfortunately, that is a common misconception.
For example: SID 2001401 of the Bleeding rules contains:
pcre:"/(EMBED|FRAME|SRC|NAME)\s*=\s*["']\w{2086}|\W{2086}/im"
Wouldn't it save processing cycles to split this into:
pcre:"/(EMBED|FRAME|SRC|NAME)/im";
pcre:"/\s*=\s*["']\w{2086}|\W{2086}/imR";
No. For one, you would end up alerting where you should not.
<img src=foo.jpg> Here is my text somewhere, and this is
not a vulnerability. ="aaaaa (2086 A's here)
The problem is measuring the length of the value for EMBED, FRAME,
SRC, or NAME. If you don't measure that length, you are just
measuring the length of something... and in your example, you have no
idea as to WHAT you are measuring.
In addition, your rule has an incorrect alternations. The following
content will cause the rule to fire (in both cases):
=" (insert 2086 spaces here)
Brian
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Snort-sigs mailing list
Snort-sigs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/snort-sigs
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [Snort-sigs] Strange PCRE usage in standard snort rules, Brian |
|---|---|
| Next by Date: | Re: [Snort-sigs] Strange PCRE usage in standard snort rules, Brian |
| Previous by Thread: | Re: [Snort-sigs] Strange PCRE usage in standard snort rules, Frank Knobbe |
| Next by Thread: | Re: [Snort-sigs] Strange PCRE usage in standard snort rules, Erik Fichtner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |