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

Dlux 2 - Misc updates to existing detections #3025

Merged
merged 28 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
65e63e4
Updating detections
dluxtron Jul 2, 2024
c028bd6
Updating detections
dluxtron Jul 2, 2024
820151c
Updating detections
dluxtron Jul 2, 2024
949d7e6
Updating detections
dluxtron Jul 2, 2024
43e4625
Updating detections
dluxtron Jul 2, 2024
1e33646
Branch was auto-updated.
patel-bhavin Jul 10, 2024
ea788f8
Branch was auto-updated.
patel-bhavin Jul 10, 2024
07280c4
Branch was auto-updated.
patel-bhavin Jul 10, 2024
1b287d1
Branch was auto-updated.
patel-bhavin Jul 12, 2024
5c87ee9
Branch was auto-updated.
patel-bhavin Jul 17, 2024
bafc323
Branch was auto-updated.
patel-bhavin Jul 23, 2024
a78f2de
Branch was auto-updated.
patel-bhavin Jul 23, 2024
7e2f6d6
Branch was auto-updated.
patel-bhavin Jul 23, 2024
1b6e617
Branch was auto-updated.
patel-bhavin Jul 23, 2024
581474e
Branch was auto-updated.
patel-bhavin Jul 23, 2024
9fdca23
Branch was auto-updated.
patel-bhavin Jul 23, 2024
adcbd96
Branch was auto-updated.
patel-bhavin Jul 23, 2024
ec037e5
removing changes to 2x detections
dluxtron Jul 24, 2024
488a5ea
Branch was auto-updated.
patel-bhavin Jul 24, 2024
3a5eeef
manual test
patel-bhavin Jul 24, 2024
990040d
Branch was auto-updated.
patel-bhavin Jul 24, 2024
1d103e2
Branch was auto-updated.
patel-bhavin Jul 24, 2024
ab0c7bf
Branch was auto-updated.
patel-bhavin Jul 25, 2024
f3a8916
Branch was auto-updated.
patel-bhavin Jul 25, 2024
dc86aa3
Branch was auto-updated.
patel-bhavin Jul 25, 2024
85739ad
Branch was auto-updated.
patel-bhavin Jul 25, 2024
3c95f85
Branch was auto-updated.
patel-bhavin Jul 25, 2024
40b1dd7
Branch was auto-updated.
patel-bhavin Jul 26, 2024
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
@@ -1,7 +1,7 @@
name: Azure AD Admin Consent Bypassed by Service Principal
id: 9d4fea43-9182-4c5a-ada8-13701fd5615d
version: 2
date: '2024-05-29'
version: 3
date: '2024-07-02'
author: Mauricio Velazco, Splunk
data_source:
- Azure Active Directory Add app role assignment to service principal
Expand All @@ -17,17 +17,14 @@ description: The following analytic identifies instances where a service princip
without proper oversight, potentially compromising the security of the Azure AD
environment.
search: >-
`azure_monitor_aad` operationName="Add app role assignment to service principal"
src_user_type=servicePrincipal
| rename properties.* as * | eval roleId = mvindex('targetResources{}.modifiedProperties{}.newValue',
0)
| eval roleValue = mvindex('targetResources{}.modifiedProperties{}.newValue', 1)
| eval roleDescription = mvindex('targetResources{}.modifiedProperties{}.newValue',
2)
| eval dest_user = mvindex('targetResources{}.id', 0)
| rename initiatedBy.app.displayName as src_user
| stats count earliest(_time) as firstTime latest(_time) as lastTime by src_user
dest_user roleId roleValue roleDescription
`azure_monitor_aad` (operationName="Add app role assignment to service principal" OR operationName="Add member to role*") src_user_type=servicePrincipal
| rename properties.* as *
| eval roleId = mvindex('targetResources{}.modifiedProperties{}.newValue', 0)
| eval roleValue = mvindex('targetResources{}.modifiedProperties{}.newValue', 1)
| eval roleDescription = mvindex('targetResources{}.modifiedProperties{}.newValue', 2)
| eval user_id = mvindex('targetResources{}.id', 0), user=coalesce(user,mvindex('targetResources{}.displayName', 0))
| rename initiatedBy.app.displayName as src_user
| stats count earliest(_time) as firstTime latest(_time) as lastTime by src_user user user_id roleId roleValue roleDescription
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` | `azure_ad_admin_consent_bypassed_by_service_principal_filter`
how_to_implement: You must install the latest version of Splunk Add-on for Microsoft
Expand All @@ -47,10 +44,14 @@ tags:
confidence: 60
impact: 90
message: Service principal $src_user$ bypassed the admin consent process and granted
permissions to $dest_user$
permissions to $user$
mitre_attack_id:
- T1098.003
observable:
- name: user
type: User
role:
- Victim
- name: src_user
type: User
role:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Azure AD Global Administrator Role Assigned
id: 825fed20-309d-4fd1-8aaf-cd49c1bb093c
version: 5
date: '2024-05-29'
author: Gowthamaraj Rajendran, Mauricio Velazco, Splunk
version: 6
date: '2024-07-02'
author: Gowthamaraj Rajendran, Mauricio Velazco, Dean Luxton, Splunk
status: production
type: TTP
description: The following analytic detects the assignment of the Azure AD Global
Expand All @@ -15,11 +15,14 @@ description: The following analytic detects the assignment of the Azure AD Globa
posing a severe security risk.
data_source:
- Azure Active Directory Add member to role
search: '`azure_monitor_aad` operationName="Add member to role" properties.targetResources{}.modifiedProperties{}.newValue="\"Global
Administrator\"" | rename properties.* as * | rename initiatedBy.user.userPrincipalName
as initiatedBy | stats count min(_time) as firstTime max(_time) as lastTime values(user)
as user by initiatedBy, result, operationName | `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` | `azure_ad_global_administrator_role_assigned_filter`'
search: '`azure_monitor_aad` operationName="Add member to role" properties.targetResources{}.modifiedProperties{}.newValue="\"Global Administrator\""
| rename properties.* as *, initiatedBy.user.userPrincipalName as userPrincipalName, targetResources{}.displayName as displayName
| eval initiatedBy = coalesce(userPrincipalName,src_user)
| eval user = coalesce(user,mvfilter(displayName!="null"))
| stats count min(_time) as firstTime max(_time) as lastTime values(user) as user by initiatedBy, result, operationName
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `azure_ad_global_administrator_role_assigned_filter`'
how_to_implement: You must install the latest version of Splunk Add-on for Microsoft
Cloud Services from Splunkbase(https://splunkbase.splunk.com/app/3110/#/details).
You must be ingesting Azure Active Directory events into your Splunk environment
Expand Down
12 changes: 7 additions & 5 deletions detections/cloud/azure_ad_privileged_role_assigned.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Azure AD Privileged Role Assigned
id: a28f0bc3-3400-4a6e-a2da-89b9e95f0d2a
version: 3
date: '2024-05-29'
author: Mauricio Velazco, Gowthamaraj Rajendran, Splunk
version: 4
date: '2024-07-02'
author: Mauricio Velazco, Gowthamaraj Rajendran, Dean Luxton, Splunk
status: production
type: TTP
description: The following analytic detects the assignment of privileged Azure Active
Expand All @@ -14,8 +14,10 @@ description: The following analytic detects the assignment of privileged Azure A
over the Azure AD infrastructure.
data_source:
- Azure Active Directory Add member to role
search: ' `azure_monitor_aad` "operationName"="Add member to role" | rename properties.* as *
| rename initiatedBy.user.userPrincipalName as initiatedBy
search: ' `azure_monitor_aad` "operationName"="Add member to role"
| rename properties.* as *, initiatedBy.user.userPrincipalName as userPrincipalName, targetResources{}.displayName as displayName
| eval initiatedBy = coalesce(userPrincipalName,src_user)
| eval user = coalesce(user,mvfilter(displayName!="null"))
| rename targetResources{}.modifiedProperties{}.newValue as roles
| eval role=mvindex(roles,1)
| stats count min(_time) as firstTime max(_time) as lastTime values(user) as user by initiatedBy, result, operationName, role
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Azure AD Service Principal New Client Credentials
id: e3adc0d3-9e4b-4b5d-b662-12cec1adff2a
version: 3
date: '2024-05-11'
author: Mauricio Velazco, Gowthamaraj Rajendran, Splunk
version: 4
date: '2024-07-02'
author: Mauricio Velazco, Gowthamaraj Rajendran, Dean Luxton, Splunk
status: production
type: TTP
description: The following analytic detects the addition of new credentials to Service
Expand All @@ -15,11 +15,21 @@ description: The following analytic detects the addition of new credentials to S
access and control over the Azure environment.
data_source:
- Azure Active Directory
search: ' `azure_monitor_aad` category=AuditLogs operationName="Update application*Certificates
and secrets management " | rename properties.* as * | rename targetResources{}.*
as * | stats count min(_time) as firstTime max(_time) as lastTime values(displayName)
as displayName by user, modifiedProperties{}.newValue, src_ip | `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` | `azure_ad_service_principal_new_client_credentials_filter`'
search: ' `azure_monitor_aad` category=AuditLogs operationName="Update application*Certificates and secrets management*"
| rename properties.* as *
| rename targetResources{}.* as *
| rename modifiedProperties{}.* as *
| eval src_user=coalesce(user,identity), newValue=mvfilter(newValue!="\"KeyDescription\"")
| stats count min(_time) as firstTime max(_time) as lastTime values(displayName) as displayName values(src_ip) as src_ip values(eval(mvfilter(oldValue!="null"))) as oldValue by src_user, object, newValue
| spath input=oldValue output=oldValues path={}
| spath input=newValue output=newValues path={}
| mvexpand newValues
| where NOT newValues IN (oldValues)
| fields - newValue, oldValue, oldValues
| rename newValues as newValue
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `azure_ad_service_principal_new_client_credentials_filter`'
how_to_implement: You must install the latest version of Splunk Add-on for Microsoft
Cloud Services from Splunkbase (https://splunkbase.splunk.com/app/3110/#/details).
You must be ingesting Azure Active Directory events into your Splunk environment.
Expand All @@ -42,12 +52,16 @@ tags:
asset_type: Azure Active Directory
confidence: 50
impact: 70
message: New credentials added for Service Principal by $user$
message: New Service Principal credentials were added to $object$ by $src_user$
mitre_attack_id:
- T1098
- T1098.001
observable:
- name: user
- name: src_user
type: User
role:
- Victim
- name: object
type: User
role:
- Victim
Expand Down
17 changes: 11 additions & 6 deletions detections/endpoint/detect_new_local_admin_account.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Detect New Local Admin account
id: b25f6f62-0712-43c1-b203-083231ffd97d
version: 4
date: '2024-05-15'
version: 5
date: '2024-07-02'
author: David Dorsey, Splunk
status: production
type: TTP
Expand All @@ -10,10 +10,11 @@ description: |-
data_source:
- Windows Event Log Security 4732
- Windows Event Log Security 4720
search: '`wineventlog_security` EventCode=4720 OR (EventCode=4732 Group_Name=Administrators)
| transaction src_user connected=false maxspan=180m | rename src_user as user |
stats count min(_time) as firstTime max(_time) as lastTime by user dest | `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` | `detect_new_local_admin_account_filter`'
search: '`wineventlog_security` (EventCode=4720) OR (EventCode=4732 Group_Name=Administrators)
| stats dc(EventCode) as evCount min(_time) as _time range(_time) as duration values(src_user) as src_user values(src_user_category) as src_user_category values(dest_category) as dest_category by user dest
| where evCount=2
| fields - evCount, duration
| `detect_new_local_admin_account_filter`'
how_to_implement: You must be ingesting Windows event logs using the Splunk Windows
TA and collecting event code 4720 and 4732
known_false_positives: The activity may be legitimate. For this reason, it's best
Expand All @@ -39,6 +40,10 @@ tags:
type: User
role:
- Victim
- name: src_user
type: User
role:
- Victim
- name: dest
type: Hostname
role:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Kerberos Pre-Authentication Flag Disabled in UserAccountControl
id: 0cb847ee-9423-11ec-b2df-acde48001122
version: 2
date: '2024-05-24'
author: Mauricio Velazco, Splunk
version: 3
date: '2024-07-02'
author: Mauricio Velazco, Dean Luxton, Splunk
status: production
type: TTP
description: The following analytic detects when the Kerberos Pre-Authentication flag
Expand All @@ -15,9 +15,10 @@ description: The following analytic detects when the Kerberos Pre-Authentication
of sensitive information.
data_source:
- Windows Event Log Security 4738
search: ' `wineventlog_security` EventCode=4738 MSADChangedAttributes="*Don''t Require
Preauth'' - Enabled*" |rename Account_Name as user | table EventCode, user, dest,
Security_ID, MSADChangedAttributes | `kerberos_pre_authentication_flag_disabled_in_useraccountcontrol_filter`'
search: '`wineventlog_security` EventCode=4738 (UserAccountControl="%%2096" OR MSADChangedAttributes="*Don''t Require Preauth'' - Enabled*")
| eval MSADChangedAttributes="''Don''t Require Preauth'' - Enabled"
| table _time, source, EventCode, src_user, src_user_category, user, user_category, MSADChangedAttributes
| `kerberos_pre_authentication_flag_disabled_in_useraccountcontrol_filter`'
how_to_implement: To successfully implement this search, you need to be ingesting
Domain Controller events. The Advanced Security Audit policy setting `User Account
Management` within `Account Management` needs to be enabled.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ references:
- https://adsecurity.org/?p=1729
- https://www.linkedin.com/pulse/mimikatz-dcsync-event-log-detections-john-dwyer
- https://github.com/SigmaHQ/sigma/blob/0.22-699-g29a5c6278/rules/windows/builtin/security/win_security_dcsync.yml
- https://lantern.splunk.com/Security/Product_Tips/Enterprise_Security/Enabling_an_audit_trail_from_Active_Directory
tags:
analytic_story:
- Sneaky Active Directory Persistence Tricks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ references:
- https://adsecurity.org/?p=1729
- https://www.linkedin.com/pulse/mimikatz-dcsync-event-log-detections-john-dwyer
- https://github.com/SigmaHQ/sigma/blob/0.22-699-g29a5c6278/rules/windows/builtin/security/win_security_dcsync.yml
- https://lantern.splunk.com/Security/Product_Tips/Enterprise_Security/Enabling_an_audit_trail_from_Active_Directory
tags:
analytic_story:
- Sneaky Active Directory Persistence Tricks
Expand Down Expand Up @@ -88,6 +89,7 @@ tags:
- status
risk_score: 100
security_domain: endpoint
manual_test: This detection runs correctly when run manually and given some time is given for data to settle in the splunk index.
tests:
- name: True Positive Test
attack_data:
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading