[Snort-devel] Bottlenecks or all I want for xmas is one of th ese!!!!!

Smith, Donald Donald.Smith at ...530...
Fri Jul 13 11:14:11 EDT 2001


What do you mean by parallelizing the code and clustering? If you mean you
are going to use multiple machines to do snort detects at the same time then
this is what I would recommend.
Run the preprocessors on different machines with each machine running a
different preprocessor.
                        Serial stuff   ->
Preprocessors that can be run parallel      -> Rules_in_parallel
INTERNET -> [frag2] -> [stream2] -> [stream4_reasemble]    |->[spade]
|                                  |-> exploit.rules
 
|                                  |-> scan.rules
 
|-> [bo]                   |
 
|                                   |-> smtp.rules          
 
|                                   |-> finger.rules
 
|                                  |-> ftp.rules <ftp://ftp.rules>  |

 
|                                  |-> rservices.rules
 
|                                  |->backdoor.rules
 
|                                  |-> dos.rules
 
|                                  |-> ddos.rules
 
|                                  |->dns.rules
 
|                                  |->netbios.rules
 
|                                  |->sql.rules
 
|                                  |->x11.rules
 
|                                  |->icmp.rules
 
|                                  |->misc.rules
 
|                                  |->local.rules
 
 
 
| -> [rpc_decode]                                       |-> rpc.rules    
    
 
 
|-> [telnet_decode]                                   |-> telnet.rules
 
 

 

 
|->[http_decode]                                   |->web-misc.rules 
 
|-> web cgi.rules 
 
 
 
|-> [unidecode                |->web-frontpage.rules    
 
|->web-cold-fusion
 
|->web-iis.rules
 


 
|-> [portscan-ignorehosts ]                        |->[portscan]

Directly out of the 1.8 snort.conf file;-)
 
# minfrag: detect small fragments
# -------------------------------
# minfrag has been deprecated as of build 26
 
# defrag: defragmentation support
# -------------------------------
# IP defragmentation support from Dragos Ruiu. There
# are no configuration options at this time.
 
#preprocessor defrag
preprocessor frag2
 
# stream2: TCP stream reassembly
# -------------------------------------
# TCP stream reassembly preprocessor from Chris Cramer.  
# This preprocessor should always go after the defrag 
# preprocessor, but before application layer decoders. 
# The example below monitors ports 23 and 80, has a 
# timeout after 10 seconds, and will send reassembled 
# packets of max payload 16384 bytes through the 
# detection engine. See README.tcpstream for more 
# information and configuration options. Uncomment 
# the following line and configure appropriately to 
# enable this preprocessor.
#
# NOTE: This code should still be considered BETA!
# It seems to be stable, but there are still some
# issues that remain to be resolved, so make sure you
# keep an eye on your Snort sensor if you enable this plugin
# The older version which definitely had issues w/ packet
# loss is still in the code base, to use it in place of the
# new version, use "preprocessor stream: ..."
 
#preprocessor stream2: timeout 10, ports 21 23 80 110 143, maxbytes 16384
 
# stream4: stateful inspection/stream reassembly for Snort
#----------------------------------------------------------------------
# Use in concert with the -z [all|est] command line switch to defeat 
# stick/snot against TCP rules.  Also performs full TCP stream 
# reassembly, stateful inspection of TCP streams, etc.  Can statefully
# detect various portscan types, fingerprinting, ECN, etc.
 
# stateful inspection directive
# no arguments loads the defaults (timeout 30, memcap 8MB)
# options (options are comma delimited):
#   keepstats [machine] - keep session statistics, add "machine" to get them
in
#                         a flat format for machine reading
#   noinspect - turn off stateful inspection only
#   noalerts - turn off alerts from the stateful inspector
#   timeout [number] - set the session timeout counter to [number] seconds,
#                      default is 30 seconds
#   memcap [number] - limit stream4 memory usage to [number] bytes
 
preprocessor stream4
 
