-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new Alerter: IDMEF with Prelude SIEM
IDMEF (RFC 4765) is intended to be a standard data format that automated intrusion detection systems can use to report alerts about events that they deem suspicious. Prelude SIEM is an OpenSource SIEM: https://www.prelude-siem.org
- Loading branch information
Thomas Andrejak
committed
Aug 7, 2020
1 parent
f4bad06
commit 26ffa36
Showing
9 changed files
with
339 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Alert when a login event is detected for user "admin" never before seen IP | ||
# In this example, "login" logs contain which user has logged in from what IP | ||
|
||
# (Optional) | ||
# Elasticsearch host | ||
# es_host: elasticsearch.example.com | ||
|
||
# (Optional) | ||
# Elasticsearch port | ||
# es_port: 14900 | ||
|
||
# (OptionaL) Connect with SSL to Elasticsearch | ||
#use_ssl: True | ||
|
||
# (Optional) basic-auth username and password for Elasticsearch | ||
#es_username: someusername | ||
#es_password: somepassword | ||
|
||
# (Required) | ||
# Rule name, must be unique | ||
name: Example new term rule | ||
|
||
# (Required) | ||
# Type of alert. | ||
# the frequency rule type alerts when num_events events occur with timeframe time | ||
type: new_term | ||
|
||
# (Required) | ||
# Index to search, wildcard supported | ||
index: logstash-* | ||
|
||
# (Required, new_term specific) | ||
# Monitor the field ip_address | ||
fields: | ||
- "ip_address" | ||
|
||
# (Optional, new_term specific) | ||
# This means that we will query 90 days worth of data when ElastAlert starts to find which values of ip_address already exist | ||
# If they existed in the last 90 days, no alerts will be triggered for them when they appear | ||
terms_window_size: | ||
days: 90 | ||
|
||
# (Required) | ||
# A list of Elasticsearch filters used for find events | ||
# These filters are joined with AND and nested in a filtered query | ||
# For more info: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl.html | ||
# We are filtering for only "login_event" type documents with username "admin" | ||
filter: | ||
- term: | ||
_type: "login_event" | ||
- term: | ||
username: admin | ||
|
||
# (Required) | ||
# The alert is use when a match is found | ||
alert: | ||
- "IDMEFAlerter" | ||
|
||
# (required, IDMEF specific) | ||
# a list of IDMEF paths to format the alert | ||
alert_fields: | ||
- src_address: "{client}" | ||
- src_port: "{port}" | ||
- target_address: "{remotehost}" | ||
- target_process: "{process}" | ||
- target_pid: "{pid}" | ||
- user: "{user}" | ||
- user_category: "os-device" | ||
- user_type: "target-user" | ||
- classification: "Unusual device behavior" | ||
- description: "Unusual behavior from {client} to {remotehost}." | ||
- severity: "medium" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# Alert when there is a sudden spike in the volume of events | ||
|
||
# (Optional) | ||
# Elasticsearch host | ||
# es_host: elasticsearch.example.com | ||
|
||
# (Optional) | ||
# Elasticsearch port | ||
# es_port: 14900 | ||
|
||
# (Optional) Connect with SSL to Elasticsearch | ||
#use_ssl: True | ||
|
||
# (Optional) basic-auth username and password for Elasticsearch | ||
#es_username: someusername | ||
#es_password: somepassword | ||
|
||
# (Required) | ||
# Rule name, must be unique | ||
name: Event spike | ||
|
||
# (Required) | ||
# Type of alert. | ||
# the spike rule type compares the number of events within two sliding windows to each other | ||
type: spike | ||
|
||
# (Required) | ||
# Index to search, wildcard supported | ||
index: logstash-* | ||
|
||
# (Required one of _cur or _ref, spike specific) | ||
# The minimum number of events that will trigger an alert | ||
# For example, if there are only 2 events between 12:00 and 2:00, and 20 between 2:00 and 4:00 | ||
# _ref is 2 and _cur is 20, and the alert WILL fire because 20 is greater than threshold_cur and (_ref * spike_height) | ||
threshold_cur: 5 | ||
#threshold_ref: 5 | ||
|
||
# (Required, spike specific) | ||
# The size of the window used to determine average event frequency | ||
# We use two sliding windows each of size timeframe | ||
# To measure the 'reference' rate and the current rate | ||
timeframe: | ||
hours: 2 | ||
|
||
# (Required, spike specific) | ||
# The spike rule matches when the current window contains spike_height times more | ||
# events than the reference window | ||
spike_height: 3 | ||
|
||
# (Required, spike specific) | ||
# The direction of the spike | ||
# 'up' matches only spikes, 'down' matches only troughs | ||
# 'both' matches both spikes and troughs | ||
spike_type: "up" | ||
|
||
# (Required) | ||
# A list of Elasticsearch filters used for find events | ||
# These filters are joined with AND and nested in a filtered query | ||
# For more info: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl.html | ||
filter: | ||
- query: | ||
query_string: | ||
query: "field: value" | ||
- type: | ||
value: "some_doc_type" | ||
|
||
# (Required) | ||
# The alert is use when a match is found | ||
alert: | ||
- "IDMEFAlerter" | ||
|
||
# (required, IDMEF specific) | ||
# a list of IDMEF paths to format the alert | ||
alert_fields: | ||
- classification: "Abnormally high quantity of logs" | ||
- description: "The host {hostname} is generating an abnormally high quantity of logs ({spike_count} while {reference_count} were generated in the last time frame)" | ||
- severity: "medium" | ||
- impact_type: "other" | ||
|
||
# This option only keep count in memory | ||
use_terms_query: true | ||
|
||
# Force doc_type needed for use_terms_query option | ||
doc_type: "events" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,4 @@ requests>=2.0.0 | |
stomp.py>=4.1.17 | ||
texttable>=0.8.8 | ||
twilio==6.0.0 | ||
prelude>=5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters