Rule Sigma to elastalert : Config file not taken into acount
Hello everyone,
Firstly I want to thanks @Neo23x0 for this project, it's really good and smart.
I have trouble in transforming sigma rules to Elastalert rules. Indeed, fields which are in my elastalert config file (elastalert.yml) are not loaded in the rule Elastalert I want to create. Some pictures will be more explicit :
My commandline : ./sigmac -t elastalert -c config/elastalert.yml -o regle.yml ../rules/application/appframework_ruby_on_rails_exceptions.yml
My config file (elastalert.yml)
realert: minutes: 0 name: windows type: any index: filebeat-windows-sysmon alert:
- "email" email:
- "[email protected]"
The rule created :
alert:
- debug description: Detects suspicious Ruby on Rails exceptions that could indicate exploitation attempts filter:
- query: query_string: query: *.keyword:(ActionController::Inv...etc index: logstash- name: 0d2c3d4c-4b48-4ac3-8f23-ea845746bb1a_0 priority: 3 realert: minutes: 0 type: any
I suppose the expected behavior would be to have filebeat-windows-sysmon in the index field of the rule created. Same for the name and the alert.
Any ideas ?
The config passed with -c must be formatted as described here. Backend options can be passed with -O on the command line or -C via a file and are listed in the sigmac help shown via -h:
For elastalert these are:
rulecomment: Prefix generated query with comment containing title (default: False)
keyword_field: Keyword sub-field name (default: keyword)
keyword_blacklist: Fields that don't have a keyword subfield (wildcards * and ? allowed) (default: None)
alert_methods: Alert method(s) to use when the rule triggers, comma separated. Supported: email, http_post (default: )
http_post_url: Webhook URL used for HTTP POST alert notification (default: None)
http_post_include_rule_metadata: Indicates if metadata about the rule which triggered should be included in the paylod of the HTTP POST alert notification (default: None)
emails : Email addresses for Elastalert notification, if you want to alert several email addresses put them coma separated (default: None)
smtp_host : SMTP server address (default: None)
from_addr : Email sender address (default: None)
smtp_auth_file: Local path with login info (default: None)
realert_time: Ignore repeating alerts for a period of time (default: 0m)
expo_realert_time: This option causes the value of realert to exponentially increase while alerts continue to fire (default: 60m)