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.




Network Security Snort-Signatures
[Top] [All Lists]

[Snort-sigs] Strange PCRE usage in standard snort rules

Subject: [Snort-sigs] Strange PCRE usage in standard snort rules
Date: Mon, 9 May 2005 11:59:01 +1000
Hi all,

I've noticed some strange usage of PCRE in the netbios.rules. For 
instance, rule 2937 has the following construct:

    pcre:"/^.{27}/R";
    content:"&|00|"; distance:29; within:2;

which uses the PCRE matcher to move the current match position forward
by 27 characters and then has a 2 byte content match a further 29 
characters on in the packet (I think thats correct).

Couldn't this be replaced by something far simpler which avoids usage
of the PCRE engine? Maybe something like:

    byte_test: 2, =, 9728, 56, big, relative;

where

    9728 == ordinal value of '&' times 256
    56 == 27 + 29

Wouldn't matching this modified construct place far less load on Snort's
detection engine?

Cheers,
Erik
-- 
-------------------------------------------------------
[N] Erik de Castro Lopo, Senior Computer Engineer
[E] erik.de.castro.lopo@sensorynetworks.com
[W] http://www.sensorynetworks.com
[T] +61 2 83022726
[F] +61 2 94750316
[A] L6/140 William St, East Sydney NSW 2011, Australia
-------------------------------------------------------
A good debugger is no substitute for a good test suite.


-------------------------------------------------------
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>