summaryrefslogtreecommitdiffstats
path: root/suricata/update/configs
diff options
context:
space:
mode:
Diffstat (limited to 'suricata/update/configs')
-rw-r--r--suricata/update/configs/__init__.py31
-rw-r--r--suricata/update/configs/disable.conf19
-rw-r--r--suricata/update/configs/drop.conf11
-rw-r--r--suricata/update/configs/enable.conf19
-rw-r--r--suricata/update/configs/modify.conf24
-rw-r--r--suricata/update/configs/threshold.in22
-rw-r--r--suricata/update/configs/update.yaml58
7 files changed, 184 insertions, 0 deletions
diff --git a/suricata/update/configs/__init__.py b/suricata/update/configs/__init__.py
new file mode 100644
index 0000000..e136c7a
--- /dev/null
+++ b/suricata/update/configs/__init__.py
@@ -0,0 +1,31 @@
+# Copyright (C) 2017 Open Information Security Foundation
+#
+# You can copy, redistribute or modify this Program under the terms of
+# the GNU General Public License version 2 as published by the Free
+# Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# version 2 along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+import os.path
+
+# The list of sample config files provided here, for use when asked to
+# dump them.
+filenames = [
+ "update.yaml",
+ "enable.conf",
+ "disable.conf",
+ "modify.conf",
+ "drop.conf",
+ "threshold.in",
+]
+
+directory = os.path.dirname(__file__)
+
diff --git a/suricata/update/configs/disable.conf b/suricata/update/configs/disable.conf
new file mode 100644
index 0000000..59d0e18
--- /dev/null
+++ b/suricata/update/configs/disable.conf
@@ -0,0 +1,19 @@
+# suricata-update - disable.conf
+
+# Example of disabling a rule by signature ID (gid is optional).
+# 1:2019401
+# 2019401
+
+# Example of disabling a rule by regular expression.
+# - All regular expression matches are case insensitive.
+# re:heartbleed
+# re:MS(0[7-9]|10)-\d+
+
+# Examples of disabling a group of rules.
+# group:emerging-icmp.rules
+# group:emerging-dos
+# group:emerging*
+
+# Disable all rules with a metadata of "deployment perimeter". Note that metadata
+# matches are case insensitive.
+# metadata: deployment perimeter \ No newline at end of file
diff --git a/suricata/update/configs/drop.conf b/suricata/update/configs/drop.conf
new file mode 100644
index 0000000..a93268d
--- /dev/null
+++ b/suricata/update/configs/drop.conf
@@ -0,0 +1,11 @@
+# suricata-update - drop.conf
+#
+# Rules matching specifiers in this file will be converted to drop rules.
+#
+# Examples:
+#
+# 1:2019401
+# 2019401
+#
+# re:heartbleed
+# re:MS(0[7-9]|10)-\d+
diff --git a/suricata/update/configs/enable.conf b/suricata/update/configs/enable.conf
new file mode 100644
index 0000000..ad7b4e2
--- /dev/null
+++ b/suricata/update/configs/enable.conf
@@ -0,0 +1,19 @@
+# suricata-update - enable.conf
+
+# Example of enabling a rule by signature ID (gid is optional).
+# 1:2019401
+# 2019401
+
+# Example of enabling a rule by regular expression.
+# - All regular expression matches are case insensitive.
+# re:heartbleed
+# re:MS(0[7-9]|10)-\d+
+
+# Examples of enabling a group of rules.
+# group:emerging-icmp.rules
+# group:emerging-dos
+# group:emerging*
+
+# Enable all rules with a metadata of "deployment perimeter". Note that metadata
+# matches are case insensitive.
+# metadata: deployment perimeter \ No newline at end of file
diff --git a/suricata/update/configs/modify.conf b/suricata/update/configs/modify.conf
new file mode 100644
index 0000000..70bfb3e
--- /dev/null
+++ b/suricata/update/configs/modify.conf
@@ -0,0 +1,24 @@
+# suricata-update - modify.conf
+
+# Format: <sid> "<from>" "<to>"
+
+# Example changing the seconds for rule 2019401 to 3600.
+# 2019401 "seconds \d+" "seconds 3600"
+#
+# Example converting all alert rules to drop:
+# re:. ^alert drop
+#
+# Example converting all drop rules with noalert back to alert:
+# re:. "^drop(.*)noalert(.*)" "alert\\1noalert\\2"
+
+# Change all trojan-activity rules to drop. Its better to setup a
+# drop.conf for this, but this does show the use of back references.
+# re:classtype:trojan-activity "(alert)(.*)" "drop\\2"
+
+# For compatibility, most Oinkmaster modifysid lines should work as
+# well.
+# modifysid * "^drop(.*)noalert(.*)" | "alert${1}noalert${2}"
+
+# Add metadata.
+#metadata-add re:"SURICATA STREAM" "evebox-action" "archive"
+#metadata-add 2010646 "evebox-action" "archive" \ No newline at end of file
diff --git a/suricata/update/configs/threshold.in b/suricata/update/configs/threshold.in
new file mode 100644
index 0000000..377417d
--- /dev/null
+++ b/suricata/update/configs/threshold.in
@@ -0,0 +1,22 @@
+# suricata-update - threshold.in
+
+# This file contains thresholding configurations that will be turned into
+# a Suricata compatible threshold.conf file.
+
+# This file can contain standard threshold.conf configurations:
+#
+# suppress gen_id <gid>, sig_id <sid>
+# suppress gen_id <gid>, sig_id <sid>, track <by_src|by_dst>, ip <ip|subnet>
+# threshold gen_id 0, sig_id 0, type threshold, track by_src, count 10, seconds 10
+# suppress gen_id 1, sig_id 2009557, track by_src, ip 217.110.97.128/25
+
+# Or ones that will be preprocessed...
+
+# Suppress all rules containing "java".
+#
+# suppress re:java
+# suppress re:java, track by_src, ip 217.110.97.128/25
+
+# Threshold all rules containing "java".
+#
+# threshold re:java, type threshold, track by_dst, count 1, seconds 10
diff --git a/suricata/update/configs/update.yaml b/suricata/update/configs/update.yaml
new file mode 100644
index 0000000..358e869
--- /dev/null
+++ b/suricata/update/configs/update.yaml
@@ -0,0 +1,58 @@
+# Configuration with disable filters.
+# - Overrided by --disable-conf
+# - Default: /etc/suricata/disable.conf
+disable-conf: /etc/suricata/disable.conf
+
+# Configuration with enable filters.
+# - Overrided by --enable-conf
+# - Default: /etc/suricata/enable.conf
+enable-conf: /etc/suricata/enable.conf
+
+# Configuration with drop filters.
+# - Overrided by --drop-conf
+# - Default: /etc/suricata/drop.conf
+drop-conf: /etc/suricata/drop.conf
+
+# Configuration with modify filters.
+# - Overrided by --modify-conf
+# - Default: /etc/suricata/modify.conf
+modify-conf: /etc/suricata/modify.conf
+
+# List of files to ignore. Overrided by the --ignore command line option.
+ignore:
+ - "*deleted.rules"
+
+# Override the user-agent string.
+#user-agent: "Suricata-Update"
+
+# Provide an alternate command to the default test command.
+#
+# The following environment variables can be used.
+# SURICATA_PATH - The path to the discovered suricata program.
+# OUTPUT_DIR - The directory the rules are written to.
+# OUTPUT_FILENAME - The name of the rule file. Will be empty if the rules
+# were not merged.
+#test-command: ${SURICATA_PATH} -T -S ${OUTPUT_FILENAME} -l /tmp
+
+# Provide a command to reload the Suricata rules.
+# May be overrided by the --reload-command command line option.
+# See the documentation of --reload-command for the different options
+# to reload Suricata rules.
+#reload-command: sudo systemctl reload suricata
+
+# Remote rule sources. Simply a list of URLs.
+sources:
+ # Emerging Threats Open with the Suricata version dynamically replaced.
+ - https://rules.emergingthreats.net/open/suricata-%(__version__)s/emerging.rules.tar.gz
+ # The SSL blacklist, which is just a standalone rule file.
+ - https://sslbl.abuse.ch/blacklist/sslblacklist.rules
+
+# A list of local rule sources. Each entry can be a rule file, a
+# directory or a wild card specification.
+local:
+ # A directory of rules.
+ - /etc/suricata/rules
+ # A single rule file.
+ - /etc/suricata/rules/app-layer-events.rules
+ # A wildcard.
+ - /etc/suricata/rules/*.rules