|
|
|
|
@ -11,7 +11,7 @@ Payload Keywords
|
|
|
|
|
Payload keywords inspect the content of the payload of a packet or
|
|
|
|
|
stream.
|
|
|
|
|
|
|
|
|
|
Content
|
|
|
|
|
content
|
|
|
|
|
-------
|
|
|
|
|
|
|
|
|
|
The content keyword is very important in signatures. Between the
|
|
|
|
|
@ -99,7 +99,7 @@ generated if the the used version of Firefox is not 3.6.13.
|
|
|
|
|
.. note:: The following characters must be escaped inside the content:
|
|
|
|
|
``;`` ``\`` ``"``
|
|
|
|
|
|
|
|
|
|
Nocase
|
|
|
|
|
nocase
|
|
|
|
|
------
|
|
|
|
|
|
|
|
|
|
If you do not want to make a distinction between uppercase and
|
|
|
|
|
@ -120,7 +120,7 @@ Example nocase:
|
|
|
|
|
|
|
|
|
|
It has no influence on other contents in the signature.
|
|
|
|
|
|
|
|
|
|
Depth
|
|
|
|
|
depth
|
|
|
|
|
-----
|
|
|
|
|
|
|
|
|
|
The depth keyword is a absolute content modifier. It comes after the
|
|
|
|
|
@ -136,7 +136,7 @@ Example:
|
|
|
|
|
|
|
|
|
|
.. image:: payload-keywords/content4.png
|
|
|
|
|
|
|
|
|
|
Offset
|
|
|
|
|
offset
|
|
|
|
|
------
|
|
|
|
|
|
|
|
|
|
The offset keyword designates from which byte in the payload will be
|
|
|
|
|
@ -157,7 +157,7 @@ third byte till the sixth byte.
|
|
|
|
|
.. image:: payload-keywords/content6.png
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Distance
|
|
|
|
|
distance
|
|
|
|
|
--------
|
|
|
|
|
|
|
|
|
|
The keyword distance is a relative content modifier. This means it
|
|
|
|
|
@ -188,7 +188,7 @@ possible to attain the same results with other keywords.
|
|
|
|
|
|
|
|
|
|
.. image:: payload-keywords/distance3.png
|
|
|
|
|
|
|
|
|
|
Within
|
|
|
|
|
within
|
|
|
|
|
------
|
|
|
|
|
|
|
|
|
|
The keyword within is relative to the preceding match. The keyword
|
|
|
|
|
@ -214,7 +214,7 @@ payload for a match, use within.
|
|
|
|
|
|
|
|
|
|
.. image:: payload-keywords/within_distance2.png
|
|
|
|
|
|
|
|
|
|
Isdataat
|
|
|
|
|
isdataat
|
|
|
|
|
--------
|
|
|
|
|
|
|
|
|
|
The purpose of the isdataat keyword is to look if there is still data
|
|
|
|
|
@ -238,7 +238,7 @@ You can also use the negation (!) before isdataat.
|
|
|
|
|
|
|
|
|
|
.. image:: payload-keywords/isdataat1.png
|
|
|
|
|
|
|
|
|
|
Dsize
|
|
|
|
|
dsize
|
|
|
|
|
-----
|
|
|
|
|
|
|
|
|
|
With the dsize keyword, you can match on the size of the packet
|
|
|
|
|
@ -280,7 +280,7 @@ Example of the rpc keyword in a rule:
|
|
|
|
|
|
|
|
|
|
alert udp $EXTERNAL_NET any -> $HOME_NET 111 (msg:"RPC portmap request yppasswdd"; :example-rule-emphasis:`rpc:100009,*,*;` reference:bugtraq,2763; classtype:rpc-portmap-decode; sid:1296; rev:4;)
|
|
|
|
|
|
|
|
|
|
Replace
|
|
|
|
|
replace
|
|
|
|
|
-------
|
|
|
|
|
|
|
|
|
|
The replace content modifier can only be used in ips. It adjusts
|
|
|
|
|
|