From a101dddc6796ba2e98645ea326bb87a529b8d19d Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Thu, 25 Apr 2013 21:16:01 -0400 Subject: Update Snort package to ver 2.5.7 - bug fixes and new features --- config/snort/snort_preprocessors.php | 86 ++++++++++++++++++++++++++++++++---- 1 file changed, 77 insertions(+), 9 deletions(-) (limited to 'config/snort/snort_preprocessors.php') diff --git a/config/snort/snort_preprocessors.php b/config/snort/snort_preprocessors.php index 5cd5a408..cf6146cf 100755 --- a/config/snort/snort_preprocessors.php +++ b/config/snort/snort_preprocessors.php @@ -35,6 +35,7 @@ require_once("guiconfig.inc"); require_once("/usr/local/pkg/snort/snort.inc"); global $g, $rebuild_rules; +$snortlogdir = SNORTLOGDIR; if (!is_array($config['installedpackages']['snortglobal'])) { $config['installedpackages']['snortglobal'] = array(); @@ -89,8 +90,36 @@ if (isset($id) && $a_nat[$id]) { /* the Sensitive Data (sdf) preprocessor. */ if ($vrt_enabled == "off") $pconfig['sensitive_data'] = "off"; + + /**********************************************************/ + /* To keep new users from shooting themselves in the foot */ + /* enable the most common and necessary preprocessors by */ + /* default. */ + /**********************************************************/ + if (empty($pconfig['ftp_preprocessor'])) + $pconfig['ftp_preprocessor'] = 'on'; + if (empty($pconfig['smtp_preprocessor'])) + $pconfig['smtp_preprocessor'] = 'on'; + if (empty($pconfig['dce_rpc_2'])) + $pconfig['dce_rpc_2'] = 'on'; + if (empty($pconfig['dns_preprocessor'])) + $pconfig['dns_preprocessor'] = 'on'; + if (empty($pconfig['ssl_preproc'])) + $pconfig['ssl_preproc'] = 'on'; + if (empty($pconfig['pop_preproc'])) + $pconfig['pop_preproc'] = 'on'; + if (empty($pconfig['imap_preproc'])) + $pconfig['imap_preproc'] = 'on'; + if (empty($pconfig['sip_preproc'])) + $pconfig['sip_preproc'] = 'on'; + if (empty($pconfig['other_preprocs'])) + $pconfig['other_preprocs'] = 'on'; } +/* Define the "disabled_preproc_rules.log" file for this interface */ +$iface = snort_get_friendly_interface($pconfig['interface']); +$disabled_rules_log = "{$snortlogdir}/{$iface}_disabled_preproc_rules.log"; + if ($_POST) { $natent = array(); $natent = $pconfig; @@ -135,6 +164,10 @@ if ($_POST) { $natent['preproc_auto_rule_disable'] = $_POST['preproc_auto_rule_disable'] ? 'on' : 'off'; $natent['protect_preproc_rules'] = $_POST['protect_preproc_rules'] ? 'on' : 'off'; + /* If 'preproc_auto_rule_disable' is off, then clear log file */ + if ($natent['preproc_auto_rule_disable'] == 'off') + @unlink("{$disabled_rules_log}"); + if (isset($id) && $a_nat[$id]) $a_nat[$id] = $natent; else { @@ -193,6 +226,25 @@ include_once("head.inc"); + + +
@@ -261,6 +313,13 @@ include_once("head.inc"); "disabled preprocessors, but can substantially compromise the level of protection by " . "automatically disabling detection rules."); ?> + 0): ?> + + + + +
  +    
@@ -441,7 +500,8 @@ include_once("head.inc"); type="checkbox" value="on" onClick="enable_change(false)">
- + " . gettext("Checked") . ""; ?>
@@ -450,7 +510,8 @@ include_once("head.inc"); type="checkbox" value="on" onClick="enable_change(false)">
- + " . gettext("Checked") . ""; ?>
@@ -459,7 +520,8 @@ include_once("head.inc"); type="checkbox" value="on" onClick="enable_change(false)">
- + " . gettext("Checked") . ""; ?>
@@ -468,7 +530,8 @@ include_once("head.inc"); type="checkbox" value="on" onClick="enable_change(false)">
- + " . gettext("Checked") . ""; ?>
@@ -477,7 +540,8 @@ include_once("head.inc"); type="checkbox" value="on" onClick="enable_change(false)">
- + " . gettext("Checked") . ""; ?>
@@ -486,7 +550,8 @@ include_once("head.inc"); type="checkbox" value="on" onClick="enable_change(false)">
- + " . gettext("Checked") . ""; ?>
@@ -495,7 +560,8 @@ include_once("head.inc"); type="checkbox" value="on" onClick="enable_change(false)">
- + " . gettext("Checked") . ""; ?>
@@ -513,7 +579,8 @@ include_once("head.inc"); type="checkbox" value="on" onClick="enable_change(false)">
- + " . gettext("Checked") . ""; ?>
@@ -521,7 +588,8 @@ include_once("head.inc"); onClick="enable_change(false)">
- + " . gettext("Checked") . ""; ?> -- cgit v1.2.3