Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CY-646: password expired alert #595

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@
"editable": true,
"comment": "",
"calculationType": "Eval",
"expression": "if((EventCode=4768 OR EventCode=4771), Result_Code, coalesce(error_code,Error_Code, \"unknown\"))"
"expression": "case(EventCode=4768, Result_Code, EventCode=4771, Failure_Code, true(), coalesce(error_code, Error_Code, \"unknown\"))"
}
],
"constraints": [
Expand Down
6 changes: 5 additions & 1 deletion cyences_app_for_splunk/default/macros.conf
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,9 @@ definition = search *
[cs_ad_login_failure_due_to_password_expire_filter]
definition = search *

[cs_ad_login_failure_due_to_credential_revoked_filter]
definition = search *

[cs_windows_host_missing_update_filter]
definition = search *
iseval = 0
Expand Down Expand Up @@ -1328,8 +1331,9 @@ definition = Authentication.app=*
iseval = 0

[cs_authentication_password_expire_event_filter]
definition = (Authentication.error_code!="0xC0000071") (Authentication.error_code!="0x17")
definition = (Authentication.error_code!="0xC0000071") (Authentication.error_code!="0x17") (Authentication.error_code!="0x12")
# error_code="0xC0000071" or "0x17" Windows Password Expired events
# error_code="0x12" Credentials have been revoked
# Apply filter on Authentication.* field (tstats where condition filter format, you can use !=, =, OR and AND condition)
iseval = 0

Expand Down
39 changes: 36 additions & 3 deletions cyences_app_for_splunk/default/savedsearches.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4645,7 +4645,7 @@ action.cyences_send_email_action = 1
action.cyences_notable_event_action.products = Windows, Windows AD


[AD - Login Failure due to Password Expired]
[AD - Login Failure Due To Password Expired]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alert name change will have some consequences. FYA @hardikhdholariya

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll change alert name on docs.

disabled = 1
enableSched = 1
alert.track = 1
Expand All @@ -4665,7 +4665,7 @@ display.page.search.tab = statistics
display.page.search.mode = fast
request.ui_dispatch_app = cyences_app_for_splunk
request.ui_dispatch_view = search
search = `cs_wineventlog_security` EventCode IN (4768, 4771) Result_Code="0x17" \
search = `cs_wineventlog_security` EventCode IN (4768, 4771) (Result_Code="0x17" OR Failure_Code="0x17") \
| dedup ComputerName Account_Name \
| `cs_human_readable_time_format(_time, event_time)` \
| table event_time ComputerName Account_Name src_ip user_type status \
Expand All @@ -4674,7 +4674,40 @@ search = `cs_wineventlog_security` EventCode IN (4768, 4771) Result_Code="0x17"
| `cs_ad_login_failure_due_to_password_expire_filter`
action.cyences_notable_event_action = 1
action.cyences_notable_event_action.param.filter_macro_name = cs_ad_login_failure_due_to_password_expire_filter
action.cyences_notable_event_action.contributing_events = `cs_wineventlog_security` EventCode IN (4768, 4771) Result_Code="0x17"
action.cyences_notable_event_action.contributing_events = `cs_wineventlog_security` EventCode IN (4768, 4771) (Result_Code="0x17" OR Failure_Code="0x17")
action.cyences_send_email_action = 1
action.cyences_notable_event_action.products = Windows, Windows AD

[AD - Login Failure Due To Credential Revoked]
disabled = 1
enableSched = 1
alert.track = 1
alert.severity = 4
alert.suppress = 0
counttype = number of events
quantity = 0
relation = greater than
cron_schedule = 55 * * * *
description = This alert will be triggered if login failure due to credential revoked. \
\
Data Collection - Splunk_TA_windows - WinEventLog://Security stanza
dispatch.earliest_time = -62m@m
dispatch.latest_time = -2m@m
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
search = `cs_wineventlog_security` EventCode IN (4768, 4771) (Result_Code="0x12" OR Failure_Code="0x12") \
| dedup ComputerName Account_Name \
| `cs_human_readable_time_format(_time, event_time)` \
| table event_time ComputerName Account_Name src_ip user_type status \
| `cs_user_privilege_mapping(Account_Name)` \
| eval cyences_severity = if(is_privileged_user=="Yes", "high", "medium") \
| `cs_ad_login_failure_due_to_credential_revoked_filter`
action.cyences_notable_event_action = 1
action.cyences_notable_event_action.param.filter_macro_name = cs_ad_login_failure_due_to_credential_revoked_filter
action.cyences_notable_event_action.contributing_events = `cs_wineventlog_security` EventCode IN (4768, 4771) (Result_Code="0x12" OR Failure_Code="0x12")
action.cyences_send_email_action = 1
action.cyences_notable_event_action.products = Windows, Windows AD

Expand Down
Loading