Merge pull request #1321 from Security-Onion-Solutions/experimental

IDS Tools now with Airgap support
This commit is contained in:
Mike Reeves
2020-09-10 19:05:16 -04:00
committed by GitHub
14 changed files with 136 additions and 12 deletions

View File

@@ -1,21 +1,32 @@
{%- set URLS = salt['pillar.get']('idstools:config:urls') -%}
{%- set RULESET = salt['pillar.get']('idstools:config:ruleset') -%}
{%- set OINKCODE = salt['pillar.get']('idstools:config:oinkcode', '' ) -%}
{%- set ISAIRGAP = salt['pillar.get']('global:airgap', 'False') -%}
{%- set MANAGERIP = salt['pillar.get']('global:managerip', '') -%}
{%- if ISAIRGAP is sameas true -%}
--merged=/opt/so/rules/nids/all.rules
--local=/opt/so/rules/nids/local.rules
--url=http://{{ MANAGERIP }}:7788/rules/emerging-all.rules
--disable=/opt/so/idstools/etc/disable.conf
--enable=/opt/so/idstools/etc/enable.conf
--modify=/opt/so/idstools/etc/modify.conf
{%- else -%}
--suricata-version=5.0
--merged=/opt/so/rules/nids/all.rules
--local=/opt/so/rules/nids/local.rules
--disable=/opt/so/idstools/etc/disable.conf
--enable=/opt/so/idstools/etc/enable.conf
--modify=/opt/so/idstools/etc/modify.conf
{%- if RULESET == 'ETOPEN' %}
{%- if RULESET == 'ETOPEN' -%}
--etopen
{%- elif RULESET == 'ETPRO' %}
{%- elif RULESET == 'ETPRO' -%}
--etpro={{ OINKCODE }}
{%- elif RULESET == 'TALOS' %}
{%- elif RULESET == 'TALOS' -%}
--url=https://www.snort.org/rules/snortrules-snapshot-2983.tar.gz?oinkcode={{ OINKCODE }}
{%- endif %}
{%- if URLS != None %}
{%- for URL in URLS %}
{%- endif -%}
{%- endif -%}
{%- if URLS != None -%}
{%- for URL in URLS -%}
--url={{ URL }}
{%- endfor %}
{%- endif %}
{%- endfor -%}
{%- endif -%}

View File

@@ -60,7 +60,7 @@ rulesdir:
synclocalnidsrules:
file.managed:
- name: /opt/so/rules/nids/local.rules
- source: salt://idstools/localrules/local.rules
- source: salt://idstools/local.rules
- user: 939
- group: 939

View File

@@ -1 +0,0 @@
# Put your own custom Snort/Suricata rules in this file! /opt/so/saltstack/local/salt/idstools/localrules/local.rules