Standaard save format XLSX (Open XML) voorkomt dat gebruikers legacy .xls (Binary format) gebruiken - XLSX heeft betere security features (XML-based is beter malware detectie, no binary exploits), macro separation (.xlsm voor macros), en moderne versleuteling.
Aanbeveling
IMPLEMENT
Risico zonder
Low
Risk Score
4/10
Implementatie
1.5u (tech: 0.5u)
Van toepassing op:
β Microsoft Excel
XLSX vs XLS security: XLSX (.xlsx) is XML-based (2007+ format): beter AV scanning (plaintext XML parseable), Macro-free door Standaard (.xlsx is no macros, .xlsm is explicit macro workbook), Modern versleuteling (AES-256), File structure validatie (ZIP archive met XML). XLS (.xls) is Binary format (1997-2003): Binary parsing vulnerabilities (buffer overflows), Macros mixed met data (security confusion), Weak versleuteling (RC4 - broken), Legacy exploits (CVE history extensive). Zonder XLSX Standaard: Users save as .xls out of habit ('compatibility'), .xls files bypass macro warnings (integrated macros), Binary format is AV blind spots.
Implementatie
Standaard save format: Registry: DefaultFormat is 51 (XLSX - macro-free), Users moet expliciet choose .xlsm if macros needed, 'Save As' defaults to .xlsx (veilige choice), Legacy .xls compatibility available maar not default.
Vereisten
Office 2016+
Intune configuration profile of GPO
User communication (Standaard format change)
Implementatie
Intune Settings Catalog: Excel\Save β Standaard file format: Excel Workbook (*.xlsx). gebruikers kunnen nog steeds save .xls manually if needed (compatibility) maar Standaard is veilige format.
monitoring
Gebruik PowerShell-script default-file-format-xlsx.ps1 (functie Invoke-Monitoring) β Controleren.
Modern file format: CIS Office Benchmark (Use veilige file formats), BIO 12.02 (Reduce aanvalsoppervlak - legacy formats), ISO 27001 A.14.2.9 (System acceptance - deprecate inveilige formats).
Remediatie
Gebruik PowerShell-script default-file-format-xlsx.ps1 (functie Invoke-Remediation) β Herstellen.
Compliance & Frameworks
CIS M365: Control Office Benchmark - File Formats (L2) - Standaard veilige format
BIO: 12.02.01 - veilige defaults
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
Stelt standaard bestandsformaat in op XLSX in Excel
.DESCRIPTION
Dit script implementeert CIS control O365-EX-000023 voor het instellen van het standaard
bestandsformaat op XLSX in Microsoft Excel. Dit zorgt ervoor dat nieuwe bestanden worden
opgeslagen in het moderne XLSX formaat dat betere beveiliging biedt.
.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
.\default-file-format-xlsx.ps1 -Monitoring
Controleert of standaard bestandsformaat XLSX is
.EXAMPLE
.\default-file-format-xlsx.ps1 -Remediation
Stelt standaard bestandsformaat in op XLSX
.NOTES
Registry pad: HKCU:\Software\Policies\Microsoft\Office\16.0\Excel\Options
Waarde: DefaultFormat = 51 (XLSX format)
CIS Control: O365-EX-000023#>#Requires -Version 5.1param(
[switch]$Monitoring,
[switch]$Remediation,
[switch]$Revert,
[switch]$WhatIf
)
# Globale variabelen$RegistryPath = "HKCU:\Software\Policies\Microsoft\Office\16.0\Excel\Options"
$ValueName = "DefaultFormat"
$ExpectedValue = 51$ControlID = "O365-EX-000023"
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}: Standaard bestandsformaat instellen op XLSX" -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 (XLSX formaat)" -ForegroundColor Green
return$true
}
else {
$actualValue = if ($currentValue) { $currentValue.$ValueName } else { "Not Set" }
Write-Host "β Control non-compliant: ${ValueName} = $actualValue (Expected: $ExpectedValue - XLSX formaat)" -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}: Standaard bestandsformaat instellen op XLSX" -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 (XLSX formaat)" -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}: Standaard bestandsformaat 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: .\default-file-format-xlsx.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 > Save" -ForegroundColor White
Write-Host "> Default file format: Enabled: Excel Workbook (*.xlsx)" -ForegroundColor White
}
}
catch {
Write-Host "β Onverwachte fout: $($_.Exception.Message)" -ForegroundColor Red
exit 1
}
Risico zonder implementatie
Risico zonder implementatie
Low: Low-Medium: Legacy .xls format is binary exploits, weak versleuteling, Macro beveiliging bypasses. Modern XLSX is beter security.