πΌ 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.
β 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.
Connection:
Get-NetFirewallProfileRequired 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).
- Run script to check: welke devices hebben firewall disabled?, welke profiles zijn disabled?, Total devices non-compliant
- Assess impact: Applications requiring inbound access (document firewallregels needed)
- Plan rules: Maak aan Sta toe rules VOORDAT firewall enablement (Voorkom breakage)
- Microsoft Intune admin center β Endpoint security β firewall β Maak aan Policy
- Platform: Windows 10 en later, Profile: Microsoft Defender firewall
- DOMAIN PROFILE SETTINGS:
- - Schakel in firewall: Yes (ingeschakeld)
- - Standaard Inbound Action: Block
- - Standaard Outbound Action: Allow
- - Schakel uit notificaties: No (users zou moeten see firewall alerts)
- - loggen Dropped Packets: Yes
- - loggen Success Connections: No (optioneel - voor audit)
- - loggen Max File Size: 16384 KB
- PRIVATE PROFILE SETTINGS (identical):
- - Schakel in firewall: Yes
- - Standaard Inbound Action: Block
- - Standaard Outbound Action: Allow
- - [Same logging settings as Domain]
- PUBLIC PROFILE SETTINGS (STRICTEST):
- - Schakel in firewall: Yes (CRITICAL voor public Wi-Fi)
- - Standaard Inbound Action: Block
- - Standaard Outbound Action: Sta toe (consider Blokkeer voor high-security)
- - Schakel uit Inbound notificaties: Yes (reduce noise op public networks)
- - [Same logging settings]
- Assign to: alle devices
- monitor deployment status
- Identify vereist inbound access: RDP (3389) voor admins only, SMB (445) voor file shares, SQL (1433) voor database servers, aangepaste app ports
- 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)
- Testing: Verifieer business applications werk na firewall enablement
- monitor: firewall logt voor blocked legitimate traffic (tune rules)
- Run as Administrator: Set-NetFirewallProfile -All -ingeschakeld True
- Verify: Get-NetFirewallProfile | Select Name, ingeschakeld (all zou moeten be True)
- Configureer defaults: Set-NetFirewallProfile -All -DefaultInboundAction Blokkeer -DefaultOutboundAction Allow
- Schakel in logging: Set-NetFirewallProfile -All -LogBlocked True -LogMaxSizeKilobytes 16384
Vereisten
Voor het implementeren van Windows firewall op alle profielen zijn de volgende voorwaarden vereist:
- Windows 10, Windows 11, of Windows server 2016 of hoger
- Windows firewall service running (should standaard zijn)
- Microsoft Intune licentie voor centralized policy management
- Endpoint Security Administrator rol in Intune
- PowerShell 5.1+ met NetSecurity module voor local verification
- Application inventory: Welke applications inbound/outbound network access vereisen?
- firewallregel documentation: vereist ports/protocols per business application
- Testing phase: Verifieer business applications compatibility met firewall ingeschakeld
- 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.
- Run script to check: welke devices hebben firewall disabled?, welke profiles zijn disabled?, Total devices non-compliant
- Assess impact: Applications requiring inbound access (document firewallregels needed)
- Plan rules: Maak aan Sta toe rules VOORDAT firewall enablement (Voorkom breakage)
STAP 2: Implementatie via Intune Endpoint Security (AANBEVOLEN):
- Microsoft Intune admin center β Endpoint security β firewall β Maak aan Policy
- Platform: Windows 10 en later, Profile: Microsoft Defender firewall
- DOMAIN PROFILE SETTINGS:
- - Schakel in firewall: Yes (ingeschakeld)
- - Standaard Inbound Action: Block
- - Standaard Outbound Action: Allow
- - Schakel uit notificaties: No (users zou moeten see firewall alerts)
- - loggen Dropped Packets: Yes
- - loggen Success Connections: No (optioneel - voor audit)
- - loggen Max File Size: 16384 KB
- PRIVATE PROFILE SETTINGS (identical):
- - Schakel in firewall: Yes
- - Standaard Inbound Action: Block
- - Standaard Outbound Action: Allow
- - [Same logging settings as Domain]
- PUBLIC PROFILE SETTINGS (STRICTEST):
- - Schakel in firewall: Yes (CRITICAL voor public Wi-Fi)
- - Standaard Inbound Action: Block
- - Standaard Outbound Action: Sta toe (consider Blokkeer voor high-security)
- - Schakel uit Inbound notificaties: Yes (reduce noise op public networks)
- - [Same logging settings]
- Assign to: alle devices
- monitor deployment status
STAP 3: firewallregels voor business applications:
- Identify vereist inbound access: RDP (3389) voor admins only, SMB (445) voor file shares, SQL (1433) voor database servers, aangepaste app ports
- 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)
- Testing: Verifieer business applications werk na firewall enablement
- 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.
- Run as Administrator: Set-NetFirewallProfile -All -ingeschakeld True
- Verify: Get-NetFirewallProfile | Select Name, ingeschakeld (all zou moeten be True)
- Configureer defaults: Set-NetFirewallProfile -All -DefaultInboundAction Blokkeer -DefaultOutboundAction Allow
- 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:
- Intune device compliance: firewall policy deployment status (target 100%)
- PowerShell audit: Get-NetFirewallProfile over endpoints (weekly)
- Windows Event Logs: Event ID 2003 (firewall profile changed), Event ID 2004 (firewall disabled - CRITICAL ALERT)
- firewall logs: %systemroot%\system32\LogFiles\firewall\pfirewall.log
- - Review blocked connections (legitimate traffic? Adjust rules)
- - detecteer attack patterns (port scans, brute force attempts)
- Security monitoring: Alert onmiddellijk indien firewall disabled detected (beveiligingsincident)
- Application issues: Helpdesk tickets gerelateerd aan blocked connections (rule tuning)
- 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):
- IMMEDIATE ACTION: Schakel in firewall via Set-NetFirewallProfile -All -ingeschakeld True
- INVESTIGATE: HOE werd firewall disabled? (Should nooit happen)
- - User action? (Schakel uit 'Turn off Windows firewall' via Security Center)
- - Malware disabling firewall? (common ransomware technique - volledige incidentrespons)
- - Group Policy conflict? (troubleshoot policy precedence)
- - Service stopped? (Windows firewall service is mpssvc)
- Beveiligings beoordeling: Device was UNbeschermde - assume potential compromise
- - volledige antivirus scan: Start-MpScan -ScanType FullScan
- - netwerk isolatie: Disconnect van network tijdens investigation
- - Review authentication logs: Suspicious logins tijdens firewall-off period?
- - Controleer voor lateral movement: andere devices compromised van Deze device?
- FORENSICS: Determine exposure window (how long was firewall off?)
- ESCALATE: Security team / SOC notification (firewall Schakel uit is indicator of compromise)
- ROOT CAUSE FIX: Voorkom future firewall disabling
- - Tamper bescherming: voorkomt beveiligingsinstelling changes
- - Group Policy precedence: Zorg ervoor dat Intune/GPO policy enforces enablement
- - User permissions: Remove local admin rights (can't Schakel uit firewall)
Voor blocked legitimate traffic (false positives):
- Analyze firewall logs: welke traffic is geblokkeerd? Source? Destination? Port?
- Verifieer legitimacy: is geblokkeerd application business-critical? Authorized?
- Maak aan Sta toe rule: Intune firewallregels policy of PowerShell New-NetFirewallRule
- Least privilege: Sta toe alleen vereist ports, alleen van specific source IPs (not 'Any')
- Document rule: Business justification, owner, review date
- DO NOT globally Schakel uit firewall - Maak aan specific rules only
Compliance en Auditing
Windows firewall enablement is MANDATORY voor naleving van:
- CIS Microsoft Windows Benchmark - control 9.1.1, 9.2.1, 9.3.1 (firewall ingeschakeld voor Domain, Private, Public profiles)
- BIO 13.01.03 - Netwerken beveiligen - Perimeter security en network Toegangscontrole en authenticaties
- BIO 11.02.04 - Toegangsbeveiliging - Network-level access restrictions
- ISO 27001:2022 A.13.1.1 - netwerkcontroles - Network Toegangscontrole en authenticatie via firewall
- ISO 27001:2022 A.13.1.3 - Segregation in networks - firewall-based netwerk isolatie
- NIS2 Artikel 21 - Cybersecurity risicobeheer measures - Network perimeter security
- PCI-DSS Requirement 1.1 - firewall configuration standards - firewall ingeschakeld en geconfigureerd
- NIST CSF PR.AC-5 - Network integrity is beschermde (firewall enforcement)
- 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
- CIS M365: Control 9.1.1, 9.2.1, 9.3.1 (L1) - Zorg ervoor dat Windows firewall is ingeschakeld voor Domain, Private, en Public profiles
- BIO: 13.01.03, 11.02.04 - Netwerken beveiligen en toegangsbeveiliging via firewall
- ISO 27001:2022: A.13.1.1, A.13.1.3 - netwerkcontroles en segregation via firewall enforcement
- NIS2: Artikel - Network perimeter security en Toegangscontrole en authenticaties
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).
Risico zonder implementatie
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.
- Implementatietijd: 4 uur
- FTE required: 0.03 FTE