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

📄 readme.thresholding

📁 This is the snapshot of Snot Latest Rules
💻 THRESHOLDING
字号:
THRESHOLDING AND EVENT SUPPRESSION IN SNORT A rule thresholding feature has been added to SNORT.  This feature is used toreduce the number of logged alerts for noisy rules.  This can be tuned tosignificantly reduce false alarms, and it can also be used to write a newerbreed of rules. Thresholding commands limit the number of times a particularevent is logged during a specified time interval. Global thresholding has also been added. This allows you to specify athreshold for every rule.  Standard thresholding tests are applied 1st to anevent, if they do not block a rule from being logged than the globalthresholding test is applied - thresholds in a rule will always override a global.Event suppression stops specified events from firing without removing the rulefrom the rule base. Suppression uses a CIDR block notation to select specificnetworks and users for suppression.  Suppression tests are performed prior toeither standard or global thresholding tests.There are 3 types of thresholding:	1) Limit         Alert on the 1st M events during the time interval, then ignore events        for the rest of the time interval.    2) Threshold         Alert every M times we see this event during the time interval.	3) Both         Alert once per time interval after seeing M occurrences of the event,        then ignore any additional events during the time interval. All tracking is by Src or by Dst IP, we do not track ports or anything else.Thresholding commands can be included as part of a rule, or you can usestandalone threshold commands that reference the generator and sid  they areapplied to. There is no functional difference between adding a threshold to arule, or using a separate threshold command applied to the same rule.   Thereis a logical difference.  Some rules may only make sense with a threshold.These should incorporate the threshold command into the rule.  For instance arule for detecting a too many login password attempts may require more than 5attempts.  This can be done using the 'limit' type of threshold command.  Itmakes sense that the threshold feature is an integral part of this rule.Suppression commands are standalone commands that reference generator's andsid's and IP addresses via a  CIDR block. This allows a rule to be completelysuppressed, or suppressed when the causative traffic is going to or comingfrom a specific IP or group of IP addresses.Events in SNORT are generated in the usual way, thresholding and eventsuppression are handled as part of the output system.You may apply only one threshold to any given sid, but you may apply multiplesuppression commands to a sid.  You may also combine one threshold command andseveral suppression commands to the same sid.  If you try to apply more thanone threshold command to a sid, SNORT will terminate while reading theconfiguration information.  THRESHOLDING CONFIGURATION COMMAND:----------------------------------- config threshold: memcap 3000000	The memcap parameter is specified in bytes.	THRESHOLD RULE FORMAT:---------------------threshold: type limit|threshold|both, track by_src|by_dst, count n , seconds m ; THRESHOLD RULE OPTION PARAMETERS:--------------------------------threshold       keyword to start a threshold command in a rule. This format supports 4 threshold options - all are required.    type		limit, threshold, both    track		by_src , by_dst    count		n : number events used by the thresholding    seconds		m : time period over which count is accrued.EXAMPLE RULES:--------------This rule logs the 1st event of this sid every 60 seconds    alert tcp $EXTERNAL_NET any -> $HTTP_SERVERS $HTTP_PORTS (msg:"WEB-MISC robots.txt access"; flow:to_server, established; uricontent:"/robots.txt"; nocase; reference:nessus,10302; classtype:web-application-activity; threshold: type limit, track by_src, count 1 , seconds 60 ; sid:1852; rev:1;) This rule logs every 10th event on this sid during a 60 second interval, so ifless than 10 occur in 60 seconds, nothing gets logged.  Once an event islogged, a new time period starts for type=threshold.    alert tcp $EXTERNAL_NET any -> $HTTP_SERVERS $HTTP_PORTS (msg:"WEB-MISC robots.txt access"; flow:to_server, established; uricontent:"/robots.txt"; nocase; reference:nessus,10302; classtype:web-application-activity; threshold: type threshold, track by_dst, count 10 , seconds 60 ; sid:1852; rev:1;)This rule logs at most one event every 60 seconds if at least 10 events on thissid are fired.    alert tcp $EXTERNAL_NET any -> $HTTP_SERVERS $HTTP_PORTS (msg:"WEB-MISC robots.txt access"; flow:to_server, established; uricontent:"/robots.txt"; nocase; reference:nessus,10302; classtype:web-application-activity; threshold: type both , track by_dst, count 10 , seconds 60 ; sid:1852; rev:1;)THRESHOLD COMMAND FORMAT:-------------------------threshold gen_id gen-id, sig_id sig-id, type limit|threshold|both, track by_src|by_dst, count n , seconds m  THRESHOLD COMMAND PARAMETERS:----------------------------This format supports 6 threshold options - all are required.gen_id  gen-id sig_id  sig-idtype    limit, threshold, bothtrack   by_src, by_dstcount   n seconds mGLOBAL THRESHOLDING COMMAND:----------------------------The global threshold options are the same as the standard threshold optionswith the exception of the 'sig_id' field.  The sig_id field must be set to 0 toindicate this threshold command applies to all sig_id values with the specifiedgen_id. To apply the same threshold to all gen_id's at the same time, and withjust one command specify a value of gen_id=0.GLOBAL THRESHOLD COMMAND FORMAT:--------------------------------threshold gen_id gen-id, sig_id 0, type limit|threshold|both, track by_src|by_dst, count n , seconds m  or threshold gen_id 0 , sig_id 0, type limit|threshold|both, track by_src|by_dst, count n , seconds m  THRESHOLD EXAMPLES:------------------# Rule Threshold - Limit to logging 1 event per 60 secondsthreshold gen_id 1, sig_id 1851, type limit, track by_src, count 1, seconds 60# Rule Threshold - Limit to logging every 3rd eventthreshold gen_id 1, sig_id 1852, type threshold, track by_src, count 3, seconds 60# Rule Threshold - Limit to logging just 1 event per 60 seconds, but only if # we exceed 30 events in 60 secondsthreshold gen_id 1, sig_id 1853, type both, track by_src,  count 30, seconds 60# Global Threshold - Limit to logging 1 event per 60 seconds per IP triggering # each rulethreshold gen_id 1, sig_id 0, type limit, track by_src, count 1, seconds 60# Global Threshold - Limit to logging 1 event per 60 seconds per IP triggering # each rule for each event generatorthreshold gen_id 0, sig_id 0, type limit, track by_src, count 1, seconds 60 SUPPRESS COMMAND FORMAT:-----------------------suppress gen_id gen-id, sid_id sid-id, track by_src|by_dst, ip IP/MASK-BITSSUPPRESS COMMAND PARAMETERS:---------------------------The suppress command supports either 2 or 4 options  gen_id     gen-id            # always required sig_id     sig-id            # always requiredtrack      by_src | by_dst   # optional - 4 option versionip         IP[/MASK-BITS]    # optional - 4 option versionSUPPRESS EXAMPLES:----------------- # Suppress this event completelysuppress gen_id 1, sig_id 1852# Suppress this event from this IPsuppress gen_id 1, sig_id 1852, track by_src, ip 10.1.1.54# Suppress this event to this CIDR blocksuppress gen_id 1, sig_id 1852, track by_dst, ip 10.1.1.0/24

⌨️ 快捷键说明

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