| Search Site |
| Search Rules |
| Account |
| not registered? |
| can't login? |
| user preferences |
|
|||||||||||||||||||||||||||||||||
|
Next: 3.7 Post-Detection Rule Options Up: 3. Writing Snort Rules: Previous: 3.5 Payload Detection Rule Contents Subsections
3.6 Non-Payload Detection Rule Options
|
|||||||||||||||||||||||||||||||||
| Option | Description |
| to_client | Trigger on server responses from A to B |
| to_server | Trigger on client requests from A to B |
| from_client | Trigger on client requests from A to B |
| from_server | Trigger on server responses from A to B |
| established | Trigger only on established TCP connections |
| stateless | Trigger regardless of the state of the stream processor (useful for packets that are designed to cause machines to crash) |
| no_stream | Do not trigger on rebuilt stream packets (useful for dsize and stream4) |
| only_stream | Only trigger on rebuilt stream packets |
flow: [(established|stateless)]
[,(to_client|to_server|from_client|from_server)]
[,(no_stream|only_stream)]
The flowbits rule option is used in conjunction with conversation
tracking from the Flow preprocessor (see Section
). It allows
rules to track states across transport protocol sessions. The flowbits option
is most useful for TCP sessions, as it allows rules to generically track the
state of an application protocol.
There are seven keywords associated with flowbits. Most of the options need a user-defined name for the specific state that is being checked. This string should be limited to any alphanumeric string including periods, dashes, and underscores.
| Option | Description |
| set | Sets the specified state for the current flow. |
| unset | Unsets the specified state for the current flow. |
| toggle | Sets the specified state if the state is unset, otherwise unsets the state if the state is set. |
| isset | Checks if the specified state is set. |
| isnotset | Checks if the specified state is not set. |
| noalert | Cause the rule to not generate an alert, regardless of the rest of the detection options. |
flowbits: [set|unset|toggle|isset,reset,noalert][,<STATE_NAME>];
The seq keyword is used to check for a specific TCP sequence number.
seq:<number>;
seq:0;
The ack keyword is used to check for a specific TCP acknowledge number.
ack: <number>;
ack:0;
The window keyword is used to check for a specific TCP window size.
window:[!]<number>;
window:55808;
The itype keyword is used to check for a specific ICMP type value.
itype:[<|>]<number>[<><number>];
This example looks for an ICMP type greater than 30.
itype:>30;
The itype keyword is used to check for a specific ICMP code value.
icode: [<|>]<number>[<><number>];
code:>30;
The itype keyword is used to check for a specific ICMP ID value.
This is useful because some covert channel programs use static ICMP fields when they communicate. This particular plugin was developed to detect the stacheldraht DDoS agent.
icmp_id:<number>;
This example looks for an ICMP ID of 0.
icmp_id:0;
The itype keyword is used to check for a specific ICMP sequence value.
This is useful because some covert channel programs use static ICMP fields when they communicate. This particular plugin was developed to detect the stacheldraht DDoS agent.
icmp_seq: <number>;
This example looks for an ICMP Sequence of 0.
icmp_seq:0;
The rpc keyword is used to check for a RPC application, version, and procedure numbers in SUNRPC CALL requests.
Wildcards are valid for both version and procedure numbers by using '*';
rpc: <application number>, [<version number>|*], [<procedure number>|*]>;
The following example looks for an RPC portmap GETPORT request.
alert tcp any any -> any 111 (rpc: 100000,*,3;);
Because of the fast pattern matching engine, the RPC keyword is slower than looking for the RPC values by using normal content matching.
The ip_proto keyword allows checks against the IP protocol header. For a list of protocols that may be specified by name, see /etc/protocols.
ip_proto:[!><] <name or number>;
alert ip any any -> any any (ip_proto:igmp;)
The sameip keyword allows rules to check if the source ip is the same as the destination IP.
sameip;
This example looks for any traffic where the Source IP and the Destination IP is the same.
alert ip any any -> any any (sampeip;)
| site feedback | Terms of Use | Privacy Policy | forum archives ©2008 Snort and Sourcefire are registered trademarks of Sourcefire, Inc. All rights reserved. |