Windows Firewall Ingeschakeld Op Alle Profielen (Domain, Private, Public)

πŸ’Ό Management Samenvatting

Windows firewall moet ingeschakeld zijn op ALLE drie netwerk profielen (Domain, Private, Public) om inbound Netwerk aanvallen te blokkeren, ongeautoriseerde remote access te voorkomen, en malware lateral movement te beperken ongeacht de netwerk locatie van het device.

Aanbeveling
IMPLEMENT
Risico zonder
Critical
Risk Score
10/10
Implementatie
4u (tech: 2u)
Van toepassing op:
βœ“ Windows 10
βœ“ Windows 11
βœ“ Windows server

Windows firewall is de eerste verdedigingslinie tegen network-based attacks en MOET altijd ingeschakeld zijn. Zonder firewall: ONBEPERKTE INBOUND CONNECTIONS waarbij aanvallers direct kunnen connecten naar vulnerable services (SMB, RDP, WinRM), port scanning revealeert alle listening services, worms en ransomware kunnen zich laterally verspreiden zonder blocking, MALWARE COMMAND-AND-CONTROL waarbij malware free outbound connections heeft (zonder firewall egress filtering), botnet communication undetected blijft, data exfiltration channels unrestricted zijn, nul netwerk segmentatie waarbij device accessible is voor entire network, no isolation tussen trusted/niet-vertrouwde networks, compromised devices is instant lateral movement vector. Real-world attack scenarios: WannaCry ransomware (2017) - spread via SMB (port 445) naar systems Zonder firewall ingeschakeld, NotPetya - network-wide versleuteling via unbeschermde SMB shares, Emotet - lateral movement via open administrative ports, RDP brute force attacks - succeed tegen devices met firewall disabled. Windows heeft DRIE firewall profielen (elk voor different network types): DOMAIN Profile (domain-joined networks): Corporate network, vertrouwde environment, maar nog steeds needs firewall voor internal threats; PRIVATE Profile (home/work networks): Non-domain maar vertrouwde networks, moet be protected; PUBLIC Profile (airports, cafes, hotels): niet-vertrouwde networks, STRICTest rules needed. Critical importance: Device location changes β†’ firewall profile changes β†’ IF profile disabled is instant exposure. Laptop in office (Domain profile ingeschakeld) β†’ User reeds home (Private profile) β†’ IF Private disabled is open to home Netwerk aanvallen β†’ Compromised door neighbor's infected device. alle THREE PROFILES moet BE ingeschakeld voor complete bescherming.

PowerShell Modules Vereist
Primary API: Intune / Windows Management
Connection: Get-NetFirewallProfile
Required Modules: NetSecurity

Implementatie

Deze control verifieert dat Windows firewall ingeschakeld is voor alle THREE network profiles via Get-NetFirewallProfile PowerShell cmdlet. vereist status per profile: Domain Profile: ingeschakeld is True (Standaard voor domain networks), Private Profile: ingeschakeld is True (home/work vertrouwde networks), Public Profile: ingeschakeld is True (public niet-vertrouwde networks, STRICTest settings). Profile selection is automatische gebaseerd op network location: Domain is Active Directory domain detected, Private is User-designated home/work network, Public is alle andere networks (Standaard voor new networks). Configuration per profile: ingeschakeld: True/False (firewall on/off), DefaultInboundAction: Blokkeer (aanbevolen) of Allow, DefaultOutboundAction: Sta toe (default) of Block, NotifyOnListen: True (alert user bij new inbound rule), LogAllowed: False/True (log allowed connections voor audit), LogBlocked: True (log blocked attempts - security monitoring), LogMaxFileSize: 16384 KB (16 MB minimum voor CIS compliance). Implementation via: Intune Endpoint Security firewall policy, Group Policy (Computer Configuration β†’ Windows Settings β†’ beveiligingsinstellings β†’ Windows Defender firewall), Local PowerShell: Set-NetFirewallProfile -All -ingeschakeld True. Best practice: Schakel in alle profiles, Blokkeer inbound standaard, Sta toe outbound door Standaard (can restrict voor high-security), loggen blocked connections (security analytics), Define explicit Sta toe rules voor business applications (SQL, RDP van specific IPs).

