Tuesday, January 20

Snort is up and running, now what?

I’m often asked to write a document about the after effects, the post marital bliss, as it were, of going through the steps of installing Snort as your IDS, and what to do next. So I’ve decided, at great request, to sit down and write a blog entry about the “next steps”.


Now, let me be clear, any security device, yes, ALL of them, require tuning. If someone is out there saying “my device doesn’t require tuning”, not only are they wrong, but it’s an absolute falsehood. I don’t care if your system is being automatically tuned, its still being tuned. One device is not the end all-be all of security devices. Of course there are default settings that take into account the majority of networks out there, and yes, Snort is one of those. But each device you put on your network requires a small bit of tuning at least to adapt to your environment.


So what do I like to do first?


  1. Variables -- Tune those variables. How you tune your Snort variables is up to you, but I always say at the very least, start off by tuning your HOME_NET variable. Punch into this variable that network ranges you’d like to protect. How you tune the rest of the variables is up to you, but a good place to start is with EXTERNAL_NET. How you tune this variable, I have a talk on that, I am sure I will be giving soon, so stay tuned. I don’t want to put my bullet points out there before I start talking. By default EXTERNAL_NET is set to any, which is a fine start.
  2. Rulesets -- If you don’t have the awesome luxury of dealing with a Sourcefire device, which will give you the recommendations for your rules based upon what is actually on your network (We call this “RNA recommended rulesets”), you will have to do this manually. Sit down, simply at first, with the category names of the rules that you download from Snort.org and take inventory of your network from a Software and service based perspective. Are you running IMAP as a service on your network? No? Then shut the whole rule category off. Rinse and Repeat.
  3. Preprocessors -- Now, for proper elimination of alerts and tuning, these will take time, however, at the beginning, ask yourself two questions: 1) What is the majority operating system on my network, and 2) What is the majority webserver on my network. Take the answers to these two questions and tune things like your frag3, stream5, and http_inspect_server preprocessors.
  4. Restart Snort -- In the present version of Snort (2.x.x) you have to restart Snort for changes to take effect. After you have done all of the above steps, restart Snort.
  5. Suppression and Thresholding -- Now, for the lather rinse and repeat steps. Look at your alerts -- Do I need this alert? How is this alert going to help me to do my job? Do I have any actionable information from this alert. I mean -- So you are getting SNMP alerts, so what? Do you care? ICMP alerts, do you care? What does someone on your network pinging do for your security. In some environments it might, in most, no. So your Solarwinds server is pinging lots of hosts on the network. So? That’s what it’s supposed to do, so take that IP and suppress alerts. That’s what suppression is. Don’t want something to alert at all going to a particular host? That’s a suppression. Don’t want something to alert “as much”? That’s a threshold. Set the ones you need. Restart Snort.


This is not intended to replace any tuning steps you’ve already done, this is not intended to be the end all-be all. This is intended to get you going after your install.


For those of you using Sourcefire product, these steps are either non-existent or considerably easier for you. Some vendors will try and position their product against Snort (read: not Sourcefire) and call the comparison fair. Snort is an open source project, while many companies use Snort as the basis for their product, Sourcefire owns the technology and makes it considerably easy to use. That’s why Sourcefire was started. Marty had a vision of being able to make a complex engine like Snort, very easy to configure, so he started Sourcefire -- and viola.

For further tuning steps (and there can be a lot of them, depending on your network), we have consulting services available. I can’t give all the answers away! ;)

No comments: