Microsoft 365: Identity Protection Policies Configureren Voor Risico-gebaseerde Toegang

💼 Management Samenvatting

Microsoft Entra ID Protection (voorheen Azure AD Identity Protection) gebruikt machine learning en threat intelligence om gecompromitteerde credentials en risicovolle gebruikersgedragingen te detecteren, met automatische blocking of challenging van verdachte sign-ins door MFA of wachtwoordwijziging te eisen. Deze risk-based access control is essentieel voor moderne threat protection.

Aanbeveling
IMPLEMENT
Risico zonder
Critical
Risk Score
9/10
Implementatie
8u (tech: 4u)
Van toepassing op:
M365
Azure AD

Traditionele security controls die uitsluitend op statische regels gebaseerd zijn, kunnen moderne geavanceerde aanvallen niet detecteren. Credential stuffing-aanvallen waarbij aanvallers gelekte wachtwoorden uit externe data breaches proberen tegen uw organisatie-accounts, blijven onopgemerkt door normale authenticatiesystemen omdat de credentials technisch correct zijn. Password spray-aanvallen waarbij aanvallers systematisch veelgebruikte wachtwoorden tegen vele accounts proberen, genereren te weinig failed attempts per account om traditionele brute-force detection te triggeren. Sign-ins via anonieme IP-adressen, TOR-netwerken of bekende botnet-infrastructuur kunnen erop wijzen dat een account is gecompromitteerd maar worden niet gedetecteerd zonder threat intelligence. Impossible travel-scenarios waarbij een account binnen fysiek onmogelijke tijdspannes vanaf verschillende geografische locaties inlogt (bijvoorbeeld Amsterdam om 09:00 en Sydney om 09:15), zijn duidelijke indicators van credential theft maar vereisen sophisticated detection-algoritmes. Atypical travel patterns, malware-infected devices, unfamiliar sign-in properties, en leaked credentials detected in dark web monitoring blijven onzichtbaar voor traditionele security systems. Microsoft Entra ID Protection lost deze problemen op door real-time machine learning te gebruiken die miljarden sign-in events analyseert om patronen te identificeren, Microsoft's eigen threat intelligence feed te integreren die gelekte credentials detected op het dark web, automatisch MFA te eisen bij medium of high sign-in risk waardoor verdachte logins extra verification vereisen, accounts automatisch te blokkeren of password change te forceren bij high user risk wanneer het account zelf gecompromitteerd lijkt, en deze detecties continue te verbeteren via ML-models die nieuwe attack patterns leren. Deze capability is essentieel voor compliance met NIS2 Artikel 21 dat threat detection vereist, ISO 27001 controle A.8.16 voor security event monitoring, en BIO richtlijn 16.01 voor incident detection.

PowerShell Modules Vereist
Primary API: Microsoft Graph API
Connection: Connect-MgGraph
Required Modules: Microsoft.Graph.Identity.SignIns

Implementatie

Deze maatregel configureert Microsoft Entra ID Protection policies die automatisch risk-based access controls afdwingen. Er zijn twee primaire policy-types: Sign-in risk policy die real-time risico analyseert bij elke inlogpoging en reageert op basis van het detected risk level - bij Medium of High sign-in risk (bijvoorbeeld login vanaf TOR-netwerk, atypical travel, malware-infected device) wordt Multi-Factor Authentication vereist voordat toegang wordt verleend, wat betekent dat zelfs een aanvaller met gestolen credentials de MFA-challenge niet kan passeren en toegang wordt geweigerd. User risk policy monitort het algehele risico van een gebruikersaccount zelf (niet alleen de specifieke sign-in) en reageert op basis van indicators zoals gelekte credentials gedetecteerd op dark web, multiple impossible travel events, of consistent risky behavior patterns - bij High user risk wordt de gebruiker geforceerd om een secure password change uit te voeren voordat verder toegang mogelijk is, wat gecompromitteerde accounts effectief remedieert. De configuratie omvat het instellen van risk thresholds waarbij Medium en High risk levels automatisch actions triggeren terwijl Low risk wordt toegestaan, de scope moet 'All users' zijn met alleen break-glass accounts excluded, en MFA-registratie moet vooraf zijn voltooid omdat policies MFA kunnen eisen. Deze policies vereisen Azure AD Premium P2 licensing en worden automatisch afgedwongen zonder user opt-in mogelijkheid. De machine learning-modellen verbeteren continue op basis van nieuwe threat intelligence en attack patterns. Quarterly reviews moeten plaatsvinden om policy effectiveness te evalueren via risky users en risky sign-ins dashboards. De implementatie kost 4 uur technisch werk voor policy-configuratie plus 4 uur organizational work voor user communication over waarom ze soms MFA-prompts krijgen bij unusual sign-ins. Deze risk-based protection is een must-have voor organisaties met Azure AD P2 licensing en vormt een critical defense layer tegen sophisticated attacks.

Vereisten

  1. Azure AD Premium P2
  2. Users registered voor MFA
  3. SSPR ingeschakeld

