Detection rules › Splunk
Azure AD Successful PowerShell Authentication
The following analytic identifies a successful authentication event against an Azure AD tenant using PowerShell cmdlets. This detection leverages Azure AD SignInLogs to identify successful logins where the appDisplayName is "Microsoft Azure PowerShell." This activity is significant because it is uncommon for regular, non-administrative users to authenticate using PowerShell, and it may indicate enumeration and discovery techniques by an attacker. If confirmed malicious, this activity could allow attackers to perform extensive reconnaissance, potentially leading to privilege escalation or further exploitation within the Azure environment.
Known false positives
- Administrative users will likely use PowerShell commandlets to troubleshoot and maintain the environment. Filter as needed.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Resource Development | |
| Initial Access | |
| Persistence | |
| Privilege Escalation | |
| Stealth |
Telemetry coverage
Rules detecting the same action
These rules filter on the same operation.
- Azure AD Authentication Failed During MFA Challenge (Splunk)
- Azure AD Device Code Authentication (Splunk)
- Azure AD High Number Of Failed Authentications For User (Splunk)
- Azure AD High Number Of Failed Authentications From Ip (Splunk)
- Azure AD Multiple AppIDs and UserAgents Authentication Spike (Splunk)
- Azure AD Multiple Denied MFA Requests For User (Splunk)
- Azure AD Multiple Failed MFA Requests For User (Splunk)
- Azure AD Multiple Users Failing To Authenticate From Ip (Splunk)
Rule body
name: Azure AD Successful PowerShell Authentication
id: 62f10052-d7b3-4e48-b57b-56f8e3ac7ceb
version: 13
creation_date: '2022-07-12'
modification_date: '2026-05-13'
author: Mauricio Velazco, Gowthamaraj Rajendran, Splunk
status: production
type: TTP
description: The following analytic identifies a successful authentication event against an Azure AD tenant using PowerShell cmdlets. This detection leverages Azure AD SignInLogs to identify successful logins where the appDisplayName is "Microsoft Azure PowerShell." This activity is significant because it is uncommon for regular, non-administrative users to authenticate using PowerShell, and it may indicate enumeration and discovery techniques by an attacker. If confirmed malicious, this activity could allow attackers to perform extensive reconnaissance, potentially leading to privilege escalation or further exploitation within the Azure environment.
data_source:
- Azure Active Directory
search: |-
`azure_monitor_aad` category=SignInLogs properties.authenticationDetails{}.succeeded=true properties.appDisplayName="Microsoft Azure PowerShell"
| rename properties.* as *
| rename userAgent as user_agent
| fillnull
| stats count min(_time) as firstTime max(_time) as lastTime
BY dest user src
vendor_account vendor_product user_agent
signature
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `azure_ad_successful_powershell_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 through an EventHub. This analytic was written to be used with the azure:monitor:aad sourcetype leveraging the Signin log category.
known_false_positives: Administrative users will likely use PowerShell commandlets to troubleshoot and maintain the environment. Filter as needed.
references:
- 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
finding:
title: Successful authentication for user $user$ using PowerShell.
entity:
field: user
type: user
score: 50
threat_objects:
- field: src
type: ip_address
analytic_story:
- Azure Active Directory Account Takeover
asset_type: Azure Active Directory
mitre_attack_id:
- T1078.004
- T1586.003
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: cloud
security_domain: identity
Stages and Predicates
Stage 1: search
`azure_monitor_aad` category=SignInLogs properties.authenticationDetails{}.succeeded=true properties.appDisplayName="Microsoft Azure PowerShell"
Stage 2: rename
| rename properties.* as *
Stage 3: rename
| rename userAgent as user_agent
Stage 4: fillnull
| fillnull
Stage 5: stats
| stats count min(_time) as firstTime max(_time) as lastTime
BY dest user src
vendor_account vendor_product user_agent
signature
Stage 6: search
| `security_content_ctime(firstTime)`
Stage 7: search
| `security_content_ctime(lastTime)`
Stage 8: search
| `azure_ad_successful_powershell_authentication_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
category | eq |
| field:"category" kind:eq value:"SignInLogs" |
properties.appDisplayName | eq |
| field:"properties.appDisplayName" kind:eq |
properties.authenticationDetails{}.succeeded | eq |
| field:"properties.authenticationDetails{}.succeeded" kind:eq value:"true" |
sourcetype | eq |
| field:"sourcetype" kind:eq value:"azure:monitor:aad" |