Threat Level: green Handler on Duty: Manuel Pelaez

SANS ISC InfoSec Handlers Diary Blog


Sign Up for Free!   Forgot Password?
Log In or Sign Up for Free!

Snort Data Acquisition Library

Published: 2011-02-19
Last Updated: 2011-02-19 12:30:02 UTC
by Guy Bruneau (Version: 1)
0 comment(s)

With Snort 2.9 came the introduction of the Data Acquisition (DAQ) library to replace direct calls to PCAP functions."DAQ supports PCAP, AFPACKET, NFQ, IPQ, IPFW, and DUMP which is used for testing."[1]

After I upgraded from 2.8.6 to 2.9.0.2 (current version is 2.9.0.4), my Snort rules and in particular my Snort rule to detect Windows binary download (sid:15306) no longer detected Windows binary download via a browser. It was also affecting my Snort statistics that were constantly showing a small amount of packet loss.

In order to fix these various issues, I discovered after multiple tests that starting Snort in IDS mode with --daq afpacket and --daq-var buffer_size_mb=256 (default is 128MB and DAQ afpacket is recommended with an inline configuration) and my events were reporting correctly and the packet loss went away. If no options are specified, the default DAQ in Snort is PCAP DAQ and operates as it always did. Using the AFPACKET DAQ for me provided much better performance on various links (10 to more than 100 MB).

To find out which DAQ modules are already compiled in Snort, execute the following Snort command:

snort --daq-list

Available DAQ modules:
pcap(v3): readback live multi unpriv
ipq(v4): live inline multi
ipfw(v2): live inline multi unpriv
dump(v1): readback live inline multi unpriv
afpacket(v4): live inline multi unpriv

[1] http://vrt-blog.snort.org/2010/08/snort-29-essentials-daq.html

-----------

Guy Bruneau IPSS Inc. gbruneau at isc dot sans dot edu

Keywords: DAQ performance snort
0 comment(s)
Diary Archives