Next: Format
Up: Payload Detection Rule Options
Previous: Payload Detection Rule Options
Contents
content
The content keyword is one of the more important features of Snort.
It allows the user to set rules that search for specific content in
the packet payload and trigger response based on that data. Whenever
a content option pattern match is performed, the Boyer-Moore pattern
match function is called and the (rather computationally expensive)
test is performed against the packet contents. If data exactly matching
the argument data string is contained anywhere within the packet's
payload, the test is successful and the remainder of the rule option
tests are performed. Be aware that this test is case sensitive.
The option data for the content keyword is somewhat complex; it can
contain mixed text and binary data. The binary data is generally enclosed
within the pipe ( ) character and represented
as bytecode. Bytecode represents binary data as hexadecimal numbers
and is a good shorthand method for describing complex binary data.
Figure contains an example of mixed text
and binary data in a Snort rule.
Note that multiple content rules can be specified in one rule. This
allows rules to be tailored for less false positives.
If the rule is preceded by a !, the alert will be triggered
on packets that do not contain this content. This is useful when writing
rules that want to alert on packets that do not match a certain pattern
|
Note:
Also note that the following characters must be escaped inside a content
rule:
: ; \ "
|
Subsections
Next: Format
Up: Payload Detection Rule Options
Previous: Payload Detection Rule Options
Contents
Steven Sturges
2006-12-08
|