Vereisten

Voor het implementeren van Windows firewall op alle profielen zijn de volgende voorwaarden vereist:

  1. Windows 10, Windows 11, of Windows server 2016 of hoger
  2. Windows firewall service running (should standaard zijn)
  3. Microsoft Intune licentie voor centralized policy management
  4. Endpoint Security Administrator rol in Intune
  5. PowerShell 5.1+ met NetSecurity module voor local verification
  6. Application inventory: Welke applications inbound/outbound network access vereisen?
  7. firewallregel documentation: vereist ports/protocols per business application
  8. Testing phase: Verifieer business applications compatibility met firewall ingeschakeld
  9. Rollback plan: Kan firewall temporary disablen bij critical business impact (NOT aanbevolen)

Implementatie

STAP 1: Pre-implementation audit:

Gebruik PowerShell-script firewall-ingeschakeld-all-profiles.ps1 (functie Invoke-Monitoring) – PowerShell script voor auditing van firewall status per profile.

  1. Run script to check: welke devices hebben firewall disabled?, welke profiles zijn disabled?, Total devices non-compliant
  2. Assess impact: Applications requiring inbound access (document firewallregels needed)
  3. Plan rules: Maak aan Sta toe rules VOORDAT firewall enablement (Voorkom breakage)

STAP 2: Implementatie via Intune Endpoint Security (AANBEVOLEN):

  1. Microsoft Intune admin center β†’ Endpoint security β†’ firewall β†’ Maak aan Policy
  2. Platform: Windows 10 en later, Profile: Microsoft Defender firewall
  3. DOMAIN PROFILE SETTINGS:
  4. - Schakel in firewall: Yes (ingeschakeld)
  5. - Standaard Inbound Action: Block
  6. - Standaard Outbound Action: Allow
  7. - Schakel uit notificaties: No (users zou moeten see firewall alerts)
  8. - loggen Dropped Packets: Yes
  9. - loggen Success Connections: No (optioneel - voor audit)
  10. - loggen Max File Size: 16384 KB
  11. PRIVATE PROFILE SETTINGS (identical):
  12. - Schakel in firewall: Yes
  13. - Standaard Inbound Action: Block
  14. - Standaard Outbound Action: Allow
  15. - [Same logging settings as Domain]
  16. PUBLIC PROFILE SETTINGS (STRICTEST):
  17. - Schakel in firewall: Yes (CRITICAL voor public Wi-Fi)
  18. - Standaard Inbound Action: Block
  19. - Standaard Outbound Action: Sta toe (consider Blokkeer voor high-security)
  20. - Schakel uit Inbound notificaties: Yes (reduce noise op public networks)
  21. - [Same logging settings]
  22. Assign to: alle devices
  23. monitor deployment status

STAP 3: firewallregels voor business applications:

  1. Identify vereist inbound access: RDP (3389) voor admins only, SMB (445) voor file shares, SQL (1433) voor database servers, aangepaste app ports
  2. Maak aan Intune firewallregels policies: Separate policy voor firewallregels, Define explicit Sta toe rules (protocol, port, source IP ranges), Assign to specific device groups (not alle devices)
  3. Testing: Verifieer business applications werk na firewall enablement
  4. monitor: firewall logt voor blocked legitimate traffic (tune rules)

STAP 4: Bulk Schakel in via PowerShell (for immediate remediation):

Gebruik PowerShell-script firewall-ingeschakeld-all-profiles.ps1 (functie Invoke-Remediation) – PowerShell script voor immediate waardoor van firewall op alle profielen.

  1. Run as Administrator: Set-NetFirewallProfile -All -ingeschakeld True
  2. Verify: Get-NetFirewallProfile | Select Name, ingeschakeld (all zou moeten be True)
  3. Configureer defaults: Set-NetFirewallProfile -All -DefaultInboundAction Blokkeer -DefaultOutboundAction Allow
  4. Schakel in logging: Set-NetFirewallProfile -All -LogBlocked True -LogMaxSizeKilobytes 16384

