← Back to SOC feed Coverage →

ADFSDomainTrustMods[Nobelium]

kql MEDIUM Azure-Sentinel
CloudAppEvents
aptbackdoorhuntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-05-08T11:00:00Z · Confidence: medium

Hunt Hypothesis

This hypothesis detects potential adversary behavior involving the modification of federation trust settings or transitioning a domain to federated authentication, which could indicate an attempt to establish unauthorized access or exfiltration pathways. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate early-stage adversary activity that could compromise domain trust relationships.

KQL Query

let auditLookback = 1d;
(union isfuzzy=true 
    (
    CloudAppEvents
    | where Timestamp > ago(auditLookback)
    | where ActionType =~ "Set federation settings on domain."
    ),
    (
    CloudAppEvents
    | where Timestamp > ago(auditLookback)
    | where ActionType =~ "Set domain authentication."
    | extend modifiedProperties = parse_json(RawEventData).ModifiedProperties
    | mvexpand modifiedProperties
    | extend newDomainValue=tostring(parse_json(modifiedProperties).NewValue)
    | where newDomainValue has "Federated"
    )
)
| extend resultStatus = extractjson("$.ResultStatus", tostring(RawEventData), typeof(string))
| extend targetDisplayName = parse_json(RawEventData).Target[0].ID
| project Timestamp, ActionType, InitiatingUserOrApp=AccountDisplayName, targetDisplayName, resultStatus, InitiatingIPAddress=IPAddress, UserAgent

Analytic Rule Definition

id: 8b55db72-9ece-4e93-b551-cd7eb7355104
name: ADFSDomainTrustMods[Nobelium]
description: |
  This query will find when federation trust settings are changed for a domain or when the domain is changed from managed to federated authentication. Results will relate to when a new Active Directory Federated Service (ADFS) TrustedRealm object, such as a signing certificate, is added.
  Modification to domain federation settings should be rare, so confirm the added or modified target domain/URL is legitimate administrative behavior.
  The actor, Nobelium, was observed modifying domain trust settings to subvert existing mechanisms and cause the domain to accept authorization tokens signed with actor-owned certificates. See Customer Guidance on Recent Nation-State Cyber Attacks.
  To understand why an authorized user may update settings for a federated domain in Office 365, Azure, or Intune, see Update or repair the settings of a federated domain in Office 365, Azure, or Intune.
  For details on security realms that accept security tokens, see the ADFS Proxy Protocol (MS-ADFSPP) specification: 3.2.5.1.2.4 Security Realm Data.
  For further information on AuditLogs, please see Microsoft Entra ID audit activity reference.
  This query is inspired by an Azure Sentinal detection.
  References:
  https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/
  https://docs.microsoft.com/office365/troubleshoot/active-directory/update-federated-domain-office-365
  https://docs.microsoft.com/openspecs/windows_protocols/ms-adfspp/e7b9ea73-1980-4318-96a6-da559486664b
  https://docs.microsoft.com/azure/active-directory/reports-monitoring/reference-audit-activities
  https://github.com/Azure/Azure-Sentinel/blob/master/Detections/AuditLogs/ADFSDomainTrustMods.yaml
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - CloudAppEvents
tactics:
- Defense evasion
tags:
- Nobelium
query: |
  let auditLookback = 1d;
  (union isfuzzy=true 
      (
      CloudAppEvents
      | where Timestamp > ago(auditLookback)
      | where ActionType =~ "Set federation settings on domain."
      ),
      (
      CloudAppEvents
      | where Timestamp > ago(auditLookback)
      | where ActionType =~ "Set domain authentication."
      | extend modifiedProperties = parse_json(RawEventData).ModifiedProperties
      | mvexpand modifiedProperties
      | extend newDomainValue=tostring(parse_json(modifiedProperties).NewValue)
      | where newDomainValue has "Federated"
      )
  )
  | extend resultStatus = extractjson("$.ResultStatus", tostring(RawEventData), typeof(string))
  | extend targetDisplayName = parse_json(RawEventData).Target[0].ID
  | project Timestamp, ActionType, InitiatingUserOrApp=AccountDisplayName, targetDisplayName, resultStatus, InitiatingIPAddress=IPAddress, UserAgent

Required Data Sources

Sentinel TableNotes
CloudAppEventsEnsure this data connector is enabled

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Defense evasion/ADFSDomainTrustMods[Nobelium].yaml