L1BIO 12.02.01ISO A.13.2.3CIS Outlook - Attachments
Outlook: Schakel Uit Automatische Download Of Attachments
π 2025-10-30
β’
β±οΈ 5 minuten lezen
β’
π΄ Must-Have
πΌ Management Samenvatting
Schakel uit automatische download van email attachments voorkomt dat malicious files automatische op disk geschreven worden bij email preview - PRIMARY defense tegen email-based malware delivery.
Aanbeveling
IMPLEMENT
Risico zonder
High
Risk Score
8/10
Implementatie
2u (tech: 1u)
Van toepassing op:
β Microsoft Outlook
Auto-download attachments is malware risk: Preview pane opens email β attachments auto-download to %TEMP%, Malware written to disk voordat user interaction, Antivirus scanning race condition (file op disk voordat AV scans). Attack: Phishing email β user previews in reading pane β malicious .exe/.zip auto-downloads β malware op disk. Zonder disable: Attachments download automatische (reading pane preview), No user awareness (silent download), Files in %TEMP% folder (potential execution).
Implementatie
Schakel uit auto-download: Outlook doet niet download attachments Totdat user explicit clicks attachment, User moet deliberate action (download button click), No silent attachment writes to disk.
Vereisten
Outlook 2016+
Intune of GPO
Implementatie
Intune Settings Catalog: Outlook\Security β doen niet download pictures of other content automatisch in HTML e-mail: ingeschakeld.
Monitoring
Gebruik PowerShell-script no-auto-download-attachments.ps1 (functie Invoke-Monitoring) β Controleren.
Monitor %TEMP% folder voor unexpected executables, audit email attachment downloads.
Compliance en Auditing
Auto-download blocking: CIS Office Benchmark (Outlook security), BIO 12.02 (Bescherming tegen malware), ISO 27001 A.13.2.3 (Electronic messaging).
Remediatie
Gebruik PowerShell-script no-auto-download-attachments.ps1 (functie Invoke-Remediation) β Herstellen.
Compliance & Frameworks
CIS M365: Control Outlook - Attachments (L1) -
BIO: 12.02.01 -
ISO 27001:2022: A.13.2.3 -
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
# Control: O365-OU-000006 - no auto download attachments#Requires -Version 5.1# DISA STIG Microsoft Office 365 ProPlus v3r3param(
[string]$RegistryPath = "HKCU:\Software\Policies\Microsoft\Office\16.0\OUTLOOK\Security",
[switch]$Monitoring,
[switch]$Remediation,
[switch]$Revert,
[switch]$WhatIf
)
function Invoke-Monitoring {
Write-Host "Monitoring O365-OU-000006: no auto download attachments" -ForegroundColor Green
try {
$valueName = "noautodownloadattachments"
$expectedValue = 1if (-not (Test-Path$RegistryPath)) {
Write-Host "β Registry path does not exist: $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" -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 "β Error checking registry setting: $($_.Exception.Message)" -ForegroundColor Red
return$false
}
}
function Invoke-Remediation {
Write-Host "Remediating O365-OU-000006: no auto download attachments" -ForegroundColor Yellow
try {
if (-not (Test-Path$RegistryPath)) {
Write-Host "Creating registry path: $RegistryPath" -ForegroundColor Yellow
New-Item -Path $RegistryPath -Force | Out-Null
}
$valueName = "noautodownloadattachments"
$expectedValue = 1Set-ItemProperty -Path $RegistryPath -Name $valueName -Value $expectedValue -Type DWord -Force
Write-Host "β Registry value set successfully: $valueName = $expectedValue" -ForegroundColor Green
Start-Sleep -Seconds 1$complianceResult = Invoke-Monitoring
return$complianceResult
}
catch {
Write-Host "β Error configuring registry setting: $($_.Exception.Message)" -ForegroundColor Red
return$false
}
}
function Invoke-Revert {
Write-Host "Reverting O365-OU-000006: no auto download attachments
" -ForegroundColor Yellow
try {
if ($WhatIf) {
Write-Host " [WhatIf] Would remove registry value" -ForegroundColor Cyan
return$true
}
$valueName = "noautodownloadattachments"
if (Test-Path$RegistryPath) {
Remove-ItemProperty -Path $RegistryPath -Name $valueName -ErrorAction SilentlyContinue
Write-Host " Removed registry value: $valueName" -ForegroundColor Green
}
return$true
}
catch {
Write-Host " Error during revert: # Control: O365-OU-000006 - no auto download attachments#Requires -Version 5.1# DISA STIG Microsoft Office 365 ProPlus v3r3param(
[string]$RegistryPath = "HKCU:\Software\Policies\Microsoft\Office\16.0\OUTLOOK\Security",
[switch]$Monitoring,
[switch]$Remediation,
[switch]$Revert,
[switch]$WhatIf
)
function Invoke-Monitoring {
Write-Host "Monitoring O365-OU-000006: no auto download attachments" -ForegroundColor Green
try {
$valueName = "noautodownloadattachments"
$expectedValue = 1if (-not (Test-Path$RegistryPath)) {
Write-Host "β Registry path does not exist: $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" -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 "β Error checking registry setting: $($_.Exception.Message)" -ForegroundColor Red
return$false
}
}
function Invoke-Remediation {
Write-Host "Remediating O365-OU-000006: no auto download attachments" -ForegroundColor Yellow
try {
if (-not (Test-Path$RegistryPath)) {
Write-Host "Creating registry path: $RegistryPath" -ForegroundColor Yellow
New-Item -Path $RegistryPath -Force | Out-Null
}
$valueName = "noautodownloadattachments"
$expectedValue = 1Set-ItemProperty -Path $RegistryPath -Name $valueName -Value $expectedValue -Type DWord -Force
Write-Host "β Registry value set successfully: $valueName = $expectedValue" -ForegroundColor Green
Start-Sleep -Seconds 1$complianceResult = Invoke-Monitoring
return$complianceResult
} catch {
Write-Host "β Error configuring registry setting: $($_.Exception.Message)" -ForegroundColor Red
return$false
}
}
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 "Usage: [-Monitoring] [-Remediation] [-Revert] [-WhatIf]" -ForegroundColor Yellow
}
}
catch {
Write-Host "Script execution error: # Control: O365-OU-000006 - no auto download attachments#Requires -Version 5.1# DISA STIG Microsoft Office 365 ProPlus v3r3param(
[string]$RegistryPath = "HKCU:\Software\Policies\Microsoft\Office\16.0\OUTLOOK\Security",
[switch]$Monitoring,
[switch]$Remediation,
[switch]$Revert,
[switch]$WhatIf
)
function Invoke-Monitoring {
Write-Host "Monitoring O365-OU-000006: no auto download attachments" -ForegroundColor Green
try {
$valueName = "noautodownloadattachments"
$expectedValue = 1if (-not (Test-Path$RegistryPath)) {
Write-Host "β Registry path does not exist: $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" -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 "β Error checking registry setting: $($_.Exception.Message)" -ForegroundColor Red
return$false
}
}
function Invoke-Remediation {
Write-Host "Remediating O365-OU-000006: no auto download attachments" -ForegroundColor Yellow
try {
if (-not (Test-Path$RegistryPath)) {
Write-Host "Creating registry path: $RegistryPath" -ForegroundColor Yellow
New-Item -Path $RegistryPath -Force | Out-Null
}
$valueName = "noautodownloadattachments"
$expectedValue = 1Set-ItemProperty -Path $RegistryPath -Name $valueName -Value $expectedValue -Type DWord -Force
Write-Host "β Registry value set successfully: $valueName = $expectedValue" -ForegroundColor Green
Start-Sleep -Seconds 1$complianceResult = Invoke-Monitoring
return$complianceResult
}
catch {
Write-Host "β Error configuring registry setting: $($_.Exception.Message)" -ForegroundColor Red
return$false
}
}
function Invoke-Revert {
Write-Host "Reverting O365-OU-000006: no auto download attachments
" -ForegroundColor Yellow
try {
if ($WhatIf) {
Write-Host " [WhatIf] Would remove registry value" -ForegroundColor Cyan
return$true
}
$valueName = "noautodownloadattachments"
if (Test-Path$RegistryPath) {
Remove-ItemProperty -Path $RegistryPath -Name $valueName -ErrorAction SilentlyContinue
Write-Host " Removed registry value: $valueName" -ForegroundColor Green
}
return$true
}
catch {
Write-Host " Error during revert: # Control: O365-OU-000006 - no auto download attachments#Requires -Version 5.1# DISA STIG Microsoft Office 365 ProPlus v3r3param(
[string]$RegistryPath = "HKCU:\Software\Policies\Microsoft\Office\16.0\OUTLOOK\Security",
[switch]$Monitoring,
[switch]$Remediation,
[switch]$Revert,
[switch]$WhatIf
)
function Invoke-Monitoring {
Write-Host "Monitoring O365-OU-000006: no auto download attachments" -ForegroundColor Green
try {
$valueName = "noautodownloadattachments"
$expectedValue = 1if (-not (Test-Path$RegistryPath)) {
Write-Host "β Registry path does not exist: $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" -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 "β Error checking registry setting: $($_.Exception.Message)" -ForegroundColor Red
return$false
}
}
function Invoke-Remediation {
Write-Host "Remediating O365-OU-000006: no auto download attachments" -ForegroundColor Yellow
try {
if (-not (Test-Path$RegistryPath)) {
Write-Host "Creating registry path: $RegistryPath" -ForegroundColor Yellow
New-Item -Path $RegistryPath -Force | Out-Null
}
$valueName = "noautodownloadattachments"
$expectedValue = 1Set-ItemProperty -Path $RegistryPath -Name $valueName -Value $expectedValue -Type DWord -Force
Write-Host "β Registry value set successfully: $valueName = $expectedValue" -ForegroundColor Green
Start-Sleep -Seconds 1$complianceResult = Invoke-Monitoring
return$complianceResult
} catch {
Write-Host "β Error configuring registry setting: $($_.Exception.Message)" -ForegroundColor Red
return$false
}
}
if ($Monitoring) {
$result = Invoke-Monitoring
exit $(if ($result) { 0 } else { 1 })
} elseif ($Remediation) {
$result = Invoke-Remediation
exit $(if ($result) { 0 } else { 1 })
} else {
Write-Host "Usage: .\no-auto-download-attachments.ps1 [-Monitoring] [-Remediation]" -ForegroundColor Yellow
Write-Host " -Monitoring: Check current compliance status" -ForegroundColor White
Write-Host " -Remediation: Apply recommended configuration" -ForegroundColor White
}
" -ForegroundColor Red
return$false
}
}
# Main executiontry {
if ($Monitoring) {
$result = Invoke-Monitoring
exit $(if ($result) { 0 } else { 1 })
}
elseif ($Remediation) {
$result = Invoke-Remediation
exit $(if ($result) { 0 } else { 1 })
}
else {
Write-Host "Usage: .\no-auto-download-attachments.ps1 [-Monitoring] [-Remediation]" -ForegroundColor Yellow
Write-Host " -Monitoring: Check current compliance status" -ForegroundColor White
Write-Host " -Remediation: Apply recommended configuration" -ForegroundColor White
}
" -ForegroundColor Red
exit 1
}
" -ForegroundColor Red
return$false
}
}
# Main executiontry {
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 "Usage: [-Monitoring] [-Remediation] [-Revert] [-WhatIf]" -ForegroundColor Yellow
}
}
catch {
Write-Host "Script execution error: # Control: O365-OU-000006 - no auto download attachments#Requires -Version 5.1# DISA STIG Microsoft Office 365 ProPlus v3r3param(
[string]$RegistryPath = "HKCU:\Software\Policies\Microsoft\Office\16.0\OUTLOOK\Security",
[switch]$Monitoring,
[switch]$Remediation,
[switch]$Revert,
[switch]$WhatIf
)
function Invoke-Monitoring {
Write-Host "Monitoring O365-OU-000006: no auto download attachments" -ForegroundColor Green
try {
$valueName = "noautodownloadattachments"
$expectedValue = 1if (-not (Test-Path$RegistryPath)) {
Write-Host "β Registry path does not exist: $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" -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 "β Error checking registry setting: $($_.Exception.Message)" -ForegroundColor Red
return$false
}
}
function Invoke-Remediation {
Write-Host "Remediating O365-OU-000006: no auto download attachments" -ForegroundColor Yellow
try {
if (-not (Test-Path$RegistryPath)) {
Write-Host "Creating registry path: $RegistryPath" -ForegroundColor Yellow
New-Item -Path $RegistryPath -Force | Out-Null
}
$valueName = "noautodownloadattachments"
$expectedValue = 1Set-ItemProperty -Path $RegistryPath -Name $valueName -Value $expectedValue -Type DWord -Force
Write-Host "β Registry value set successfully: $valueName = $expectedValue" -ForegroundColor Green
Start-Sleep -Seconds 1$complianceResult = Invoke-Monitoring
return$complianceResult
} catch {
Write-Host "β Error configuring registry setting: $($_.Exception.Message)" -ForegroundColor Red
return$false
}
}
function Invoke-Revert {
Write-Host "Reverting O365-OU-000006: no auto download attachments
" -ForegroundColor Yellow
try {
if ($WhatIf) {
Write-Host " [WhatIf] Would remove registry value" -ForegroundColor Cyan
return$true
}
$valueName = "noautodownloadattachments"
if (Test-Path$RegistryPath) {
Remove-ItemProperty -Path $RegistryPath -Name $valueName -ErrorAction SilentlyContinue
Write-Host " Removed registry value: $valueName" -ForegroundColor Green
}
return$true
} catch {
Write-Host " Error during revert: # Control: O365-OU-000006 - no auto download attachments#Requires -Version 5.1# DISA STIG Microsoft Office 365 ProPlus v3r3param(
[string]$RegistryPath = "HKCU:\Software\Policies\Microsoft\Office\16.0\OUTLOOK\Security",
[switch]$Monitoring,
[switch]$Remediation,
[switch]$Revert,
[switch]$WhatIf
)
function Invoke-Monitoring {
Write-Host "Monitoring O365-OU-000006: no auto download attachments" -ForegroundColor Green
try {
$valueName = "noautodownloadattachments"
$expectedValue = 1if (-not (Test-Path$RegistryPath)) {
Write-Host "β Registry path does not exist: $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" -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 "β Error checking registry setting: $($_.Exception.Message)" -ForegroundColor Red
return$false
}
}
function Invoke-Remediation {
Write-Host "Remediating O365-OU-000006: no auto download attachments" -ForegroundColor Yellow
try {
if (-not (Test-Path$RegistryPath)) {
Write-Host "Creating registry path: $RegistryPath" -ForegroundColor Yellow
New-Item -Path $RegistryPath -Force | Out-Null
}
$valueName = "noautodownloadattachments"
$expectedValue = 1Set-ItemProperty -Path $RegistryPath -Name $valueName -Value $expectedValue -Type DWord -Force
Write-Host "β Registry value set successfully: $valueName = $expectedValue" -ForegroundColor Green
Start-Sleep -Seconds 1$complianceResult = Invoke-Monitoring
return$complianceResult
}
catch {
Write-Host "β Error configuring registry setting: $($_.Exception.Message)" -ForegroundColor Red
return$false
}
}
if ($Monitoring) {
$result = Invoke-Monitoring
exit $(if ($result) { 0 } else { 1 })
}
elseif ($Remediation) {
$result = Invoke-Remediation
exit $(if ($result) { 0 } else { 1 })
}
else {
Write-Host "Usage: .\no-auto-download-attachments.ps1 [-Monitoring] [-Remediation]" -ForegroundColor Yellow
Write-Host " -Monitoring: Check current compliance status" -ForegroundColor White
Write-Host " -Remediation: Apply recommended configuration" -ForegroundColor White
}
" -ForegroundColor Red
return$false
}
}
# Main executiontry {
if ($Monitoring) {
$result = Invoke-Monitoring
exit $(if ($result) { 0 } else { 1 })
} elseif ($Remediation) {
$result = Invoke-Remediation
exit $(if ($result) { 0 } else { 1 })
} else {
Write-Host "Usage: .\no-auto-download-attachments.ps1 [-Monitoring] [-Remediation]" -ForegroundColor Yellow
Write-Host " -Monitoring: Check current compliance status" -ForegroundColor White
Write-Host " -Remediation: Apply recommended configuration" -ForegroundColor White
}
" -ForegroundColor Red
exit 1
}
Risico zonder implementatie
Risico zonder implementatie
High: HOOG: Auto-download is malware op disk via reading pane preview. Silent execution risk.
Management Samenvatting
Schakel uit Outlook auto-download attachments. User moet explicit click. voorkomt silent malware writes. Implementatie: 1-2 uur.