Excel Niet-vertrouwde XLL Add-ins Geblokkeerd

💼 Management Samenvatting

Het blokkeren van niet-vertrouwde XLL add-ins in Excel voorkomt malware execution via Excel add-ins, een frequent misbruikte aanvalsvector voor ransomware en data exfiltration.

Aanbeveling
IMPLEMENT
Risico zonder
Critical
Risk Score
9/10
Implementatie
4u (tech: 2u)
Van toepassing op:
Excel
Microsoft 365 Apps

XLL ADD-INS ZIJN GEVAARLIJK: XLL (Excel Linked Library) zijn native DLL-bestanden die VOLLEDIGE CODE-UITVOERING hebben binnen het Excel-proces. Ze kunnen ALLES doen: toegang tot bestandssysteem, netwerkverbindingen, process injection, diefstal van inloggegevens. POPULARITEIT ALS AANVALSVECTOR: XLL add-ins zijn favoriet bij malware-auteurs: Omzeilen van macro-beveiliging (XLLs zijn GEEN VBA macros), Geen beveiligingswaarschuwingen standaard (in tegenstelling tot macros), Volledige OS-rechten (draait als gebruiker), Moeilijk te detecteren door AV (legitiem DLL-formaat). ECHTE AANVALLEN: Dridex malware via XLL bijlagen, TrickBot gebruikt XLL voor initiële toegang, Emotet campagnes schakelden over naar XLL na macro-blokkering, Ransomware-bendes gebruiken XLL voor deployment. AANVALSKETEN: Phishing e-mail met XLL bijlage → Gebruiker download XLL → Gebruiker opent Excel → Excel vraagt "Deze add-in inschakelen?" (indien BlockUnTrustedXLLs=0) → Gebruiker klikt Ja (social engineering) → XLL voert uit met volledige gebruikersrechten → Malware geïnstalleerd. ZONDER BLOKKERING: Standaard Excel-gedrag staat XLL add-ins toe met simpele gebruikersklik, Beveiligingsnaïeve gebruikers klikken "Inschakelen" zonder het risico te begrijpen, Enterprise-wide compromittering mogelijk binnen uren.

PowerShell Modules Vereist
Primary API: Intune / Group Policy
Connection: Registry Policy
Required Modules:

Implementatie

Deze control configureert Registry policy: HKCU:\Software\Policies\Microsoft\Office\16.0\Excel\Security\BlockUnTrustedXLLs is 1 (DWORD). GEDRAG WANNEER INGESCHAKELD: Excel Blokkeert XLL add-ins van niet-vertrouwde locaties (niet in Vertrouwde locaties), Gebruiker krijgt FOUTMELDING: Add-in geblokkeerd voor beveiliging, XLL kan NIET uitvoeren (harde blokkering - geen gebruikersoverride). VERTROUWDE LOCATIES: Standaard vertrouwd: Excel's Add-ins map (indien digitaal ondertekend), Netwerkshares/UNC-paden gemarkeerd als Vertrouwde locaties (via GPO), Lokale mappen expliciet toegevoegd aan Vertrouwde locaties. BELANGRIJK: Dit Blokkeert alleen NIET-VERTROUWDE XLLs. Legitieme corporate add-ins KUNNEN werken indien: Gedeployed naar Vertrouwde locatie via Intune/GPO, OF: Digitaal ondertekend met corporate certificaat + certificaat vertrouwd. DISA STIG O365-EX-000019: Deze control is VERPLICHT volgens DISA STIG voor overheid/defensie.

Vereisten

Voor implementatie:

  1. Microsoft 365 Apps voor Enterprise (versie 16.0+)
  2. Intune of Group Policy beheer
  3. Inventarisatie: Identificeer legitieme corporate XLL add-ins (indien aanwezig)
  4. Voor corporate XLLs: Configureer Vertrouwde locaties of code signing
  5. Gebruikerscommunicatie: Sommige add-ins kunnen stoppen met werken

Implementatie

Gebruik PowerShell-script block-xll-addins-untrusted.ps1 (functie Invoke-Implementation) – Implementeren.

via Intune (AANBEVOLEN):

  1. Intune admin center → Apps → Beleid → Configuratiebeleid
  2. Maak aan: Microsoft 365 Apps
  3. Instelling: Excel Security → Block niet-vertrouwde XLL add-ins is Ingeschakeld
  4. Implementeer naar: Alle gebruikers

Gebruik PowerShell-script block-xll-addins-untrusted.ps1 (functie Invoke-Remediation) – Lokale remediatie via registry.

via Group Policy:

  1. Download Office ADMX templates
  2. GPO: Gebruikersconfiguratie → Beheersjablonen → Microsoft Excel 2016 → Beveiliging
  3. Beleid: 'Block add-ins van niet-vertrouwde sources' is Ingeschakeld
  4. Implementeer en verifieer

Monitoring

Gebruik PowerShell-script block-xll-addins-untrusted.ps1 (functie Invoke-Monitoring) – Verifieer BlockUnTrustedXLLs is 1.

Monitor: Registry compliance, Gebruiker helpdesk tickets (geblokkeerde legitieme add-ins?), Defender voor Endpoint: XLL-gerelateerde waarschuwingen

Compliance en Auditing

  1. DISA STIG O365-EX-000019 - VERPLICHT voor overheid/defensie
  2. CIS Microsoft 365 Foundations Benchmark
  3. BIO 12.02 - Bescherming tegen malware
  4. ISO 27001 A.8.7
  5. NIS2 Artikel 21

Remediatie

