Skip to content

Commit bd26a4c

Browse files
Merge pull request #168 from Security-Onion-Solutions/idstools-refactor
Initial docs update for idstools refactor
2 parents bca521c + 25af0bc commit bd26a4c

File tree

4 files changed

+61
-86
lines changed

4 files changed

+61
-86
lines changed

detections.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ Here is the list of possible status messages and what they mean:
3030
- **Migration Failed**: A failure occurred during the migration. The migration will stop on the first error and will not attempt to migrate to newer versions until the issue is resolved.
3131
- **Synchronizing**: A rule synchronization is in progress. This occurs daily, to ensure the Security Onion grid has the latest rules.
3232
- **Sync Failed**: A failure occurred during the synchronization procedure. The next sync will retry within a few minutes.
33-
- **Rule Mismatch**: An integrity check process detected a mismatch between the deployed rules and the enabled rules. The SOC log will note the specific mismatched rules. One possible reason for this is if you had previously added custom rules to /opt/so/saltstack/local/salt/idstools/rules/local.rules and, if this is the case, then you can remove the rules from that file and re-add them using the Detections interface. Another possible reason is that :ref:`elasticsearch` has reached its disk watermark setting and is no longer allowing updates to the Detections indices.
33+
- **Sync Blocked**: Rule synchronization is currently blocked.
34+
- **Rule Mismatch**: An integrity check process detected a mismatch between the deployed rules and the enabled rules. The SOC log will note the specific mismatched rules. One possible reason is that :ref:`elasticsearch` has reached its disk watermark setting and is no longer allowing updates to the Detections indices.
3435
- **OK**: No known issues with the rule engine.
3536

3637
.. tip::
@@ -147,8 +148,8 @@ Elastalert/Sigma
147148
- Immediate change in the UI and on disk
148149

149150
Suricata/NIDS
150-
- UI Bulk and Individual: Immediate change in the UI, disk change once the `idstools` state runs again
151-
- Regex: UI and disk change once the `soc` state runs again and the :ref:`suricata` engine syncs
151+
- UI Bulk and Individual: Immediate change in the UI and on disk
152+
- Regex: UI and disk change once the :ref:`suricata` engine syncs
152153

153154
Strelka/YARA
154155
- Immediate change in the UI, disk change once the `strelka` state runs again
@@ -160,7 +161,7 @@ Elastalert/Sigma
160161
- Immediate change in the UI and on disk
161162

162163
Suricata/NIDS
163-
- Immediate change in the UI, disk change once the `idstools` state runs again
164+
- Immediate change in the UI and on disk
164165

165166
Strelka/YARA
166167
- N/A
@@ -173,9 +174,7 @@ Elastalert/Sigma
173174
- Git repo (https or disk): UI and disk change once the `soc` state runs again and the :ref:`elastalert` engine syncs
174175

175176
Suricata/NIDS
176-
- ETOPEN/ETPRO: UI and disk change once the `soc` and `idstools` states run again and the :ref:`suricata` engine syncs
177-
- Custom URL: UI and disk change once the `soc` and `idstools` states run again and the :ref:`suricata` engine syncs
178-
- Custom Local File: UI and disk change once the `soc` and `idstools` states run again and the :ref:`suricata` engine syncs
177+
- All ruleset sources (ETOPEN, ETPRO, custom URL, local directory): UI and disk change once the :ref:`suricata` engine syncs
179178

180179
Strelka/YARA
181180
- Git repo (https or disk): UI and disk change once the `soc` state runs again and the :ref:`strelka` engine syncs

images/config-item-idstools.png

-157 KB
Binary file not shown.

nids.rst

Lines changed: 53 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -87,106 +87,82 @@ You can enable external access to NIDS rules managed by :ref:`detections`. This
8787
- You can wait for the next grid update or click the ``SYNCHRONIZE GRID`` button under Options.
8888
- Once the grid is fully synchronized, the manager should listen on port 7789 for https connections from hosts defined in the ``external_suricata`` host group.
8989

90-
Changing to a Different Ruleset
91-
-------------------------------
90+
Configuring Rulesets
91+
--------------------
9292

93-
Security Onion includes the Emerging Threats Open (ETOPEN) ruleset by default. If you would like to change to a different ruleset, you can do this via :ref:`administration` --> Configuration --> idstools --> config --> ruleset.
93+
Security Onion allows you to configure multiple NIDS rulesets. You can manage these rulesets by navigating to :ref:`administration` --> Configuration --> soc --> config --> server --> modules --> suricataengine --> rulesetSources.
9494

95-
.. image:: images/config-item-idstools.png
96-
:target: _images/config-item-idstools.png
95+
By default, Security Onion includes the Emerging Threats Open (ETOPEN) ruleset. You can enable additional rulesets, add custom rulesets, or disable existing ones.
9796

98-
Security Onion offers the following choices for NIDS rulesets. The main options are ETOPEN (free) and ETPRO (commercial) but advanced users may choose a Snort ruleset if they understand the caveats as shown below.
97+
Ruleset Configuration Options
98+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9999

100-
ETOPEN
101-
~~~~~~
100+
Each ruleset source has the following configuration options:
102101

103-
- default ruleset included in Security Onion
104-
- optimized for :ref:`suricata`
105-
- **free**
102+
- **Ruleset Name**: Required. The unique name for this ruleset (e.g., "Emerging-Threats", "ABUSECH-SSLBL", "local-rules"). This is the name displayed in the UI.
103+
- **Description**: Optional description of the ruleset.
104+
- **Enabled**: Required. If set to false, existing rules and overrides from this ruleset will be removed.
105+
- **License Key**: Optional. Required for commercial rulesets like ET Pro.
106+
- **Source Type**: Required. Either ``url`` (downloads rules from HTTPS) or ``directory`` (reads .rules files from local filesystem).
107+
- **Source Path**: Required. The full URL or directory path depending on Source Type.
108+
- **Exclude Files**: Optional. List of file names to exclude, separated by commas (e.g., ``*deleted*, *retired*``).
109+
- **Ruleset License**: Required. The license type for this ruleset (e.g., "BSD", "Commercial", "CC0-1.0").
110+
- **Read Only**: Optional. Prevents changes to the rule itself - rules can still be enabled/disabled/tuned.
111+
- **Delete Unreferenced**: Optional. Deletes rules that are no longer referenced by the ruleset source.
106112

107-
| For more information, see:
108-
| https://rules.emergingthreats.net/open/
113+
URL Source Options
114+
~~~~~~~~~~~~~~~~~~
109115

110-
ETPRO
111-
~~~~~
116+
When using ``url`` as the Source Type, additional options are available:
112117

113-
- includes ETOPEN and additional rules
114-
- optimized for :ref:`suricata`
115-
- rules retrievable as released
116-
- license fee per sensor (you are responsible for purchasing enough licenses for your entire deployment)
118+
- **urlHash**: URL to a hash file (.md5 or .sha256) for verifying the downloaded ruleset.
119+
- **proxyURL**: HTTP/HTTPS/SOCKS5 proxy URL for downloading the ruleset.
120+
- **proxyUsername**: Proxy authentication username.
121+
- **proxyPassword**: Proxy authentication password.
122+
- **proxyCACert**: Path to CA certificate file for MITM proxy verification.
123+
- **insecureSkipVerify**: Set to true to skip TLS certificate validation (not recommended for production).
117124

118-
| For more information, see:
119-
| https://www.proofpoint.com/us/threat-insight/et-pro-ruleset
120125

121-
Snort Community
122-
~~~~~~~~~~~~~~~
123-
124-
- NOT optimized for :ref:`suricata`
125-
- community-contributed rules
126-
- **free**
127-
128-
| For more information, see:
129-
| https://www.snort.org/downloads/#rule-downloads
130-
| https://www.snort.org/faq/what-are-community-rules
131-
132-
Snort Registered
126+
Default Rulesets
133127
~~~~~~~~~~~~~~~~
134128

135-
- NOT optimized for :ref:`suricata`
136-
- Snort SO (Shared Object) rules do NOT work with :ref:`suricata`
137-
- same rules as Snort Subscriber ruleset, except rules only retrievable after 30 days past release
138-
- **free**
139-
140-
Since Shared Object rules won't work with :ref:`suricata`, you may want to disable them using a regex like ``'re:soid [0-9]+'``.
141-
142-
| For more information, see:
143-
| https://www.snort.org/downloads/#rule-downloads
144-
| https://snort.org/documents/registered-vs-subscriber
145-
146-
Snort Subscriber (Talos)
147-
~~~~~~~~~~~~~~~~~~~~~~~~
129+
Emerging Threats (ETOPEN/ETPRO)
130+
Security Onion includes the Emerging Threats ruleset by default. To enable ET Pro (commercial), enter your license key in the License Key field. Leave empty for ET Open (free) rules. The ruleset will be downloaded and imported within 15 minutes.
148131

149-
- NOT optimized for :ref:`suricata`
150-
- Snort SO (Shared Object) rules do NOT work with :ref:`suricata`
151-
- rules retrievable as released
152-
- license fee per sensor (you are responsible for purchasing enough licenses for your entire deployment)
132+
- Optimized for :ref:`suricata`
133+
- ET Open is **free**, ET Pro requires a license fee per sensor
153134

154-
Since Shared Object rules won't work with :ref:`suricata`, you may want to disable them using a regex like ``'re:soid [0-9]+'``.
135+
| For more information, see:
136+
| https://rules.emergingthreats.net/open/
137+
| https://www.proofpoint.com/us/threat-insight/et-pro-ruleset
155138
156-
| For more information, see:
157-
| https://www.snort.org/downloads/#rule-downloads
158-
| https://snort.org/documents/registered-vs-subscriber
139+
Abuse.ch SSL Blacklist (ABUSECH-SSLBL)
140+
SSL certificate blacklist from Abuse.ch. Only available in non-Airgap, disabled by default.
159141

