mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #12906 from Security-Onion-Solutions/det_easr
Apply autoEnabledSigmaRules based on role if defined and default if not
This commit is contained in:
@@ -1257,9 +1257,16 @@ soc:
|
||||
allowRegex: ''
|
||||
autoUpdateEnabled: true
|
||||
autoEnabledSigmaRules:
|
||||
default:
|
||||
- core+critical
|
||||
- securityonion-resources+critical
|
||||
- securityonion-resources+high
|
||||
so-eval:
|
||||
- securityonion-resources+critical
|
||||
- securityonion-resources+high
|
||||
so-import:
|
||||
- securityonion-resources+critical
|
||||
- securityonion-resources+high
|
||||
communityRulesImportFrequencySeconds: 28800
|
||||
denyRegex: ''
|
||||
elastAlertRulesFolder: /opt/sensoroni/elastalert
|
||||
|
||||
@@ -30,9 +30,11 @@
|
||||
{# since cases is not a valid soc config item and only used for the map files, remove it from being placed in the config #}
|
||||
{% do SOCMERGED.config.server.modules.pop('cases') %}
|
||||
|
||||
{# do not automatically enable Sigma rules if install is Eval or Import #}
|
||||
{% if grains['role'] in ['so-eval', 'so-import'] %}
|
||||
{% do SOCMERGED.config.server.modules.elastalertengine.update({'autoEnabledSigmaRules': []}) %}
|
||||
{# set Sigma rules based on role if defined and default if not #}
|
||||
{% if GLOBALS.role in SOCMERGED.config.server.modules.elastalertengine.autoEnabledSigmaRules %}
|
||||
{% do SOCMERGED.config.server.modules.elastalertengine.update({'autoEnabledSigmaRules': SOCMERGED.config.server.modules.elastalertengine.autoEnabledSigmaRules[GLOBALS.role]}) %}
|
||||
{% else %}
|
||||
{% do SOCMERGED.config.server.modules.elastalertengine.update({'autoEnabledSigmaRules': SOCMERGED.config.server.modules.elastalertengine.autoEnabledSigmaRules.default}) %}
|
||||
{% endif %}
|
||||
|
||||
{# remove these modules if detections is disabled #}
|
||||
|
||||
@@ -89,10 +89,13 @@ soc:
|
||||
advanced: True
|
||||
helpLink: sigma.html
|
||||
autoEnabledSigmaRules:
|
||||
description: 'Sigma rules to automatically enable on initial import. Format is $Ruleset+$Level - for example, for the core community ruleset and critical level rules: core+critical'
|
||||
default: &autoEnabledSigmaRules
|
||||
description: 'Sigma rules to automatically enable on initial import. Format is $Ruleset+$Level - for example, for the core community ruleset and critical level rules: core+critical. These will be applied based on role if defined and default if not.'
|
||||
global: True
|
||||
advanced: True
|
||||
helpLink: sigma.html
|
||||
so-eval: *autoEnabledSigmaRules
|
||||
so-import: *autoEnabledSigmaRules
|
||||
denyRegex:
|
||||
description: 'Regex used to filter imported Sigma rules. Deny regex takes precedence over the Allow regex setting.'
|
||||
global: True
|
||||
|
||||
Reference in New Issue
Block a user