Microsoft Mitigates Intune Company Portal Device Compliance CA Bypass Risk

Microsoft has quietly mitigated the main risk associated with the “Intune Company Portal” device compliance Conditional Access (CA) bypass. The bypass, which was previously exploitable for enumeration and exploitation purposes, has been rendered mostly ineffective. Microsoft achieved this by reducing the scope of the Intune Company Portal app on the Azure AD graph, limiting it to reading only very limited information. This change significantly reduces the attack surface, making the bypass less useful for offensive operations.

Verified Commands and Code Snippets

1. Check Azure AD App Permissions:

To verify the permissions of an Azure AD app, you can use the following PowerShell command:

Get-AzureADServicePrincipal -All $true | Where-Object { $_.DisplayName -eq "Intune Company Portal" } | Select-Object DisplayName, AppId, AppRoles

2. Monitor Azure AD Sign-In Logs:

Use the following KQL (Kusto Query Language) query in Azure Sentinel or Log Analytics to monitor sign-in attempts that result in insufficient permissions (403 errors):
[kql]
SigninLogs
| where ResultType == “403”
| project TimeGenerated, UserPrincipalName, AppDisplayName, IPAddress, ResultDescription
[/kql]

3. Check Conditional Access Policies:

To list all Conditional Access policies in your Azure AD tenant, use:

Get-AzureADMSConditionalAccessPolicy

4. Audit Azure AD Graph API Usage:

To audit the usage of the Azure AD Graph API, you can use the following command:

Get-AzureADAuditSignInLogs -Filter "startsWith(AppDisplayName, 'Intune')" | Format-Table UserDisplayName, AppDisplayName, CreatedDateTime

What Undercode Say

The mitigation of the Intune Company Portal device compliance CA bypass by Microsoft is a significant step forward in securing Azure AD environments. By reducing the scope of the app’s permissions, Microsoft has effectively neutralized a potential attack vector. This change underscores the importance of continuous monitoring and updating of permissions and access controls in cloud environments.

For defenders, this is a reminder to regularly audit and review the permissions granted to applications and service principals in Azure AD. Tools like PowerShell and KQL can be invaluable in this process, allowing for detailed insights into app permissions, sign-in attempts, and Conditional Access policies.

In addition to the commands provided, here are some additional Linux and Windows commands that can help in securing your environment:

  • Linux:
  • Check open ports and services:
    sudo netstat -tuln
    
  • Monitor system logs for suspicious activity:
    sudo tail -f /var/log/auth.log
    

  • Windows:

  • Check for open ports:
    Get-NetTCPConnection | Where-Object { $_.State -eq "Listen" }
    
  • Monitor Event Logs for security events:
    Get-WinEvent -LogName Security -MaxEvents 10
    

For further reading on Azure AD security best practices, refer to the official Microsoft documentation: Azure AD Security Best Practices.

In conclusion, the proactive steps taken by Microsoft highlight the evolving nature of cloud security. Defenders must remain vigilant, leveraging tools and commands to ensure their environments are secure. Regular audits, monitoring, and updates are key to maintaining a robust security posture in the face of ever-changing threats.

References:

Hackers Feeds, Undercode AIFeatured Image

Scroll to Top