Azure AD New Custom Domain Added

Original Source: [splunk source]
Name:Azure AD New Custom Domain Added
id:30c47f45-dd6a-4720-9963-0bca6c8686ef
version:5
date:2024-09-30
author:Mauricio Velazco, Gowthamaraj Rajendran, Splunk
status:production
type:TTP
Description:The following analytic detects the addition of a new custom domain within an Azure Active Directory (AD) tenant. It leverages Azure AD AuditLogs to identify successful "Add unverified domain" operations. This activity is significant as it may indicate an adversary attempting to establish persistence by setting up identity federation backdoors, allowing them to impersonate users and bypass authentication mechanisms. If confirmed malicious, this could enable attackers to gain unauthorized access, escalate privileges, and maintain long-term access to the Azure AD environment, posing a severe security risk.
Data_source:
  • -Azure Active Directory Add unverified domain
search:`azure_monitor_aad` operationName="Add unverified domain" properties.result=success
| rename properties.* as *
| rename targetResources{}.displayName as domain
| stats count min(_time) as firstTime max(_time) as lastTime by user, domain, result, operationName, src_ip
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `azure_ad_new_custom_domain_added_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:In most organizations, new customm domains will be updated infrequently. Filter as needed.
References:
  -https://docs.microsoft.com/en-us/azure/active-directory/enterprise-users/domains-manage
  -https://www.mandiant.com/resources/remediation-and-hardening-strategies-microsoft-365-defend-against-apt29-v13
  -https://o365blog.com/post/federation-vulnerability/
  -https://www.inversecos.com/2021/11/how-to-detect-azure-active-directory.html
  -https://www.mandiant.com/resources/blog/detecting-microsoft-365-azure-active-directory-backdoors
  -https://attack.mitre.org/techniques/T1484/002/
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$") starthoursago=168 | 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:'$info_min_time$'
latest_offset:'$info_max_time$'
tags:
  analytic_story:
    - 'Azure Active Directory Persistence'
  asset_type:Azure Active Directory
  confidence:90
  impact:60
  message:A new custom domain, $domain$ , was added by $user$
  mitre_attack_id:
    - 'T1484'
    - 'T1484.002'
  observable:
    name:'user'
    type:'User'
    - role:
      - 'Victim'
  product:
    - 'Splunk Enterprise'
    - 'Splunk Enterprise Security'
    - 'Splunk Cloud'
  required_fields:
    - '_time'
    - 'operationName'
    - 'properties.result'
    - 'src_ip'
    - 'properties.targetResources{}.displayName'
    - 'user'
  risk_score:54
  security_domain:threat

tests:
name:'True Positive Test'
 attack_data:
  data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1484.002/new_federated_domain/azure-audit.log
  source: Azure AD
  sourcetype: azure:monitor:aad
  update_timestamp: True
manual_test:None

Related Analytic Stories


Azure Active Directory Persistence