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

New Azure AD Detections #2799

Closed
wants to merge 91 commits into from
Closed
Changes from 47 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
4e10322
adding new detection
mvelazc0 Aug 3, 2023
66b96a2
Branch was auto-updated.
srv-rr-gh-researchbt Aug 7, 2023
10610a9
Branch was auto-updated.
srv-rr-gh-researchbt Aug 7, 2023
e25a5bb
Branch was auto-updated.
srv-rr-gh-researchbt Aug 7, 2023
730671f
Branch was auto-updated.
srv-rr-gh-researchbt Aug 7, 2023
eabcdde
Branch was auto-updated.
srv-rr-gh-researchbt Aug 8, 2023
62d4818
update detections/cloud/azure_ad_device_code_authentication.yml
gowthamarajr Aug 8, 2023
b72645a
Branch was auto-updated.
srv-rr-gh-researchbt Aug 9, 2023
a19575a
Edit SPL
gowthamarajr Aug 9, 2023
d3c33ff
Merge branch 'TR_3232_azure_ad' of https://github.com/splunk/security…
gowthamarajr Aug 9, 2023
92b7f39
Update SPL
gowthamarajr Aug 9, 2023
881722c
Update required fields
gowthamarajr Aug 9, 2023
b0b9f93
Update SPL
gowthamarajr Aug 9, 2023
00e0bef
Add info
gowthamarajr Aug 10, 2023
4baee1c
Branch was auto-updated.
srv-rr-gh-researchbt Aug 17, 2023
67d0a05
Branch was auto-updated.
srv-rr-gh-researchbt Aug 17, 2023
5def886
Branch was auto-updated.
srv-rr-gh-researchbt Aug 17, 2023
185c123
Branch was auto-updated.
srv-rr-gh-researchbt Aug 17, 2023
930e559
Branch was auto-updated.
srv-rr-gh-researchbt Aug 17, 2023
6ce8631
Branch was auto-updated.
srv-rr-gh-researchbt Aug 17, 2023
8fa5bb6
Branch was auto-updated.
srv-rr-gh-researchbt Aug 17, 2023
78802d8
Branch was auto-updated.
srv-rr-gh-researchbt Aug 17, 2023
66a28c6
Branch was auto-updated.
srv-rr-gh-researchbt Aug 18, 2023
c2bd3a5
Branch was auto-updated.
srv-rr-gh-researchbt Aug 18, 2023
4b845c2
Branch was auto-updated.
srv-rr-gh-researchbt Aug 18, 2023
7f31e22
Branch was auto-updated.
srv-rr-gh-researchbt Aug 18, 2023
49c90e2
Branch was auto-updated.
srv-rr-gh-researchbt Aug 18, 2023
050cc96
Branch was auto-updated.
srv-rr-gh-researchbt Aug 18, 2023
098abff
Branch was auto-updated.
srv-rr-gh-researchbt Aug 18, 2023
1852d8b
Branch was auto-updated.
srv-rr-gh-researchbt Aug 18, 2023
7505c95
Branch was auto-updated.
srv-rr-gh-researchbt Aug 18, 2023
678eeec
Branch was auto-updated.
srv-rr-gh-researchbt Aug 18, 2023
d46df79
Branch was auto-updated.
srv-rr-gh-researchbt Aug 28, 2023
5f6fd0d
Branch was auto-updated.
srv-rr-gh-researchbt Aug 28, 2023
e3305cd
Branch was auto-updated.
srv-rr-gh-researchbt Aug 28, 2023
9e06eec
Branch was auto-updated.
srv-rr-gh-researchbt Aug 29, 2023
91709f4
Branch was auto-updated.
srv-rr-gh-researchbt Aug 29, 2023
a0127be
Branch was auto-updated.
srv-rr-gh-researchbt Aug 29, 2023
4c583c6
Branch was auto-updated.
srv-rr-gh-researchbt Aug 29, 2023
ec0bb82
Branch was auto-updated.
srv-rr-gh-researchbt Aug 29, 2023
480dfdb
Branch was auto-updated.
srv-rr-gh-researchbt Aug 29, 2023
7e3bea8
Branch was auto-updated.
srv-rr-gh-researchbt Aug 30, 2023
80389b2
Branch was auto-updated.
srv-rr-gh-researchbt Aug 30, 2023
b3cc397
Branch was auto-updated.
srv-rr-gh-researchbt Aug 30, 2023
dce66c8
Branch was auto-updated.
srv-rr-gh-researchbt Sep 1, 2023
cbbe67b
Branch was auto-updated.
srv-rr-gh-researchbt Sep 5, 2023
ff47f5e
Branch was auto-updated.
srv-rr-gh-researchbt Sep 6, 2023
5497c4b
new detection
mvelazc0 Sep 14, 2023
9538d20
Branch was auto-updated.
srv-rr-gh-researchbt Sep 20, 2023
b13135b
Branch was auto-updated.
srv-rr-gh-researchbt Sep 20, 2023
1cc51a8
Branch was auto-updated.
srv-rr-gh-researchbt Oct 4, 2023
ddd9780
Branch was auto-updated.
srv-rr-gh-researchbt Oct 4, 2023
dd2b96f
Branch was auto-updated.
srv-rr-gh-researchbt Oct 4, 2023
de995b1
Branch was auto-updated.
srv-rr-gh-researchbt Oct 4, 2023
2b140c0
Branch was auto-updated.
srv-rr-gh-researchbt Oct 5, 2023
053e651
Branch was auto-updated.
srv-rr-gh-researchbt Oct 13, 2023
166eb75
Branch was auto-updated.
srv-rr-gh-researchbt Oct 18, 2023
cb95a59
Branch was auto-updated.
srv-rr-gh-researchbt Oct 18, 2023
5d86414
Branch was auto-updated.
srv-rr-gh-researchbt Oct 18, 2023
321c040
Branch was auto-updated.
srv-rr-gh-researchbt Oct 25, 2023
d68a917
adding new detection
mvelazc0 Oct 25, 2023
706f713
update macro
mvelazc0 Oct 25, 2023
92cf159
updating detections
mvelazc0 Oct 26, 2023
dcc7081
adding new detection
mvelazc0 Oct 26, 2023
792e695
Branch was auto-updated.
srv-rr-gh-researchbt Oct 26, 2023
095838e
Branch was auto-updated.
srv-rr-gh-researchbt Oct 27, 2023
b5acee8
adding detection
mvelazc0 Oct 27, 2023
b4356da
updating macro. adding new detection.
mvelazc0 Oct 27, 2023
15453d5
update sourcetype
mvelazc0 Oct 27, 2023
cff4168
new detection
mvelazc0 Oct 30, 2023
a62bde4
updates
mvelazc0 Oct 30, 2023
d2e1de3
adding detection
mvelazc0 Oct 31, 2023
31d2d20
adding detection
mvelazc0 Oct 31, 2023
77b591f
update detection
mvelazc0 Oct 31, 2023
1ff4ed0
Update azure_ad_multiple_denied_mfa_requests_for_user.yml
mvelazc0 Oct 31, 2023
8a0f56b
Branch was auto-updated.
srv-rr-gh-researchbt Nov 1, 2023
1741f91
updating detections
mvelazc0 Nov 1, 2023
43f748d
Merge branch 'TR_3232_azure_ad' of github.com:splunk/security_content…
mvelazc0 Nov 1, 2023
5f61268
Branch was auto-updated.
srv-rr-gh-researchbt Nov 1, 2023
7b501ac
Update azure_ad_multiple_failed_mfa_requests_for_user.yml
mvelazc0 Nov 1, 2023
e7b504d
Merge branch 'TR_3232_azure_ad' of github.com:splunk/security_content…
mvelazc0 Nov 1, 2023
a08846e
add some testing
pyth0n1c Nov 8, 2023
304ae9a
can't run poetry shell in github
pyth0n1c Nov 8, 2023
7c76a97
forgot to add checkout
pyth0n1c Nov 8, 2023
96d7006
fix spacing
pyth0n1c Nov 8, 2023
51a3b86
Fix observable issues, unicode characters,
pyth0n1c Nov 8, 2023
6d6a603
More minor testing fixes
pyth0n1c Nov 8, 2023
f77422a
fix pathing
pyth0n1c Nov 8, 2023
7776ce8
adding new detection
mvelazc0 Nov 9, 2023
5070105
update detection
mvelazc0 Nov 9, 2023
8c0c057
updating hunting query
mvelazc0 Nov 9, 2023
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
74 changes: 74 additions & 0 deletions detections/cloud/azure_ad_device_code_authentication.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Azure AD Device Code Authentication
id: d68d8732-6f7e-4ee5-a6eb-737f2b990b91
version: 1
date: '2023-08-03'
author: Mauricio Velazco, Gowthamaraj Rajendran, Splunk
status: production
type: TTP
data_source: []
description: The following analytic identifies the execution of the Azure Device Code Phishing attack,
which can lead to Azure Account Take-Over (ATO). The detection leverages Azure AD logs specifically
focusing on authentication requests to identify the attack. This technique involves creating malicious
infrastructure, bypassing Multi-Factor Authentication (MFA), and bypassing Conditional Access Policies (CAPs).
The attack aims to compromise users by sending them phishing emails from attacker-controlled domains and trick
the victims into performing OAuth 2.0 device authentication. A successful execution of this attack can result
in adversaries gaining unauthorized access to Azure AD, Exchange mailboxes, and the target's Outlook Web Application (OWA).
This attack technique was detailed by security researchers including Bobby Cooke, Stephan Borosh, and others.
It's crucial for organizations to be aware of this threat, as it can lead to unauthorized access and potential data breaches.
search: '`azuread` category=SignInLogs "properties.authenticationProtocol"=deviceCode
| rename properties.* as *
| stats values(userPrincipalName) by _time, ipAddress, appDisplayName, userAgent
Copy link
Contributor

