From e2368b54a0d454f7521618ae97fc361318bc428d Mon Sep 17 00:00:00 2001 From: Bill Meeks Date: Sun, 20 Jan 2013 01:10:38 -0500 Subject: Add IPS policy select, auto-flowbit resolution and bug fixes. --- config/snort/snort_preprocessors.php | 101 ++++++++++++++++++++++++++++++----- 1 file changed, 88 insertions(+), 13 deletions(-) mode change 100644 => 100755 config/snort/snort_preprocessors.php (limited to 'config/snort/snort_preprocessors.php') diff --git a/config/snort/snort_preprocessors.php b/config/snort/snort_preprocessors.php old mode 100644 new mode 100755 index d59af640..25e176cb --- a/config/snort/snort_preprocessors.php +++ b/config/snort/snort_preprocessors.php @@ -55,10 +55,13 @@ if (isset($id) && $a_nat[$id]) { /* new options */ $pconfig['perform_stat'] = $a_nat[$id]['perform_stat']; - $pconfig['flow_depth'] = $a_nat[$id]['flow_depth']; + $pconfig['server_flow_depth'] = $a_nat[$id]['server_flow_depth']; + $pconfig['client_flow_depth'] = $a_nat[$id]['client_flow_depth']; $pconfig['max_queued_bytes'] = $a_nat[$id]['max_queued_bytes']; $pconfig['max_queued_segs'] = $a_nat[$id]['max_queued_segs']; + $pconfig['stream5_mem_cap'] = $a_nat[$id]['stream5_mem_cap']; $pconfig['http_inspect'] = $a_nat[$id]['http_inspect']; + $pconfig['noalert_http_inspect'] = $a_nat[$id]['noalert_http_inspect']; $pconfig['other_preprocs'] = $a_nat[$id]['other_preprocs']; $pconfig['ftp_preprocessor'] = $a_nat[$id]['ftp_preprocessor']; $pconfig['smtp_preprocessor'] = $a_nat[$id]['smtp_preprocessor']; @@ -69,6 +72,8 @@ if (isset($id) && $a_nat[$id]) { $pconfig['ssl_preproc'] = $a_nat[$id]['ssl_preproc']; $pconfig['pop_preproc'] = $a_nat[$id]['pop_preproc']; $pconfig['imap_preproc'] = $a_nat[$id]['imap_preproc']; + $pconfig['dnp3_preproc'] = $a_nat[$id]['dnp3_preproc']; + $pconfig['modbus_preproc'] = $a_nat[$id]['modbus_preproc']; } if ($_POST) { @@ -78,12 +83,15 @@ if ($_POST) { /* if no errors write to conf */ if (!$input_errors) { /* post new options */ - if ($_POST['flow_depth'] != "") { $natent['flow_depth'] = $_POST['flow_depth']; }else{ $natent['flow_depth'] = ""; } + if ($_POST['server_flow_depth'] != "") { $natent['server_flow_depth'] = $_POST['server_flow_depth']; }else{ $natent['server_flow_depth'] = ""; } + if ($_POST['client_flow_depth'] != "") { $natent['client_flow_depth'] = $_POST['client_flow_depth']; }else{ $natent['client_flow_depth'] = ""; } if ($_POST['max_queued_bytes'] != "") { $natent['max_queued_bytes'] = $_POST['max_queued_bytes']; }else{ $natent['max_queued_bytes'] = ""; } if ($_POST['max_queued_segs'] != "") { $natent['max_queued_segs'] = $_POST['max_queued_segs']; }else{ $natent['max_queued_segs'] = ""; } + if ($_POST['stream5_mem_cap'] != "") { $natent['stream5_mem_cap'] = $_POST['stream5_mem_cap']; }else{ $natent['stream5_mem_cap'] = ""; } $natent['perform_stat'] = $_POST['perform_stat'] ? 'on' : 'off'; $natent['http_inspect'] = $_POST['http_inspect'] ? 'on' : 'off'; + $natent['noalert_http_inspect'] = $_POST['noalert_http_inspect'] ? 'on' : 'off'; $natent['other_preprocs'] = $_POST['other_preprocs'] ? 'on' : 'off'; $natent['ftp_preprocessor'] = $_POST['ftp_preprocessor'] ? 'on' : 'off'; $natent['smtp_preprocessor'] = $_POST['smtp_preprocessor'] ? 'on' : 'off'; @@ -94,6 +102,8 @@ if ($_POST) { $natent['ssl_preproc'] = $_POST['ssl_preproc'] ? 'on' : 'off'; $natent['pop_preproc'] = $_POST['pop_preproc'] ? 'on' : 'off'; $natent['imap_preproc'] = $_POST['imap_preproc'] ? 'on' : 'off'; + $natent['dnp3_preproc'] = $_POST['dnp3_preproc'] ? 'on' : 'off'; + $natent['modbus_preproc'] = $_POST['modbus_preproc'] ? 'on' : 'off'; if (isset($id) && $a_nat[$id]) $a_nat[$id] = $natent; @@ -175,7 +185,7 @@ include_once("head.inc"); - onClick="enable_change(false)"> + onClick="enable_change(false)"> @@ -193,19 +203,45 @@ include_once("head.inc"); -
-1 " . - "to 1460 (-1 disables HTTP " . + -1 " . + "to 65535 (-1 disables HTTP " . "inspect, 0 enables all HTTP inspect)"); ?>

0"); ?>
+ "are specified in bytes. Recommended setting is maximum (65535). Default value is 300"); ?>
+ + + + + + + +
-1 " . + "to 1460 (-1 disables HTTP " . + "inspect, 0 enables all HTTP inspect)"); ?>
+
+ 300"); ?>
+ + + + + + onClick="enable_change(false)"> + @@ -215,7 +251,7 @@ include_once("head.inc");
1024, Maximum is 1073741824 " . "( default value is 1048576, 0 " . @@ -232,7 +268,7 @@ include_once("head.inc"); + + + + @@ -266,7 +318,7 @@ include_once("head.inc"); + + + + + + + + + + + + + -- cgit v1.2.3
2, Maximum is 1073741824 " . "( default value is 2621, 0 means " . @@ -243,6 +279,22 @@ include_once("head.inc"); "in memory. Default value is 2621"); ?>
+ + + + +
+ 32768, Maximum is 1073741824 " . + "( default value is 8388608) "); ?>
+ 8388608 (8 MB)"); ?>
+

-
@@ -275,7 +327,7 @@ include_once("head.inc");

-
@@ -333,7 +385,30 @@ include_once("head.inc"); onClick="enable_change(false)">
- + +

+ + onClick="enable_change(false)">
+ +

+ + onClick="enable_change(false)">
+