| Search Site |
| Search Rules |
| Account |
| not registered? |
| can't login? |
| user preferences |
|
|||||||||||||||||||||||
|
Next: 3.8 Writing Good Rules Up: 3. Writing Snort Rules Previous: 3.6 Non-payload Detection Rule   Contents Subsections 3.7 Post-Detection Rule Options3.7.1 logtoThe logto option tells Snort to log all packets that trigger this rule to a special output log file. This is especially handy for combining data from things like NMAP activity, HTTP CGI scans, etc. It should be noted that this option does not work when Snort is in binary logging mode.
3.7.1.1 Format
logto:"filename";
3.7.2 sessionThe session keyword is built to extract user data from TCP Sessions. There are many cases where seeing what users are typing in telnet, rlogin, ftp, or even web sessions is very useful. There are two available argument keywords for the session rule option, printable or all. The printable keyword only prints out data that the user would normally see or be able to type. The all keyword substitutes non-printable characters with their hexadecimal equivalents.
3.7.2.1 Format
session: [printable|all];
3.7.2.2 ExampleThe following example logs all printable strings in a telnet packet.log tcp any any <> any 23 (session:printable;)
3.7.2.3 WarningsUsing the session keyword can slow Snort down considerably, so it should not be used in heavy load situations. The session keyword is best suited for post-processing binary (pcap) log files.
3.7.3 respThe resp keyword is used attempt to close sessions when an alert is triggered. In Snort, this is called flexible response. Flexible Response supports the following mechanisms for attempting to close sessions:
These options can be combined to send multiple responses to the target host.
3.7.3.1 Format
resp: <resp_mechanism>[,<resp_mechanism>[,<resp_mechanism>]];
3.7.3.2 WarningsThis functionality is not built in by default. Use the -enable-flexresp flag to configure when building Snort to enable this functionality. Be very careful when using Flexible Response. It is quite easy to get Snort into an infinite loop by defining a rule such as:
alert tcp any any -> any any (resp:rst_all;) It is easy to be fooled into interfering with normal network traffic as well.
3.7.3.3 ExampleThe following example attempts to reset any TCP connection to port 1524. alert tcp any any -> any 1524 (flags:S; resp:rst_all;)
3.7.4 ReactThe react keyword based on flexible response (Flex Resp) implements flexible reaction to traffic that matches a Snort rule. The basic reaction is blocking interesting sites users want to access: New York Times, slashdot, or something really important - napster and porn sites. The Flex Resp code allows Snort to actively close offending connections and/or send a visible notice to the browser (warn modifier available soon). The notice may include your own comment. The following arguments (basic modifiers) are valid for this option:
3.7.4.1 Format
react: <react_basic_modifier[, react_additional_modifier]>;
3.7.4.2 WarningsThis functionality is not built in by default. Use the -enable-flexresp flag to configure when building Snort to enable this functionality. Be very careful when using react. Causing a network traffic generation loop is very easy to do with this functionality.
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||