Azure AD External Guest User Invited

 Original Source: [splunk source]
Name:Azure AD External Guest User Invited
id:c1fb4edb-cab1-4359-9b40-925ffd797fb5
version:12
date:None
author:Gowthamaraj Rajendran, Mauricio Velazco, Splunk
status:production
type:TTP
Description:The following analytic detects the invitation of an external guest user within Azure AD. It leverages Azure AD AuditLogs to identify events where an external user is invited, using fields such as operationName and initiatedBy. Monitoring these invitations is crucial as they can lead to unauthorized access if abused. If confirmed malicious, this activity could allow attackers to gain access to internal resources, potentially leading to data breaches or further exploitation of the environment.
Data_source:
  • -Azure Active Directory Invite external user
search:`azure_monitor_aad` operationName="Invite external user"

| rename properties.* as *

| rename initiatedBy.user.userPrincipalName as initiatedBy

| rename targetResources{}.type as type

| 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
initiatedBy type signature

| `security_content_ctime(firstTime)`

| `security_content_ctime(lastTime)`

| `azure_ad_external_guest_user_invited_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. This analytic was written to be used with the azure:monitor:aad sourcetype leveraging the AuditLogs log category.
known_false_positives:Administrator may legitimately invite external guest users. Filter as needed.
References:
  -https://dirkjanm.io/assets/raw/US-22-Mollema-Backdooring-and-hijacking-Azure-AD-accounts_final.pdf
  -https://www.blackhat.com/us-22/briefings/schedule/#backdooring-and-hijacking-azure-ad-accounts-by-abusing-external-identities-26999
  -https://attack.mitre.org/techniques/T1136/003/
  -https://docs.microsoft.com/en-us/azure/active-directory/external-identities/b2b-quickstart-add-guest-users-portal
drilldown_searches:
 name:'View the detection results for - "$user$"'
 search:'%original_detection_search% | search user = "$user$"'
 earliest_offset:'$info_min_time$'
 latest_offset:'$info_max_time$'
 name:'View risk events for the last 7 days for - "$user$"'
 search:'| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$") | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
 earliest_offset:'7d'
 latest_offset:'0'
analytic_story:['Azure Active Directory Persistence']

asset_type:Azure Active Directory

mitre_attack_id:['T1136.003']

product:['Splunk Enterprise', 'Splunk Enterprise Security', 'Splunk Cloud']

category:cloud

security_domain:threat

tags:

tests:
 name:'True Positive Test'
 attack_data:
  data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1136.003/azure_ad_external_guest_user_invited/azure-audit.log
  source: Azure AD
  sourcetype: azure:monitor:aad
 test_type:'unit'
manual_test:None

Related Analytic Stories


Azure Active Directory Persistence