# tcp stream reassembly directive
# no arguments loads the default configuration (clientonly, ports default, 
# alerts on) 
# options (still comma delimited):
#   clientonly - reassemble traffic for the client side of a connection only
#   serveronly - reassemble traffic for the server side of a connection only
#   both - reassemble both sides of a session
#   noalerts - turn off alerts from the stream reassembly stage of stream4
#   ports [list] - use the space separated list of ports in [list], "all" 
#                  will turn on reassembly for all ports, "default" will
turn
#                  on reassembly for ports 21, 23, 25, 53, 80, 143, 110, 111
#                  and 513
 
preprocessor stream4_reassemble
 
# http_decode: normalize HTTP requests
# ------------------------------------
# http_decode normalizes HTTP requests from remote 
# machines by converting any %XX character 
# substitutions to their ASCII equivalent. This is
# very useful for doing things like defeating hostile
# attackers trying to stealth themselves from IDSs by
# mixing these substitutions in with the request. 
# Specify the port numbers you want it to analyze as arguments.
# You may also specify -unicode to turn off detection of 
# UNICODE directory traversal, etc attacks.  Use -cginull to
# turn off detection of CGI NULL code attacks.
 
preprocessor http_decode: 80 -unicode -cginull
 

# unidecode: normalize HTTP/detect UNICODE attacks 
# ------------------------------------------------
# Works much the same as http_decode, but does a better
# job of categorizing and identifying UNICODE attacks,
# recommended as a potential replacement for http_decode.
 
# preprocessor unidecode: 80
 

# rpc_decode: normalize RPC traffic
# ---------------------------------
# RPC may be sent in alternate encodings besides the usual
# 4-byte encoding that is used by default.  This preprocessor
# normalized RPC traffic in much the same way as the http_decode
# preprocessor.  This plugin takes the ports numbers that RPC 
# services are running on as arguments.
 
preprocessor rpc_decode: 111 
 
# bo: Back Orifice detector
# -------------------------
# Detects Back Orifice traffic on the network.  This preprocessor
# uses the Back Orifice "encryption" algorithm to search for 
# traffic conforming to the Back Orifice protocol (not BO2K).
# This preprocessor can take two arguments.  The first is "-nobrute"
# which turns off the plugin's brute forcing routine (brute forces 
# the key space of the protocol to find BO traffic).  The second
# argument that can be passed to the routine is a number to use
# as the default key when trying to decrypt the traffic.  The 
# default value is 31337 (just like BO).  Be aware that turning on
# the brute forcing option runs the risk of impacting the overall
# performance of Snort, you've been warned...
 
preprocessor bo: -nobrute
 
# telnet_decode: Telnet negotiation string normalizer
# ---------------------------------------------------
# This preprocessor "normalizes" telnet negotiation strings from
# telnet and ftp traffic.  It works in much the same way as the 
# http_decode preprocessor, searching for traffic that breaks up
# the normal data stream of a protocol and replacing it with 
# a normalized representation of that traffic so that the "content"
# pattern matching keyword can work without requiring modifications.
# This preprocessor requires no arguments.
 
preprocessor telnet_decode
 
# portscan: detect a variety of portscans
# ---------------------------------------
# portscan preprocessor by Patrick Mullen < p_mullen at ...43...
<mailto:p_mullen at ...43...> >
# This preprocessor detects UDP packets or TCP SYN packets going to
# four different ports in less than three seconds. "Stealth" TCP
# packets are always detected, regardless of these settings.
 
preprocessor portscan: $HOME_NET 4 3 portscan.log
 
# Use portscan-ignorehosts to ignore TCP SYN and UDP "scans" from
# specific networks or hosts to reduce false alerts. It is typical
# to see many false alerts from DNS servers so you may want to
# add your DNS servers here. You can all multiple hosts/networks
# in a whitespace-delimited list.
#
#preprocessor portscan-ignorehosts: $DNS_SERVERS
 
