Azure AD Successful PowerShell Authentication
Description
The following analytic identifies a successful authentication event against an Azure AD tenant using PowerShell commandlets. This behavior is not common for regular, non administrative users. After compromising an account in Azure AD, attackers and red teams alike will perform enumeration and discovery techniques. One method of executing these techniques is leveraging the native PowerShell modules.
- Type: TTP
-
Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Last Updated: 2022-07-13
- Author: Mauricio Velazco, Splunk
- ID: 62f10052-d7b3-4e48-b57b-56f8e3ac7ceb
Annotations
ATT&CK
Kill Chain Phase
- Weaponization
- Exploitation
- Installation
- Delivery
NIST
- DE.CM
CIS20
- CIS 10
CVE
Search
1
2
3
4
`azuread` body.category=SignInLogs body.properties.authenticationDetails{}.succeeded=true body.properties.appDisplayName="Azure Active Directory PowerShell"
| rename body.properties.* as *
| stats values(userPrincipalName) by _time, ipAddress, appDisplayName, userAgent
| `azure_ad_successful_powershell_authentication_filter`
Macros
The SPL above uses the following Macros:
azure_ad_successful_powershell_authentication_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Required fields
List of fields required to use this analytic.
- _time
- body.properties.appDisplayName
- body.category
- body.properties.userPrincipalName
- body.properties.ipAddress
- body.properties.appDisplayName
- body.properties.userAgent
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 in your Splunk environment. Specifically, this analytic leverages the SignInLogs log category.
Known False Positives
Administrative users will likely use PowerShell commandlets to troubleshoot and maintain the environment. Filter as needed.
Associated Analytic Story
RBA
Risk Score | Impact | Confidence | Message |
---|---|---|---|
54.0 | 60 | 90 | Successful authentication for user $body.properties.userPrincipalName$ using PowerShell. |
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.
Reference
- https://attack.mitre.org/techniques/T1078/004/
- https://docs.microsoft.com/en-us/powershell/module/azuread/connect-azuread?view=azureadps-2.0
- https://securitycafe.ro/2022/04/29/pentesting-azure-recon-techniques/
- https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Cloud%20-%20Azure%20Pentest.md
Test Dataset
Replay any dataset to Splunk Enterprise by using our replay.py
tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
source | version: 1