160-
Other
161-
~~~~~
142+
| For more information, see:
143+
| https://sslbl.abuse.ch/
162144
163-
- not officially managed/supported by Security Onion
164-
- license fee may or may not apply
145+
Local Rules
146+
A directory-based ruleset source for custom local rules. Rules are read from ``/nsm/rules/custom-local-repos/local-suricata``. This ruleset is enabled by default with Read Only set to false, allowing you to edit rules directly once they are imported.
165147

166-
If you would like to add custom rulesets, then you can do this with a configuration setting. In :ref:`soc`, navigate to :ref:`administration` --> Configuration. At the top of the page, click the ``Options`` menu and then enable the ``Show advanced settings`` option. Then filter for ``customRulesets`` and drilldown on the left side.
148+
Suricata Metadata Rulesets
149+
~~~~~~~~~~~~~~~~~~~~~~~~~~
167150

168-
Custom rulesets can be added either via URL or a local file placed on the Manager.
151+
When Suricata is configured as the metadata engine (instead of :ref:`zeek`), two additional rulesets become available:
169152

170-
For URLs, the format is:
153+
SO_EXTRACTIONS
154+
Extraction rules that control which file types Suricata extracts from network traffic for analysis by :ref:`strelka`. This ruleset is imported and **enabled by default** when Suricata is the metadata engine.
171155

172-
::
173-
174-
{"community":true,"license":"GPLv2","ruleset":"snort-community","target-file":"community.rules","url":"https://www.snort.org/downloads/community/community-rules.tar.gz"}
175-
176-
Here's what each option means:
156+
SO_FILTERS
157+
Filter rules that control which metadata Suricata logs. Use these to reduce unnecessary metadata logging. This ruleset is imported but **disabled by default** when Suricata is the metadata engine.
177158

178-
- community: Required, true or false. This disables some management options for the imported rules - they can't be deleted or edited, just tuned, duplicated, and Enabled | Disabled.
179-
- license: Required, the license this ruleset falls under.
180-
- ruleset: Required, the ruleset name or identifier.
181-
- target-file: Required, the name of the file that contains the rules, once it is downloaded. The file extension must be ``.rules``.
182-
- url: Required, the URL that the rules should be downloaded from.
159+
Adding Additional Rulesets
160+
~~~~~~~~~~~~~~~~~~~~~~
183161

184-
For local files, the format is:
185-
186-
::
162+
You can add additional rulesets via the web interface. Navigate to :ref:`administration` --> Configuration --> soc --> config --> server --> modules --> suricataengine --> rulesetSources and click the add button to create a new ruleset entry. Fill in the required fields (Ruleset Name, Source Type, Source Path, Ruleset License, and Enabled) and any optional fields as needed.
187163

188-
{"community":true,"license":"DRL1.1","file":"/nsm/rules/detect-suricata/custom_file/SOS-Custom_suricata.rules","ruleset":"SOS-Custom"}
164+
.. note::
189165

190-
file: This is the path for the local rules file, which must be in the ``/nsm/rules/detect-suricata/custom_file/`` directory.
166+
Each ruleset must have a unique name. Duplicate names will cause sync failures.
191167

192-
The new settings will be applied within 15 minutes. At that point, you will need to wait for the scheduled rule update to take place (by default, every 24 hours), or you can force the update by navigating to :ref:`detections` --> Options dropdown menu --> Suricata --> Full Update.
168+
After adding or updating ruleset configuration, changes will be applied within 15 minutes.

suricata.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ By default, Security Onion uses :ref:`zeek` to record protocol metadata. If you
9393
- HTTP
9494
- SSL
9595

96-
If you later find that some of that metadata is unnecessary, you can filter out the unnecessary metadata by writing rules. We have included some examples at https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/2.4/main/salt/idstools/rules/filters.rules.
96+
If you later find that some of that metadata is unnecessary, you can enable the SO_FILTERS ruleset to filter out unnecessary metadata. Navigate to :ref:`administration` --> Configuration --> soc --> config --> server --> modules --> suricataengine --> rulesetSources and enable the SO_FILTERS ruleset.
9797

9898
To change your grid's metadata engine from :ref:`zeek` to Suricata, go to :ref:`administration` --> Configuration --> global --> mdengine and change the value from ``ZEEK`` to ``SURICATA``:
9999

@@ -103,7 +103,7 @@ To change your grid's metadata engine from :ref:`zeek` to Suricata, go to :ref:`
103103
File Extraction
104104
---------------
105105

106-
If you choose Suricata for metadata, it will extract files from network traffic and :ref:`strelka` will then analyze those extracted files. If you would like to extract additional file types, then you can add file types as shown at https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/2.4/main/salt/idstools/rules/extraction.rules.
106+
If you choose Suricata for metadata, it will extract files from network traffic and :ref:`strelka` will then analyze those extracted files. The SO_EXTRACTIONS ruleset controls which file types are extracted and is enabled by default when Suricata is the metadata engine. You can customize file extraction by modifying rules in this ruleset.
107107

108108
PCAP
109109
----

0 commit comments

Comments
 (0)