– Overview – POP is an POP3 decoder for user applications. Given a data buffer, POP will decode the buffer and find POP3 commands and responses. It will also mark the command, data header data body sections and extract the POP3 attachments and decode it appropriately.
POP will handle stateful processing. It saves state between individual packets. However maintaining correct state is dependent on the reassembly of the server side of the stream (i.e., a loss of coherent stream data results in a loss of state).
Stream5 should be turned on for POP. Please ensure that the POP ports are added to the stream5 ports for proper reassembly.
– Configuration –
The configuration options are described below:
ports { port [port] … } * This specifies on what ports to check for POP data. Typically, this will include 110. Default ports if none are specified are 110 .
disabled * Disables the POP preprocessor in a config. This is useful when specifying the decoding depths such as b64_decode_depth, qp_decode_depth, uu_decode_depth, bitenc_decode_depth or the memcap used for decoding in default config without turning on the POP preprocessor.
b64_decode_depth * This config option is used to turn off/on or set the base64 decoding depth used to decode the base64 encoded MIME attachments. The value ranges from -1 to 65535. A value of -1 turns off the base64 decoding of MIME attachments. The value of 0 sets the decoding of base64 encoded MIME attachments to unlimited. A value other than 0 or -1 restricts the decoding of base64 MIME attachments, and applies per attachment. A POP preprocessor alert with sid 4 is generated (if enabled) when the decoding fails.
Multiple MIME attachments/data in one packet are pipelined. When stateful inspection is turned on the base64 encoded MIME attachments/data across multiple packets are decoded too.
The decoded data is available for detection using the rule option file_data. See file_data rule option for more details.
It is recommended that user inputs a value that is a multiple of 4. When the value specified is not a multiple of 4, the POP preprocessor will round it up to the next multiple of 4.
In case of multiple configs, the value specified in the non-default config cannot exceed the value specified in the default config.
Multiple MIME attachments/data in one packet are pipelined. When stateful inspection is turned on the QP encoded MIME attachments/data across multiple packets are decoded too.
The decoded data is available for detection using the rule option file_data. See file_data rule option for more details.
In case of multiple configs, the value specified in the non-default config cannot exceed the value specified in the default config.
Multiple MIME attachments/data in one packet are pipelined. When stateful inspection is turned on the non-encoded MIME attachments/data across multiple packets are extracted too.
The extracted data is available for detection using the rule option file_data. See file_data rule option for more details.
In case of multiple configs, the value specified in the non-default config cannot exceed the value specified in the default config.
Multiple UU Encoded attachments/data in one packet are pipelined. When stateful inspection is turned on the UU encoded attachments/data across multiple packets are decoded too.
The decoded data is available for detection using the rule option file_data. See file_data rule option for more details.
In case of multiple configs, the value specified in the non-default config cannot exceed the value specified in the default config.
This option along with the maximum of the decoding depths will determine the POP sessions that will be decoded at any given instant. The default value for this option is 838860.
Note: It is suggested to set this value such that the max pop session calculated as follows is at least 1.
max pop session = memcap /(2 * max of (b64_decode_depth, uu_decode_depth, qp_decode_depth or bitenc_decode_depth))
For example, if b64_decode_depth is 0 (indicates unlimited decoding) and qp_decode_depth is 100, then
max pop session = memcap/2*65535 (max value for b64_decode_depth)
In case of multiple configs, the memcap of the non-default configs will be overwritten by the default config’s value. Hence user needs to define it in the default config with the new keyword disabled (used to disable POP preprocessor in a config).
When the memcap for decoding (memcap) is exceeded the POP preprocessor alert with sid 3 is generated (when enabled).
Example: preprocessor pop: \ ports { 110 } \ memcap 1310700 \ qp_decode_depth -1 \ b64_decode_depth 0 \ bitenc_decode_depth 100
preprocessor pop: \ memcap 1310700 \ qp_decode_depth 0 \ disabled
Default: preprocessor pop: \ ports { 110 } \ b64_decode_depth 1460 \ qp_decode_depth 1460 \ bitenc_decode_depth 1460 \ uu_decode_depth 1460
The POP preprocessor uses GID 142 to register events.
1 Alert if POP encounters an invalid POP3 command. 2 Alert if POP encounters an invalid POP3 response. 3 If the decoding memory cap (memcap) is reached and the preprocessor is configured to alert, this alert will be created. 4 If the decoding of a base64 MIME attachments fails or when the decoding stops due to exceeded b64_decode_depth. 5 If the decoding of a Quoted-Printable MIME attachments fails or when the decoding stops due to exceeded qp_decode_depth. 7 If the decoding of a Unix-to-Unix encoded attachments fails or when the decoding stops due to exceeded uu_decode_depth.