⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 snort.conf

📁 snort入侵检测规则文件2.4 Snort是众所周知的网络入侵检测工具
💻 CONF
📖 第 1 页 / 共 2 页
字号:
# preprocessor perfmonitor: time 300 file /var/snort/snort.stats pktcnt 10000# http_inspect: normalize and detect HTTP traffic and protocol anomalies## lots of options available here. See doc/README.http_inspect.# unicode.map should be wherever your snort.conf lives, or given# a full path to where snort can find it.preprocessor http_inspect: global \    iis_unicode_map unicode.map 1252 preprocessor http_inspect_server: server default \    profile all ports { 80 8080 8180 } oversize_dir_length 500##  Example unqiue server configuration##preprocessor http_inspect_server: server 1.1.1.1 \#    ports { 80 3128 8080 } \#    flow_depth 0 \#    ascii no \#    double_decode yes \#    non_rfc_char { 0x00 } \#    chunk_length 500000 \#    non_strict \#    oversize_dir_length 300 \#    no_alerts# rpc_decode: normalize RPC traffic# ---------------------------------# RPC may be sent in alternate encodings besides the usual 4-byte encoding# that is used by default. This plugin takes the port numbers that RPC# services are running on as arguments - it is assumed that the given ports# are actually running this type of service. If not, change the ports or turn# it off.# The RPC decode preprocessor uses generator ID 106## arguments: space separated list# alert_fragments - alert on any rpc fragmented TCP data# no_alert_multiple_requests - don't alert when >1 rpc query is in a packet# no_alert_large_fragments - don't alert when the fragmented#                            sizes exceed the current packet size# no_alert_incomplete - don't alert when a single segment#                       exceeds the current packet sizepreprocessor rpc_decode: 111 32771# bo: Back Orifice detector# -------------------------# Detects Back Orifice traffic on the network.  Takes no arguments in 2.0.# # The Back Orifice detector uses Generator ID 105 and uses the # following SIDS for that GID:#  SID     Event description# -----   -------------------#   1       Back Orifice traffic detectedpreprocessor bo# 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.# Portscan uses Generator ID 109 and does not generate any SID currently.preprocessor telnet_decode# sfPortscan# ----------# Portscan detection module.  Detects various types of portscans and# portsweeps.  For more information on detection philosophy, alert types,# and detailed portscan information, please refer to the README.sfportscan.## -configuration options-#     proto { tcp udp icmp ip_proto all }#       The arguments to the proto option are the types of protocol scans that#       the user wants to detect.  Arguments should be separated by spaces and#       not commas.#     scan_type { portscan portsweep decoy_portscan distributed_portscan all }#       The arguments to the scan_type option are the scan types that the#       user wants to detect.  Arguments should be separated by spaces and not#       commas.#     sense_level { low|medium|high }#       There is only one argument to this option and it is the level of#       sensitivity in which to detect portscans.  The 'low' sensitivity#       detects scans by the common method of looking for response errors, such#       as TCP RSTs or ICMP unreachables.  This level requires the least#       tuning.  The 'medium' sensitivity level detects portscans and #       filtered portscans (portscans that receive no response).  This#       sensitivity level usually requires tuning out scan events from NATed#       IPs, DNS cache servers, etc.  The 'high' sensitivity level has#       lower thresholds for portscan detection and a longer time window than#       the 'medium' sensitivity level.  Requires more tuning and may be noisy#       on very active networks.  However, this sensitivity levels catches the#       most scans.#     memcap { positive integer }#       The maximum number of bytes to allocate for portscan detection.  The#       higher this number the more nodes that can be tracked.#     logfile { filename }#       This option specifies the file to log portscan and detailed portscan#       values to.  If there is not a leading /, then snort logs to the#       configured log directory.  Refer to README.sfportscan for details on#       the logged values in the logfile.#     watch_ip { Snort IP List }#     ignore_scanners { Snort IP List }#     ignore_scanned { Snort IP List }#       These options take a snort IP list as the argument.  The 'watch_ip'#       option specifies the IP(s) to watch for portscan.  The #       'ignore_scanners' option specifies the IP(s) to ignore as scanners.#       Note that these hosts are still watched as scanned hosts.  The#       'ignore_scanners' option is used to tune alerts from very active#       hosts such as NAT, nessus hosts, etc.  The 'ignore_scanned' option #       specifies the IP(s) to ignore as scanned hosts.  Note that these hosts#       are still watched as scanner hosts.  The 'ignore_scanned' option is#       used to tune alerts from very active hosts such as syslog servers, etc.#preprocessor sfportscan: proto  { all } \                         memcap { 10000000 } \                         sense_level { low }# arpspoof#----------------------------------------# Experimental ARP detection code from Jeff Nathan, detects ARP attacks,# unicast ARP requests, and specific ARP mapping monitoring.  To make use of# this preprocessor you must specify the IP and hardware address of hosts on# the same layer 2 segment as you.  Specify one host IP MAC combo per line.# Also takes a "-unicast" option to turn on unicast ARP request detection. # Arpspoof uses Generator ID 112 and uses the following SIDS for that GID:#  SID     Event description# -----   -------------------#   1       Unicast ARP request#   2       Etherframe ARP mismatch (src)#   3       Etherframe ARP mismatch (dst)#   4       ARP cache overwrite attack#preprocessor arpspoof#preprocessor arpspoof_detect_host: 192.168.40.1 f0:0f:00:f0:0f:00# X-Link2State mini-preprocessor# ------------------------------# This preprocessor will catch the X-Link2State vulnerability# (www.microsoft.com/technet/security/bulletin/MS05-021.mspx).## Format:# preprocessor xlink2state: ports { <port> [<port> <...>] } [drop]## "drop" will drop the attack if in Inline-mode.#  SID     Event description# -----   -------------------#   1      X-Link2State length greater than 1024preprocessor xlink2state: ports { 25 691 }##################################################################### 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.  Win32 can also optionally# specify a particular hostname/port.  Under Win32, the default hostname is# '127.0.0.1', and the default port is 514.## [Unix flavours should use this format...]# output alert_syslog: LOG_AUTH LOG_ALERT## [Win32 can use any of these formats...]# output alert_syslog: LOG_AUTH LOG_ALERT# output alert_syslog: host=hostname, LOG_AUTH LOG_ALERT# output alert_syslog: host=hostname:port, LOG_AUTH LOG_ALERT# log_tcpdump: log packets in binary tcpdump format# -------------------------------------------------# The only argument is the output file name.## output log_tcpdump: tcpdump.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, odbc, user=snort dbname=snort# output database: log, mssql, dbname=snort user=snort password=test# output database: log, oracle, dbname=snort user=snort password=test# 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 barnyard (the new alert/log processor), 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.## Two arguments are supported.#    filename - base filename to write to (current time_t is appended)#    limit    - maximum size of spool file in MB (default: 128)## output alert_unified: filename snort.alert, limit 128# output log_unified: filename snort.log, limit 128# prelude: log to the Prelude Hybrid IDS system# ---------------------------------------------## output prelude: profile=snort# profile = Name of the Prelude profile to use (default is snort).# config  = Optional name of a specific prelude configuration file to use for snort.## Snort priority to IDMEF severity mappings:# high < medium < low < info## info   = 4# low    = 3# medium = 2# high   = anything below medium## These are the default mapped from classification.config.## output alert_prelude# 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 tcp $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 tcp $HOME_NET any -> $EXTERNAL_NET 31337 \#   (msg:"Someone is being LEET"; flags:A+;)## Include classification & priority settings# Note for Windows users:  You are advised to make this an absolute path,# such as:  c:\snort\etc\classification.config#include classification.config## Include reference systems# Note for Windows users:  You are advised to make this an absolute path,# such as:  c:\snort\etc\reference.config#include reference.config##################################################################### Step #4: Configure snort with config statements## See the snort manual for a full set of configuration references## config flowbits_size: 64## New global ignore_ports config option from Andy Mullican## config ignore_ports: <tcp|udp> <list of ports separated by whitespace># config ignore_ports: tcp 21 6667:6671 1356# config ignore_ports: udp 1:17 53##################################################################### Step #5: Customize your rule set## Up to date snort rules are available at http://www.snort.org## The snort web site has documentation about how to write your own custom snort# rules.#=========================================# Include all relevant rulesets here # # The following rulesets are disabled by default:##   web-attacks, backdoor, shellcode, policy, porn, info, icmp-info, virus,#   chat, multimedia, and p2p#            # These rules are either site policy specific or require tuning in order to not# generate false positive alerts in most enviornments.# # Please read the specific include file for more information and# README.alert_order for how rule ordering affects how alerts are triggered.#=========================================include $RULE_PATH/local.rulesinclude $RULE_PATH/bad-traffic.rulesinclude $RULE_PATH/exploit.rulesinclude $RULE_PATH/scan.rulesinclude $RULE_PATH/finger.rulesinclude $RULE_PATH/ftp.rulesinclude $RULE_PATH/telnet.rulesinclude $RULE_PATH/rpc.rulesinclude $RULE_PATH/rservices.rulesinclude $RULE_PATH/dos.rulesinclude $RULE_PATH/ddos.rulesinclude $RULE_PATH/dns.rulesinclude $RULE_PATH/tftp.rulesinclude $RULE_PATH/web-cgi.rulesinclude $RULE_PATH/web-coldfusion.rulesinclude $RULE_PATH/web-iis.rulesinclude $RULE_PATH/web-frontpage.rulesinclude $RULE_PATH/web-misc.rulesinclude $RULE_PATH/web-client.rulesinclude $RULE_PATH/web-php.rulesinclude $RULE_PATH/sql.rulesinclude $RULE_PATH/x11.rulesinclude $RULE_PATH/icmp.rulesinclude $RULE_PATH/netbios.rulesinclude $RULE_PATH/misc.rulesinclude $RULE_PATH/attack-responses.rulesinclude $RULE_PATH/oracle.rulesinclude $RULE_PATH/mysql.rulesinclude $RULE_PATH/snmp.rulesinclude $RULE_PATH/smtp.rulesinclude $RULE_PATH/imap.rulesinclude $RULE_PATH/pop2.rulesinclude $RULE_PATH/pop3.rulesinclude $RULE_PATH/nntp.rulesinclude $RULE_PATH/other-ids.rules# include $RULE_PATH/web-attacks.rules# include $RULE_PATH/backdoor.rules# include $RULE_PATH/shellcode.rules# include $RULE_PATH/policy.rules# include $RULE_PATH/porn.rules# include $RULE_PATH/info.rules# include $RULE_PATH/icmp-info.rules include $RULE_PATH/virus.rules# include $RULE_PATH/chat.rules# include $RULE_PATH/multimedia.rules# include $RULE_PATH/p2p.rulesinclude $RULE_PATH/experimental.rules# Include any thresholding or suppression commands. See threshold.conf in the# <snort src>/etc directory for details. Commands don't necessarily need to be# contained in this conf, but a separate conf makes it easier to maintain them. # Note for Windows users:  You are advised to make this an absolute path,# such as:  c:\snort\etc\threshold.conf# Uncomment if needed.# include threshold.conf

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -