diff --git a/cyences_app_for_splunk/default/macros.conf b/cyences_app_for_splunk/default/macros.conf index 8cef4781..a91c85fb 100644 --- a/cyences_app_for_splunk/default/macros.conf +++ b/cyences_app_for_splunk/default/macros.conf @@ -727,6 +727,9 @@ iseval = 0 [cs_windows_firewall_is_disabled_filter] definition = search * +[cs_windows_certification_is_expiring_filter] +definition = search * + [cs_windows_cert_store_idx] definition = index IN (wincerts) iseval = 0 diff --git a/cyences_app_for_splunk/default/savedsearches.conf b/cyences_app_for_splunk/default/savedsearches.conf index 9eeb6807..3da67198 100644 --- a/cyences_app_for_splunk/default/savedsearches.conf +++ b/cyences_app_for_splunk/default/savedsearches.conf @@ -966,6 +966,66 @@ action.cyences_send_email_action = 1 action.cyences_notable_event_action.products = Windows +[Windows - Certificate is Expiring Soon] +disabled = 1 +enableSched = 1 +alert.track = 1 +alert.severity = 4 +alert.suppress = 0 +counttype = number of events +quantity = 0 +relation = greater than +# The alert will be triggered every 24 hours at midday using the data from the previous 24 hours. +cron_schedule = 10 12 * * * +description = The alert will be triggered if the certificate is expiring in 7 days. \ +Data Collection - Windows Certificate Store Add-on (TODO: ). +dispatch.earliest_time = -24h@h +dispatch.latest_time = now +display.general.type = statistics +display.page.search.tab = statistics +display.page.search.mode = fast +request.ui_dispatch_app = cyences_app_for_splunk +request.ui_dispatch_view = search +# This search captures certificates that will expire within 7 days, and if they are expiring within one day, the severity will be critical, otherwise, the severity will be high. +search = `cs_windows_cert_store_idx` sourcetype="windows:certstore:local" \ +| dedup host SerialNumber \ +| `cs_windows_cert_time_format(NotAfter)` \ +| `cs_windows_cert_time_format(NotBefore)` \ +| eval interval_start=relative_time(now(),"-1m") \ +| eval interval_one_day=relative_time(now(),"+1d") \ +| eval interval_end=relative_time(now(),"+7d") \ +| where interval_start