|
|||||||||||
|
[Snort-devel] port (and ip?) lists
From: <cec(at)ee.duke.edu>
Date: Wed Mar 24 2004 - 15:02:51 EST
It's been a while since I've done much in the way of snort hacking. After I took the IT Security Officer position for Duke, it was a matter of a severe lack of time. Anyway, I recently decided that for my own sanity I needed to get back involved in something that was programming oriented. So, I started thinking about Snort (which we use here extensively) and one of the first things that seemed like it still needed doing was the ability to add arbitrary port and ip lists. My original intention was to allow for the OR-ing of ports along with the spurious NOT. But as I started thinking about this, I realized that something even more generic was called for. For example, I may want to specify all privileged ports (1:1024), except for the windows ports (135-139, 445, 593). So we might want to write a port list like the following: 1:1024 & !(135:139 | 445 | 593) So, it turns out that this isn't so bad. I've got code now that will take the above and turn it into a postfix notation: 1:1024 135:139 445 | 593 | ! & I've also got 3 different routines (and can envision a 4th) that will evaluate the postfix expression against a given port. Each routine has a different performance/memory trade-off. The 4 methods I've thought about for evaluation are:
The above code for port lists can be easily converted to apply to IP lists, and the first two evaluation methods would be applicable. So, before I go any further, I wanted to get the opinion of those who have developed later than 1.6.x (the last version I played with). Questions:
Thanks,
-- Christopher E. Cramer, Ph.D. Information Technology Security Officer Duke University, Office of Information Technology 253A North Building, Box 90132, Durham, NC 27708-0291 PH: 919-660-7003 FAX: 919-660-7076 email: chris.cramer@duke.edu ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration. http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Snort-devel mailing list Snort-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/snort-develReceived on Wed Mar 24 15:16:36 2004 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:08:10 EDT |
||||||||||
|
|||||||||||