Gebruik PowerShell-script block-xll-addins-untrusted.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 Excel - Block Untrusted XLL Add-ins .DESCRIPTION DISA STIG: O365-EX-000019 Blokkeert XLL add-ins van untrusted bronnen. Registry: HKCU:\Software\Policies\Microsoft\Office\16.0\Excel\Security Value: BlockUnTrustedXLLs = 1 .NOTES Author: Nederlandse Baseline voor Veilige Cloud #> #Requires -Version 5.1 [CmdletBinding()] param([switch]$Monitoring, [switch]$Remediation, [switch]$Revert, [switch]$WhatIf) $ErrorActionPreference = 'Stop' $PolicyName = "Excel - Block Untrusted XLL Add-ins" $RegistryPath = "HKCU:\Software\Policies\Microsoft\Office\16.0\Excel\Security" $RegistryValueName = "BlockUnTrustedXLLs" $ExpectedValue = 1 function Test-Compliance { if (-not (Test-Path $RegistryPath)) { return @{ IsCompliant = $false; RegistryPathExists = $false; CurrentValue = $null } } $regValue = Get-ItemProperty -Path $RegistryPath -Name $RegistryValueName -ErrorAction SilentlyContinue $currentValue = if ($regValue) { $regValue.$RegistryValueName } else { $null } return @{ IsCompliant = ($currentValue -eq $ExpectedValue); CurrentValue = $currentValue } } function Invoke-Revert { if (Test-Path $RegistryPath) { Remove-ItemProperty -Path $RegistryPath -Name $RegistryValueName -Force -ErrorAction SilentlyContinue } Write-Host "[OK] Reverted" -ForegroundColor Green } try { if ($Monitoring) { Write-Host "`n$PolicyName" -ForegroundColor Cyan $r = Test-Compliance Write-Host "Expected: $ExpectedValue | Current: $($r.CurrentValue) | Status: $(if ($r.IsCompliant) { '[OK]' } else { '[FAIL]' })" -ForegroundColor $(if ($r.IsCompliant) { 'Green' } else { 'Red' }) exit $(if ($r.IsCompliant) { 0 } else { 1 }) } elseif ($Remediation) { if (-not (Test-Path $RegistryPath)) { New-Item -Path $RegistryPath -Force | Out-Null } Set-ItemProperty -Path $RegistryPath -Name $RegistryValueName -Value $ExpectedValue -Type DWord -Force Write-Host "[OK] $PolicyName configured" -ForegroundColor Green exit 0 } elseif ($Revert) { if (Test-Path $RegistryPath) { Remove-ItemProperty -Path $RegistryPath -Name $RegistryValueName -Force -ErrorAction SilentlyContinue } Write-Host "[OK] Reverted" -ForegroundColor Green exit 0 } else { Write-Host "Usage: -Monitoring | -Remediation | -Revert" -ForegroundColor Yellow } } catch { Write-Error $_; exit 2 } # ================================================================================ # Standaard Invoke-* Functions (Auto-generated) # ================================================================================ function Invoke-Implementation { <# .SYNOPSIS Implementeert de configuratie #> [CmdletBinding()] param() Invoke-Remediation } function Invoke-Monitoring { <# .SYNOPSIS Controleert de huidige configuratie status #> [CmdletBinding()] param() $Monitoring = $true try { if ($Monitoring) { Write-Host "`n$PolicyName" -ForegroundColor Cyan $r = Test-Compliance Write-Host "Expected: $ExpectedValue | Current: $($r.CurrentValue) | Status: $(if ($r.IsCompliant) { '[OK]' } else { '[FAIL]' })" -ForegroundColor $(if ($r.IsCompliant) { 'Green' } else { 'Red' }) exit $(if ($r.IsCompliant) { 0 } else { 1 }) } elseif ($Remediation) { if (-not (Test-Path $RegistryPath)) { New-Item -Path $RegistryPath -Force | Out-Null } Set-ItemProperty -Path $RegistryPath -Name $RegistryValueName -Value $ExpectedValue -Type DWord -Force Write-Host "[OK] $PolicyName configured" -ForegroundColor Green exit 0 } elseif ($Revert) { if (Test-Path $RegistryPath) { Remove-ItemProperty -Path $RegistryPath -Name $RegistryValueName -Force -ErrorAction SilentlyContinue } Write-Host "[OK] Reverted" -ForegroundColor Green exit 0 } else { Write-Host "Usage: -Monitoring | -Remediation | -Revert" -ForegroundColor Yellow } } catch { Write-Error $_; exit 2 } } function Invoke-Remediation { <# .SYNOPSIS Herstelt de configuratie naar de gewenste staat #> [CmdletBinding()] param() $Remediation = $true try { if ($Monitoring) { Write-Host "`n$PolicyName" -ForegroundColor Cyan $r = Test-Compliance Write-Host "Expected: $ExpectedValue | Current: $($r.CurrentValue) | Status: $(if ($r.IsCompliant) { '[OK]' } else { '[FAIL]' })" -ForegroundColor $(if ($r.IsCompliant) { 'Green' } else { 'Red' }) exit $(if ($r.IsCompliant) { 0 } else { 1 }) } elseif ($Remediation) { if (-not (Test-Path $RegistryPath)) { New-Item -Path $RegistryPath -Force | Out-Null } Set-ItemProperty -Path $RegistryPath -Name $RegistryValueName -Value $ExpectedValue -Type DWord -Force Write-Host "[OK] $PolicyName configured" -ForegroundColor Green exit 0 } elseif ($Revert) { if (Test-Path $RegistryPath) { Remove-ItemProperty -Path $RegistryPath -Name $RegistryValueName -Force -ErrorAction SilentlyContinue } Write-Host "[OK] Reverted" -ForegroundColor Green exit 0 } else { Write-Host "Usage: -Monitoring | -Remediation | -Revert" -ForegroundColor Yellow } } catch { Write-Error $_; exit 2 } }

Risico zonder implementatie

Risico zonder implementatie
Critical: KRITIEK: XLL add-ins is #1 malware vector in Excel. Ransomware-bendes schakelden over naar XLLs nadat macro-blokkering algemeen werd. ZONDER blokkering: Organisatie zeer kwetsbaar voor op Excel gebaseerde malware-campagnes. DISA STIG VERPLICHT.

Management Samenvatting

Blokkeer niet-vertrouwde XLL add-ins in Excel om malware-uitvoering te voorkomen. XLLs is volledige code-uitvoering, favoriet van ransomware-bendes. DISA STIG O365-EX-000019 vereist. Voldoet aan BIO 12.02, ISO 27001 A.8.7, NIS2. Implementatie: 2-4 uur. KRITIEKE MALWARE PREVENTIE.