Choose a reason for hiding this comment

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

add : values(userPrincipalName) as user

lets use CIM field names. when you look at this data in splunk - do you see src_ip or src instead of ipAddress.
You can identify field names which are CIM specific usually in lowercase format

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated to use CIM fields. now that I'm using the new sourcetype that maps to CIM, using CIM fields.

| `azure_ad_device_code_authentication_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.
Specifically, this analytic leverages the AuditLogs log category.
known_false_positives: In most organizations, Code Based Authentication will be used
rarely. Filter as needed.
references:
- https://attack.mitre.org/techniques/T1528
- https://github.com/rvrsh3ll/TokenTactics
- https://embracethered.com/blog/posts/2022/device-code-phishing/
- https://0xboku.com/2021/07/12/ArtOfDeviceCodePhish.html
- https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-device-code
tags:
analytic_story:
- Azure Active Directory Account Takeover
asset_type: Azure AD
confidence: 50
impact: 70
message: Device code requested for $userPrincipalName$ from $ipAddress$
mitre_attack_id:
- T1528
- T1566
- T1566.002
observable:
- name: userPrincipalName
type: User
role:
- Victim
- name: ipAddress
type: IP Address
role:
- Attacker
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
risk_score: 35
required_fields:
- _time
- category
- properties.authenticationProtocol
- properties.userPrincipalName
- properties.ipAddress
- properties.status.additionalDetails
- properties.appDisplayName
- properties.userAgent
security_domain: identity
tests:
- name: True Positive Test
attack_data:
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1528/device_code_authentication/azure-audit.log
source: mscs:azure:eventhub
sourcetype: mscs:azure:eventhub