next up previous contents
Next: Rule Options Up: Rules Headers Previous: The Direction Operator   Contents


Activate/Dynamic Rules

Note:  

Activate and Dynamic rules are being phased out in favor of a combination of tagging (3.7.5) and flowbits (3.6.10).

Activate/dynamic rule pairs give Snort a powerful capability. You can now have one rule activate another when it's action is performed for a set number of packets. This is very useful if you want to set Snort up to perform follow on recording when a specific rule goes off. Activate rules act just like alert rules, except they have a *required* option field: activates. Dynamic rules act just like log rules, but they have a different option field: activated_by. Dynamic rules have a second required field as well, count.

Activate rules are just like alerts but also tell Snort to add a rule when a specific network event occurs. Dynamic rules are just like log rules except are dynamically enabled when the activate rule id goes off.

Put 'em together and they look like Figure 3.7.

Figure 3.7: Activate/Dynamic Rule Example
\begin{figure}\begin{verbatim}activate tcp !$HOME_NET any -> $HOME_NET 143 (f...
...ny -> $HOME_NET 143 (activated_by:1; count:50;)\end{verbatim}
\par\end{figure}

These rules tell Snort to alert when it detects an IMAP buffer overflow and collect the next 50 packets headed for port 143 coming from outside $HOME_NET headed to $HOME_NET. If the buffer overflow happened and was successful, there's a very good possibility that useful data will be contained within the next 50 (or whatever) packets going to that same service port on the network, so there's value in collecting those packets for later analysis.


next up previous contents
Next: Rule Options Up: Rules Headers Previous: The Direction Operator   Contents
Eugene Misnik 2013-05-08