Implementatie

  1. Azure AD → identiteitsbescherming → Sign-in risk beleid: Target alle users, risiconiveau: Medium en High, Access: Require MFA, Schakel in beleid
  2. User risk beleid: Target alle users, risiconiveau: High, Access: Require password change, Schakel in beleid
  3. monitor: risky users/sign-ins dashboards

Compliance en Auditing

  1. CIS M365 - control 1.1.9
  2. BIO 16.01
  3. ISO 27001 A.8.16
  4. NIS2 Artikel 21

Monitoring

Gebruik PowerShell-script identity-protection-policies.ps1 (functie Invoke-Monitoring) – Controleren.

Remediatie

Gebruik PowerShell-script identity-protection-policies.ps1 (functie Invoke-Remediation) – Herstellen.

Compliance & Frameworks

Automation

Gebruik het onderstaande PowerShell script om deze security control te monitoren en te implementeren. Het script bevat functies voor zowel monitoring (-Monitoring) als remediation (-Remediation).

PowerShell
<# .SYNOPSIS Identity Protection Policies .DESCRIPTION Checks for Conditional Access policies with user risk and sign-in risk conditions .NOTES NL Baseline v2.0 Requires: Azure AD Premium P2 #> #Requires -Version 5.1 #Requires -Modules Microsoft.Graph [CmdletBinding()] param([switch]$Monitoring) $ErrorActionPreference = 'Stop' Write-Host "`n========================================" -ForegroundColor Cyan Write-Host "Identity Protection Policies" -ForegroundColor Cyan Write-Host "========================================`n" -ForegroundColor Cyan function Invoke-Monitoring { try { Connect-MgGraph -Scopes "Policy.Read.All" -ErrorAction Stop -NoWelcome $policies = Invoke-MgGraphRequest -Method GET -Uri "https://graph.microsoft.com/v1.0/identity/conditionalAccess/policies" $result = @{ userRisk = 0; signInRisk = 0; riskPolicies = @() } foreach ($policy in $policies.value) { if ($policy.state -eq 'enabled') { if ($policy.conditions.userRiskLevels) { $result.userRisk++ Write-Host " [OK] USER RISK POLICY: $($policy.displayName)" -ForegroundColor Green Write-Host " Levels: $($policy.conditions.userRiskLevels -join ', ')" -ForegroundColor Cyan } if ($policy.conditions.signInRiskLevels) { $result.signInRisk++ Write-Host " [OK] SIGN-IN RISK POLICY: $($policy.displayName)" -ForegroundColor Green Write-Host " Levels: $($policy.conditions.signInRiskLevels -join ', ')" -ForegroundColor Cyan } } } Write-Host "`n Summary:" -ForegroundColor Cyan Write-Host " User Risk Policies: $($result.userRisk)" -ForegroundColor $(if ($result.userRisk -gt 0) { 'Green' }else { 'Red' }) Write-Host " Sign-in Risk Policies: $($result.signInRisk)" -ForegroundColor $(if ($result.signInRisk -gt 0) { 'Green' }else { 'Red' }) Write-Host "`n Identity Protection Features:" -ForegroundColor Cyan Write-Host " • Detects compromised credentials" -ForegroundColor Gray Write-Host " • Anonymous IP detection" -ForegroundColor Gray Write-Host " • Atypical travel patterns" -ForegroundColor Gray Write-Host " • Malware-linked IP addresses" -ForegroundColor Gray Write-Host "`n ⚠️ Requires: Azure AD Premium P2" -ForegroundColor Yellow $isCompliant = ($result.userRisk -gt 0 -and $result.signInRisk -gt 0) if ($isCompliant) { Write-Host "`n[OK] COMPLIANT - Identity Protection active" -ForegroundColor Green exit 0 } else { Write-Host "`n[FAIL] NON-COMPLIANT - Missing risk-based policies!" -ForegroundColor Red exit 1 } } catch { Write-Host "ERROR: $_" -ForegroundColor Red exit 2 } } try { if ($Monitoring) { Invoke-Monitoring } else { Write-Host "Use: -Monitoring" -ForegroundColor Yellow } } catch { throw } finally { Write-Host "`n========================================`n" -ForegroundColor Cyan } function Invoke-Remediation { <# .SYNOPSIS Herstelt de configuratie naar de gewenste staat .DESCRIPTION Dit is een monitoring-only control, remediation delegeert naar monitoring #> [CmdletBinding()] param() Write-Host "[INFO] Dit is een monitoring-only control" -ForegroundColor Yellow Write-Host "[INFO] Running monitoring check..." -ForegroundColor Cyan Invoke-Monitoring }

Risico zonder implementatie

Risico zonder implementatie
Critical: Critical - credential compromises blijven undetected. Password spray, credential stuffing, leaked passwords is successful account takeover.

Management Samenvatting

Schakel in identiteitsbescherming: sign-in risk → MFA, user risk → password change. ML-based Detectie van beveiligingsdreigingen. vereist Azure AD P2. Voldoet aan CIS 1.1.9 L2, BIO 16.01. Setup: 4u.