2.3.1 Configuring

The decoder and preprocessor rules are located in the preproc_rules/ directory in the top level source tree, and have the names decoder.rules and preprocessor.rules respectively. These files are updated as new decoder and preprocessor events are added to Snort. The gen-msg.map under etc directory is also updated with new decoder and preprocessor rules.

To enable these rules in snort.conf, define the path to where the rules are located and uncomment the include lines in snort.conf that reference the rules files.

verbatim473#

To disable any rule, just comment it with a # or remove the rule completely from the file (commenting is recommended).

To change the rule type or action of a decoder/preprocessor rule, just replace alert with the desired rule type. Any one of the following rule types can be used:

verbatim474#

For example one can change:

verbatim475#

to

verbatim476#

to drop (as well as alert on) packets where the Ethernet protocol is IPv4 but version field in IPv4 header has a value other than 4.

See README.decode, README.gre and the various preprocessor READMEs for descriptions of the rules in decoder.rules and preprocessor.rules.

The generator ids ( gid ) for different preprocessors and the decoder are as follows:


Generator Id Module ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
105 Back Orifice preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
106 RPC Decode preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
112 Arpspoof preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
116 Snort Decoder ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
119 HTTP Inspect preprocessor ( Client ) ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
120 HTTP Inspect preprocessor ( Server ) ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
122 Portscan preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
123 Frag3 preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
124 SMTP preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
125 FTP (FTP) preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
126 FTP (Telnet) preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
127 ISAKMP preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
128 SSH preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
129 Stream preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
131 DNS preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
132 Skype preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
133 DceRpc2 preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
134 PPM preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
136 Reputation preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
137 SSL preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
139 SDF preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
140 SIP preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
141 IMAP preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
142 POP preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;
143 GTP preprocessor ;SPMnbsp; ;SPMnbsp; ;SPMnbsp; ;SPMnbsp;