Detect Domain or Tenant Policy Modification in IBM QRadar
Adversaries may modify the configuration settings of a domain or identity tenant to evade defenses and/or escalate privileges in centrally managed environments. This includes altering Group Policy Objects (GPOs) in Active Directory to push malicious configurations to domain-joined endpoints, modifying domain trust relationships to allow adversary-controlled domains to forge access tokens accepted by victim resources, and adding rogue federated identity providers to cloud tenants (Azure AD, Okta) to authenticate as any managed user. Nation-state actors including those behind the SolarWinds (SUNBURST) campaign abused federation trust settings to achieve persistent, stealthy access across cloud environments. Attackers may temporarily modify policy, complete their objective, and revert changes to remove indicators.
MITRE ATT&CK
- Canonical reference
- https://attack.mitre.org/techniques/T1484/
QRadar Detection Query
SELECT
DATEFORMAT(starttime, 'YYYY-MM-dd HH:mm:ss') AS event_time,
LOGSOURCENAME(logsourceid) AS log_source,
username AS actor,
hostname AS device_hostname,
"EventID" AS windows_event_id,
CASE
WHEN "EventID" = '5137' THEN 'GPO Created'
WHEN "EventID" = '5136' THEN 'GPO Modified'
WHEN "EventID" = '5141' THEN 'GPO Deleted'
WHEN "EventID" = '4706' THEN 'Domain Trust Created'
WHEN "EventID" = '4707' THEN 'Domain Trust Removed'
WHEN "EventID" = '4716' THEN 'Domain Trust Modified'
WHEN "EventID" = '4865' THEN 'Forest Trust Entry Added'
WHEN "EventID" = '4866' THEN 'Forest Trust Entry Removed'
WHEN "EventID" = '4867' THEN 'Forest Trust Entry Modified'
ELSE 'Unknown Policy Event'
END AS event_type,
"ObjectClass" AS object_class,
"ObjectDN" AS object_dn,
"AttributeLDAPDisplayName" AS ldap_attribute,
"TargetDomainName" AS target_domain,
"TrustType" AS trust_type,
"TrustDirection" AS trust_direction,
CASE
WHEN "EventID" IN ('4706', '4865') THEN 90
WHEN "EventID" IN ('5141', '4707', '4716', '4866', '4867') THEN 80
WHEN "EventID" = '5137' THEN 70
WHEN "EventID" = '5136' THEN 60
ELSE 50
END AS risk_score
FROM events
WHERE
LOGSOURCETYPEID(devicetype) = 12
AND "EventID" IN ('5136', '5137', '5141', '4706', '4707', '4716', '4865', '4866', '4867')
AND (
"EventID" IN ('4706', '4707', '4716', '4865', '4866', '4867')
OR (
"EventID" IN ('5136', '5137', '5141')
AND (
"ObjectClass" = 'groupPolicyContainer'
OR LOWER("ObjectDN") LIKE '%cn=policies%'
)
)
)
AND starttime > NOW() - 86400000
ORDER BY risk_score DESC, starttime DESC
LIMIT 500 Detects T1484 in QRadar using AQL against the Microsoft Windows Security Event Log DSM (LOGSOURCETYPEID 12). Covers GPO object lifecycle events (5136/5137/5141) filtered to groupPolicyContainer objects, and all domain/forest trust modification events (4706/4707/4716/4865-4867). Assigns risk scores from 60–90 based on event severity: trust creation events score highest (90) given their potential for persistent cross-domain access, while GPO modifications score 60–80 depending on whether they create, change, or delete policy objects.
Data Sources
Required Tables
False Positives & Tuning
- Domain controller promotion and demotion procedures that automatically create and modify trust relationships as part of the AD DS installation wizard — these are expected in environments running dcpromo-equivalent operations
- Routine GPO modifications by Windows administration teams using Group Policy Management Console (GPMC) for patch deployment, software distribution, or security baseline enforcement during weekly change windows
- Forest trust creation during disaster recovery testing or failover exercises where secondary AD forests are connected to validate backup authentication infrastructure
- Automated AD lifecycle management tools (Saviynt, SailPoint, Microsoft Identity Manager) that modify GPO permissions as part of joiner-mover-leaver workflows for privileged accounts
- SCCM/MECM and Intune co-management configuration changes that modify GPO precedence and linking during hybrid management transitions
Other platforms for T1484
Testing Methodology
Validate this detection against 5 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Create and Link a Malicious GPO via PowerShell
Expected signal: Windows Security Event ID 5137 on the domain controller: Directory Service Object Created, ObjectClass=groupPolicyContainer, ObjectDN=CN={<GUID>},CN=Policies,CN=System,DC=<domain>. Security Event ID 5136: gPCFileSysPath attribute set to \\<domain>\SYSVOL\<domain>\Policies\{<GUID>}. Sysmon Event ID 1 on the initiating workstation: powershell.exe with 'New-GPO' and 'New-GPLink' in CommandLine. PowerShell ScriptBlock Event ID 4104 with full cmdlet execution.
- Test 2Modify GPO to Deploy a Scheduled Task via XML Injection
Expected signal: Sysmon Event ID 11 (File Create) on the DC or management host: ScheduledTasks.xml created in SYSVOL path. Windows Security Event ID 5136 on DC: gPCFileSysPath or versionNumber attribute of the groupPolicyContainer modified, SubjectAccountName=<modifying account>. Event ID 4104 (ScriptBlock) capturing Set-GPRegistryValue invocation. On domain clients, Sysmon Event ID 1 for schtasks.exe or Task Scheduler Event 106/200 for task registration/execution.
- Test 3Create New Domain Trust (Simulated via Set-ADObject)
Expected signal: Windows Security Event ID 4706 on domain controllers: A new trust was created to a domain. SubjectAccountName=<admin account>, TargetDomainName=df00tech-test.local, TrustType=2 (Windows), TrustDirection=1 (Inbound), TrustAttributes=8. Active Directory Event ID 5137: trustedDomain object created in CN=System. Replication events (4928/4929) as the new object replicates to other DCs.
- Test 4Azure AD Federation Settings Modification via PowerShell
Expected signal: Azure AD AuditLogs entry: OperationName='Set federation settings on domain', Category='Policy', Result='success', TargetResources=[{DisplayName: <domain>}], InitiatedBy.user.userPrincipalName=<admin UPN>, InitiatedBy.user.ipAddress=<source IP>. The modified IssuerUri appears in the ModifiedProperties array of the audit event. Azure AD Sign-in Logs may show subsequent authentication attempts using the modified federation settings.
- Test 5Enumerate and Identify Vulnerable GPO Permissions (Pre-Attack Reconnaissance)
Expected signal: Sysmon Event ID 1: powershell.exe with 'Get-GPPermission' and 'Get-ACL' in CommandLine. PowerShell ScriptBlock Event ID 4104 capturing the enumeration loop. Sysmon Event ID 5 (Process Terminated) when enumeration completes. LDAP query telemetry visible in network captures — the GroupPolicy module issues LDAP searches for groupPolicyContainer objects against the domain controller.
References (13)
- https://attack.mitre.org/techniques/T1484/
- https://adsecurity.org/?p=2716
- https://wald0.com/?p=179
- https://blog.harmj0y.net/redteaming/abusing-gpo-permissions/
- https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/
- https://www.microsoft.com/security/blog/2020/12/28/using-microsoft-365-defender-to-coordinate-protection-against-solorigate/
- https://github.com/Azure/Azure-Sentinel/blob/master/Detections/AuditLogs/ADFSDomainTrustMods.yaml
- https://docs.microsoft.com/en-us/office365/troubleshoot/active-directory/update-federated-domain-office-365
- https://sec.okta.com/articles/2023/08/cross-tenant-impersonation-prevention-and-detection
- https://us-cert.cisa.gov/ncas/alerts/aa21-008a
- https://www.sygnia.co/threat-reports-and-advisories/golden-saml-attack/
- https://learn.microsoft.com/en-us/azure/active-directory/reports-monitoring/reference-audit-activities
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1484.001/T1484.001.md
Unlock Pro Content
Get the full detection package for T1484 including response playbook, investigation guide, and atomic red team tests.