CRITICAL TESTING: Verifieer business-critical applications WORK na firewall enablement voordat company-wide deployment!

monitoring

Gebruik PowerShell-script firewall-enabled-all-profiles.ps1 (functie Invoke-Monitoring) – Controleren.

Continue monitoring:

  1. Intune device compliance: firewall policy deployment status (target 100%)
  2. PowerShell audit: Get-NetFirewallProfile over endpoints (weekly)
  3. Windows Event Logs: Event ID 2003 (firewall profile changed), Event ID 2004 (firewall disabled - CRITICAL ALERT)
  4. firewall logs: %systemroot%\system32\LogFiles\firewall\pfirewall.log
  5. - Review blocked connections (legitimate traffic? Adjust rules)
  6. - detecteer attack patterns (port scans, brute force attempts)
  7. Security monitoring: Alert onmiddellijk indien firewall disabled detected (beveiligingsincident)
  8. Application issues: Helpdesk tickets gerelateerd aan blocked connections (rule tuning)
  9. Quarterly review: firewallregels nog steeds relevant? Unused rules removal

Remediatie

Gebruik PowerShell-script firewall-enabled-all-profiles.ps1 (functie Invoke-Remediation) – Herstellen.

Als firewall DISABLED wordt gedetecteerd (CRITICAL beveiligingsincident):

  1. IMMEDIATE ACTION: Schakel in firewall via Set-NetFirewallProfile -All -ingeschakeld True
  2. INVESTIGATE: HOE werd firewall disabled? (Should nooit happen)
  3. - User action? (Schakel uit 'Turn off Windows firewall' via Security Center)
  4. - Malware disabling firewall? (common ransomware technique - volledige incidentrespons)
  5. - Group Policy conflict? (troubleshoot policy precedence)
  6. - Service stopped? (Windows firewall service is mpssvc)
  7. Beveiligings beoordeling: Device was UNbeschermde - assume potential compromise
  8. - volledige antivirus scan: Start-MpScan -ScanType FullScan
  9. - netwerk isolatie: Disconnect van network tijdens investigation
  10. - Review authentication logs: Suspicious logins tijdens firewall-off period?
  11. - Controleer voor lateral movement: andere devices compromised van Deze device?
  12. FORENSICS: Determine exposure window (how long was firewall off?)
  13. ESCALATE: Security team / SOC notification (firewall Schakel uit is indicator of compromise)
  14. ROOT CAUSE FIX: Voorkom future firewall disabling
  15. - Tamper bescherming: voorkomt beveiligingsinstelling changes
  16. - Group Policy precedence: Zorg ervoor dat Intune/GPO policy enforces enablement
  17. - User permissions: Remove local admin rights (can't Schakel uit firewall)

Voor blocked legitimate traffic (false positives):

  1. Analyze firewall logs: welke traffic is geblokkeerd? Source? Destination? Port?
  2. Verifieer legitimacy: is geblokkeerd application business-critical? Authorized?
  3. Maak aan Sta toe rule: Intune firewallregels policy of PowerShell New-NetFirewallRule
  4. Least privilege: Sta toe alleen vereist ports, alleen van specific source IPs (not 'Any')
  5. Document rule: Business justification, owner, review date
  6. DO NOT globally Schakel uit firewall - Maak aan specific rules only

Compliance en Auditing

Windows firewall enablement is MANDATORY voor naleving van:

  1. CIS Microsoft Windows Benchmark - control 9.1.1, 9.2.1, 9.3.1 (firewall ingeschakeld voor Domain, Private, Public profiles)
  2. BIO 13.01.03 - Netwerken beveiligen - Perimeter security en network Toegangscontrole en authenticaties
  3. BIO 11.02.04 - Toegangsbeveiliging - Network-level access restrictions
  4. ISO 27001:2022 A.13.1.1 - netwerkcontroles - Network Toegangscontrole en authenticatie via firewall
  5. ISO 27001:2022 A.13.1.3 - Segregation in networks - firewall-based netwerk isolatie
  6. NIS2 Artikel 21 - Cybersecurity risicobeheer measures - Network perimeter security
  7. PCI-DSS Requirement 1.1 - firewall configuration standards - firewall ingeschakeld en geconfigureerd
  8. NIST CSF PR.AC-5 - Network integrity is beschermde (firewall enforcement)
  9. NIST SP 800-53 SC-7 - Boundary bescherming - Host-based firewall vereist

firewall disabled is automatische FAIL bij security audits voor alle compliance frameworks.

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 Intune Windows Firewall: All Profiles Enabled .DESCRIPTION CIS - Alle firewall profiles (Domain, Private, Public) MOETEN enabled. .NOTES Filename: firewall-enabled-all-profiles.ps1|Author: Nederlandse Baseline voor Veilige Cloud|Profiles: All|Expected: All Enabled #> #Requires -Version 5.1 #Requires -RunAsAdministrator [CmdletBinding()]param([switch]$WhatIf, [switch]$Monitoring, [switch]$Remediation, [switch]$Revert) $ErrorActionPreference = 'Stop' function Connect-RequiredServices { $p = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()); return $p.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) } function Test-Compliance { $r = [PSCustomObject]@{ScriptName = "firewall-all-profiles.ps1"; PolicyName = "Firewall All Profiles"; IsCompliant = $false; CurrentValue = $null; Details = @() }; function Invoke-Revert { Write-Host "WARNING: Not disabling firewalls" } try { $profiles = @('Domain', 'Private', 'Public'); $enabled = @(); foreach ($p in $profiles) { $fw = Get-NetFirewallProfile -Name $p; $enabled += $fw.Enabled }; if ($enabled -notcontains $false) { $r.IsCompliant = $true; $r.Details += "All profiles enabled" }else { $r.Details += "Not all profiles enabled" } }catch { $r.Details += "Error: $($_.Exception.Message)" }; return $r } function Invoke-Remediation { Set-NetFirewallProfile -All -Enabled True; Write-Host "All firewall profiles enabled" -ForegroundColor Green } function Invoke-Monitoring { $r = Test-Compliance; Write-Host "`n$($r.PolicyName): $(if($r.IsCompliant){'COMPLIANT'}else{'NON-COMPLIANT'})" -ForegroundColor $(if ($r.IsCompliant) { 'Green' }else { 'Red' }); return $r } function Invoke-Revert { Write-Host "WARNING: Not disabling firewalls" } try { if (-not(Connect-RequiredServices)) { exit 1 }; if ($Monitoring) { $r = Invoke-Monitoring; exit $(if ($r.IsCompliant) { 0 }else { 1 }) }elseif ($Remediation) { if (-not $WhatIf) { Invoke-Remediation } }elseif ($Revert) { Invoke-Revert }else { $r = Test-Compliance; exit $(if ($r.IsCompliant) { 0 }else { 1 }) } }catch { Write-Error $_; exit 1 }

Risico zonder implementatie

Risico zonder implementatie
Critical: KRITIEK Netwerkbeveiliging RISICO: firewall disabled is nul network bescherming. Device is COMPLETELY OPEN voor inbound attacks: Ransomware lateral movement (WannaCry, NotPetya spread via SMB to firewall-disabled systems), RDP brute force attacks succeed onmiddellijk, Port scanning reveals alle services, Worms propagate unimpeded, Data exfiltration unrestricted. Recent breaches waarbij firewall disabled CRITICAL was: WannaCry (SMB exploitation), NotPetya (network propagation), Emotet (lateral movement). firewall disabled is compliance FAILURE (automatische fail bij audits). Cost: Ransomware recovery €500K - €5M, compliance boetes (NIS2 €10M, PCI-DSS suspension).

Management Samenvatting

Schakel in Windows firewall op ALLE drie profielen (Domain, Private, Public). Blokkeer inbound standaard. Critical baseline beveiligingscontrole. Voldoet aan CIS 9.1.1/9.2.1/9.3.1 (L1), BIO 13.01, ISO 27001 A.13.1.1, PCI-DSS 1.1, NIS2. Implementatie: 2-4 uur inclusief firewallregels voor business apps. firewall DISABLED is automatische beveiligingsincident - remediate immediately. NO EXCEPTIONS - firewall moet altijd be ingeschakeld.