# Spade: the Statistical Packet Anomaly Detection Engine
#-------------------------------------------------------
# READ the README.Spade file before using this plugin!
#
# See http://www.silicondefense.com/spice/
<http://www.silicondefense.com/spice/>  for more info
#
# Spade is a Snort plugin to report unusual, possibly 
# suspicious, packets. Spade will review the packets 
# received by Snort, find those of interest (TCP SYNs 
# into your homenets, if any), and report those packets
# that it believes are anomalous along with an anomaly 
# score.  To enable spp_anomsensor, you must have a
# line of this form in your snort configuration file:
#
# preprocessor spade: <anom-report-thresh> <state-file>
# <log-file> <prob-mode> <checkpoint-freq>
#
# set this to a directory Spade can read and write to
# store its files
#
# var SPADEDIR .
#
# preprocessor spade: -1 $SPADEDIR/spade.rcv $SPADEDIR/log.txt 3 50000
#
# put a list of the networks you are interested in Spade observing packets
# going to here
#
# preprocessor spade-homenet: 0.0.0.0/0
#
# this causes Spade to adjust the reporting threshold automatically
# the first argument is the target rate of alerts for normal circumstances
# (0.01 = 1% or you can give it an hourly rate) after the first hour (or
# however long the period is set to in the second argument), the reporting
# threshold given above is ignored you can comment this out to have the
# threshold be static, or try one of the other adapt methods below
# preprocessor spade-adapt3: 0.01 60 168
#
# other possible Spade config lines:
# adapt method #1
#preprocessor spade-adapt: 20 2 0.5
# adapt method #2
#preprocessor spade-adapt2: 0.01 15 4 24 7
# offline threshold learning
#preprocessor spade-threshlearn: 200 24
# periodically report on the anom scores and count of packets seen
#preprocessor spade-survey:  $SPADEDIR/survey.txt 60
# print out known stats about packet feature
#preprocessor spade-stats: entropy uncondprob condprob
 
# arpspoof
#----------------------------------------
# Experimental ARP detection code from Jeff Nathan, detects ARP attacks, 
# directed ARP requests, and specific ARP mapping monitoring.  Takes a 
# "-directed" option to turn on directed ARP request detection.
 
# preprocessor arpspoof
 

####################################################################
# Step #3: Configure output plugins
#
# Uncomment and configure the output plugins you decide to use.
# General configuration for output plugins is of the form:
#
# output <name_of_plugin>: <configuration_options>
#
# alert_syslog: log alerts to syslog
# ----------------------------------
# Use one or more syslog facilities as arguments
#
# output alert_syslog: LOG_AUTH LOG_ALERT
 
# log_tcpdump: log packets in binary tcpdump format
# -------------------------------------------------
# The only argument is the output file name.
#
# output log_tcpdump: snort.log
 
# database: log to a variety of databases
# ---------------------------------------
# See the README.database file for more information about configuring
# and using this plugin.
#
# output database: log, mysql, user=root password=test dbname=db
host=localhost
# output database: alert, postgresql, user=snort dbname=snort
# output database: log, unixodbc, user=snort dbname=snort
 
# xml: xml logging
# ----------------
# See the README.xml file for more information about configuring
# and using this plugin.
#
# output xml: log, file=/var/log/snortxml

 

Donald.Smith at ...530... IP Engineering Security
303-226-9939/0688 Office/Fax
720-320-1537 cell 

 

-----Original Message-----
From: Craig Fratrik [mailto:cfratrik at ...524...]
Sent: Thursday, July 12, 2001 9:25 PM
To: snort-devel at lists.sourceforge.net
Subject: [Snort-devel] Bottlenecks


I am considering parallelizing the code for snort and running it on a
cluster as a test case for the application of clusters to IDS's.  I would
greatly appreciate it if you would tell me what you think are the
bottlenecks that would most benefit from parallelization.  Thank you.
 
Craig Fratrik





More information about the Snort-devel mailing list