Word: Macros Vereist Een Vertrouwde Uitgever Voor Add-ins

πŸ’Ό Management Samenvatting

Vereist een vertrouwde uitgever voor add-ins voor signed Word macros voorkomt dat willekeurig code-signed macros (gestolen certificates) automatische vertrouwd worden - explicit trust required.

Aanbeveling
IMPLEMENT
Risico zonder
High
Risk Score
7/10
Implementatie
4u (tech: 2u)
Van toepassing op:
βœ“ Microsoft Word

Code signing alleen onvoldoende: Gestolen certificates, Compromised CA's, Expired certificates. vertrouwde Publisher: User/admin MOET publisher EXPLICIET vertrouwen.

Implementatie

Signed macros require publisher in vertrouwde Publishers store. niet-vertrouwde publishers β†’ blocked. Corporate macros: pre-populate vertrouwde publishers via GPO/Intune.

Vereisten

  1. Office 2016+
  2. Code signing infrastructure
  3. vertrouwde Publishers GPO/Intune

Implementatie

Intune Settings Catalog: Word\Security\Vertrouwenscentrum β†’ Require die application add-ins are signed door vertrouwde Publisher: ingeschakeld.

Compliance en Auditing

CIS Office Benchmark, BIO 14.02 (Code signing).

Monitoring

Gebruik PowerShell-script macros-trusted-publisher-required.ps1 (functie Invoke-Monitoring) – Controleren.

Remediatie

Gebruik PowerShell-script macros-trusted-publisher-required.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 Dwingt vertrouwde uitgever handtekening voor macros in Word .DESCRIPTION CIS O365-WD-000018 .NOTES Registry: HKCU:\Software\Policies\Microsoft\Office\16.0\WORD\Security, macrostrustedpublisherrequired = 1 #> #Requires -Version 5.1 param([switch]$Monitoring, [switch]$Remediation, [switch]$Revert, [switch]$WhatIf) $RegistryPath = "HKCU:\Software\Policies\Microsoft\Office\16.0\WORD\Security"; $ValueName = "macrostrustedpublisherrequired"; $ExpectedValue = 1; $ControlID = "O365-WD-000018" function Test-Compliance { try { if (-not(Test-Path $RegistryPath)) { return $false }; $c = Get-ItemProperty -Path $RegistryPath -Name $ValueName -ErrorAction SilentlyContinue; return($c -and $c.$ValueName -eq $ExpectedValue) }catch { return $false } } function Invoke-Monitoring { Write-Host "Monitoring ${ControlID}" -ForegroundColor Green; try { if (-not(Test-Path $RegistryPath)) { Write-Host "βœ— Registry pad bestaat niet" -ForegroundColor Red; return $false }; $c = Get-ItemProperty -Path $RegistryPath -Name $ValueName -ErrorAction SilentlyContinue; if ($c -and $c.$ValueName -eq $ExpectedValue) { Write-Host "βœ“ Compliant" -ForegroundColor Green; return $true }else { Write-Host "βœ— Non-compliant" -ForegroundColor Red; return $false } }catch { Write-Host "βœ— Fout" -ForegroundColor Red; return $false } } function Invoke-Remediation { Write-Host "Remediating ${ControlID}" -ForegroundColor Yellow; try { if ($WhatIf) { Write-Host "WhatIf" -ForegroundColor Cyan; return $true }; if (-not(Test-Path $RegistryPath)) { New-Item -Path $RegistryPath -Force | Out-Null }; Set-ItemProperty -Path $RegistryPath -Name $ValueName -Value $ExpectedValue -Type DWord -Force; Write-Host "βœ“ Ingesteld" -ForegroundColor Green; Start-Sleep -Seconds 1; return Invoke-Monitoring }catch { Write-Host "βœ— Fout" -ForegroundColor Red; return $false } } function Invoke-Revert { Write-Host "Reverting ${ControlID}" -ForegroundColor Yellow; try { if ($WhatIf) { Write-Host "WhatIf" -ForegroundColor Cyan; return $true }; if (Test-Path $RegistryPath) { Remove-ItemProperty -Path $RegistryPath -Name $ValueName -ErrorAction SilentlyContinue; Write-Host "βœ“ Verwijderd" -ForegroundColor Green }; return $true }catch { Write-Host "βœ— Fout" -ForegroundColor Red; return $false } } try { if ($Monitoring) { exit $(if (Invoke-Monitoring) { 0 }else { 1 }) }elseif ($Remediation) { exit $(if (Invoke-Remediation) { 0 }else { 1 }) }elseif ($Revert) { exit $(if (Invoke-Revert) { 0 }else { 1 }) }else { Write-Host "Gebruik: .\macros-trusted-publisher-required.ps1 [-Monitoring] [-Remediation] [-Revert] [-WhatIf]" -ForegroundColor Yellow } }catch { Write-Host "βœ— Fout" -ForegroundColor Red; exit 1 }

Risico zonder implementatie

Risico zonder implementatie
High: Hoog: Code-signed macros met gestolen certificates execute zonder vertrouwde publisher verification.

Management Samenvatting

Vereist een vertrouwde uitgever voor add-ins voor Word macros. Explicit trust required. Implementatie: 2-4 uur.