An alchemists view from the bar

Network Security Alchemy

Snort-2.8.4 – What’s the fuss about?

leave a comment »

I’m writing this post on the 14:00 BST 7/April, this timestamp is important because snort 2.8.4 has not yet been released to the public and when it is I get the feeling that there could be a lot of traffic on the Snort forums and mailing lists.

The morning after the 2.8.4 release I imagine a lot of people will have woken up to a Snort sensor that is no longer functioning, now let me take guess at what has most likely has happened.

  • You are running Snort version 2.3.x or earlier
  • You are using oinkmaster, or similar to provide an automated tool to download new snort rules and restart the detection engine
  • You have set oinkmaster to download the “CURRENT” release
  • Snort now fails to start because of these new rules

So what’s happened in plain English?

A new preprocessor has been released called DCERPC2. If stuff has just broken for you, the version of rules that your automated update process has downloaded requires this new preprocessor to provide detection for a load of new “stuff” in the NetBIOS category.

You now have two choices:

  • Update Snort to 2.8.4 to stay current with the detection that Sourcefire’s VRT provide (Good)
  • Don’t update Snort. Run with an older rule set that doesn’t provide detection for current threats (bad)

Unfortunately it doesn’t look like there is much choice in it, go get the latest tarball and install. While you have wget running in the background, lets examine whet DCERPC2 does, and why this change has been made.

Snort is a real-time protocol modeller, it inspects network traffic at the application layer (and below) and builds a state-machine. This isn’t just simple TCP state data like a firewall would track, it follows application protocol state. The Snort language allows a rule-writer to build his/her own application state tables as needed to support pretty much any protocol, so if a vulnerability is found in the brand new “foo” protocol, a state-machine to track “foo” connections can be built by the rule writer as needed.

Here is an example of how application protocol state is tracked. The magic word here is “flowbits”. I have copied a rule out of the smtp.rules as an example. Note that I have also simplified it for display here so don’t expect it to work in the real-world any more.

alert tcp $EXTERNAL_NET any -> $SMTP_SERVERS 465 (msg:"SMTP SSLv3 Client_Hello request"; \
flow:to_server,established; \
flowbits:isnotset,sslv2.client_hello.request; \
flowbits:isnotset,tlsv1.client_hello.request; \
content:"|16 03 00|"; depth:3; \
content:"|01|" ; depth:1; offset:5; \
flowbits:set,sslv3.client_hello.request; \
flowbits:noalert; \
service smtp; classtype:protocol-command-decode;)

When traffic that matches this rule is seen, it sets a “flowbit” on the stream that can be checked in other rules. Here we can see that for this rule to “fire” and have the SSLv3 flowbit set, the stream cannot be SSLv2 or TLSv1. Also note that when this rule does “fire” it won’t create an alert, it just sets the state for further processing.

This method has been traditionally used to track application protocol state in NetBIOS/DCERPC  traffic in the same was as all other protocols. The method has has worked well for years but because of all the different ways you can access potentially access some vulnerable functions in DCERPC, the netbios rule-set has grown noticeably. DCERPCv2 deprecates most of these flowbit based protocol modellers for DCERPC traffic, this allows the VRT to shrink the netbios.rules category down to make it more manageable, this is great for those who hand-hack config files. Anyone using Sourcefire 3D won’t really notice much difference when DCERPC2 gets released in a SEU, but you would have missed out on a lot of pain already because of the built in flow-bit dependency tracking.

If you are running a commercial solution that won’t work with this rule-set, I would like to hear from you, please get in touch.



Written by leonward

April 7, 2009 at 3:24 pm

Posted in snort

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: