📄 snort.conf
字号:
# 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# output database: log, mssql, dbname=snort user=snort password=test# xml: xml logging# ----------------# See the README.xml file for more information about configuring# and using this plugin.## output xml: log, file=/var/log/snortxml# unified: Snort unified binary format alerting and logging# -------------------------------------------------------------# The unified output plugin provides two new formats for logging# and generating alerts from Snort, the "unified" format. The# unified format is a straight binary format for logging data # out of Snort that is designed to be fast and efficient. Used# with the upcoming tool "barnyard", most of the overhead for# logging and alerting to various slow storage mechanisms such# as databases or the network can now be avoided. ## Check out the spo_unified.h file for the data formats.## output alert_unified: snort.alert# output log_unified: snort.log# trap_snmp: SNMP alerting for Snort# -------------------------------------------------------------# Read the README-SNMP file for more information on enabling and using this# plug-in.### The SnmpTrapGenerator outputplugin requires several parameters# The parameters depend on the Snmpversion that is used (specified)# For the SNMPv2c case the paremeters will be as follows# alert, <sensorID>, {trap|inform} -v <SnmpVersion> -p <portNumber># <hostName> <community>## For SNMPv2c traps ##output trap_snmp: alert, 7, trap -v 2c -p 162 myTrapListener myCommunity## For SNMPv2c informs #output trap_snmp: alert, 7, inform -v 2c -p 162 myTrapListener myCommunity## For SNMPv3 traps with # security name = snortUser # security level = authentication and privacy# authentication parameters :# authentication protocol = SHA , # authentication pass phrase = SnortAuthPassword# privacy (encryption) parameters # privacy protocol = DES, # privacy pass phrase = SnortPrivPassword##output trap_snmp: alert, 7, trap -v 3 -p 162 -u snortUser -l authPriv -a SHA -A SnortAuthPassword -x DES -X SnortPrivPassword myTrapListener#For SNMPv3 informs with authentication and encryption#output trap_snmp: alert, 7, inform -v 3 -p 162 -u snortUser -l authPriv -a SHA -A SnortAuthPassword -x DES -X SnortPrivPassword myTrapListener# You can optionally define new rule types and associate one or # more output plugins specifically to that type.## This example will create a type that will log to just tcpdump.# ruletype suspicious# {# type log# output log_tcpdump: suspicious.log# }## EXAMPLE RULE FOR SUSPICIOUS RULETYPE:# suspicious $HOME_NET any -> $HOME_NET 6667 (msg:"Internal IRC Server";)## This example will create a rule type that will log to syslog# and a mysql database.# ruletype redalert# {# type alert# output alert_syslog: LOG_AUTH LOG_ALERT# output database: log, mysql, user=snort dbname=snort host=localhost# }## EXAMPLE RULE FOR REDALERT RULETYPE# redalert $HOME_NET any -> $EXTERNAL_NET 31337 (msg:"Someone is being LEET"; \# flags:A+;)## Include classification & priority settings#include classification.config##################################################################### Step #4: Customize your rule set## Up to date snort rules are available at the following web sites:# http://www.snort.org# http://www.whitehats.com## The snort web site has documentation about how to # write your own custom snort rules.## The rules included with this distribution generate alerts based on# on suspicious activity. Depending on your network environment, your# security policies, and what you consider to be suspicious, some of# these rules may either generate false positives ore may be detecting# activity you consider to be acceptable; therefore, you are# encouraged to comment out rules that are not applicable in your# environment.## Note that using all of the rules at the same time may lead to# serious packet loss on slower machines. YMMV, use with caution,# standard disclaimers apply. :)## The following individuals contributed many of rules in this# distribution.## Credits:# Ron Gula <rgula@securitywizards.com> of Network Security Wizards# Max Vision <vision@whitehats.com># Martin Markgraf <martin@mail.du.gtn.com># CyberPsychotic <fygrave@tigerteam.net># Nick Rogness <nick@rapidnet.com># Jim Forster <jforster@rapidnet.com># Scott McIntyre <scott@whoi.edu># Tom Vandepoel <Tom.Vandepoel@ubizen.com># Brian Caswell <bmc@mitre.org>#=========================================# Include all relevant rulesets here # by default policy, info, and virus # rulesets are disabled#=========================================include exploit.rulesinclude scan.rulesinclude finger.rulesinclude ftp.rulesinclude telnet.rulesinclude smtp.rulesinclude rpc.rulesinclude rservices.rulesinclude backdoor.rulesinclude dos.rulesinclude ddos.rulesinclude dns.rulesinclude netbios.rulesinclude web-cgi.rulesinclude web-coldfusion.rulesinclude web-frontpage.rulesinclude web-iis.rulesinclude web-misc.rulesinclude sql.rulesinclude x11.rulesinclude icmp.rules# include shellcode.rulesinclude misc.rules# include policy.rules# include info.rules# include icmp-info.rules# include virus.rulesinclude local.rules
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -