Key Takeaways
- Keep Windows updated—patches are critical.
- Windows Defender is now a capable security solution.
- Limit local admin rights to reduce attack surface.
- Enable BitLocker for full-disk encryption.
- PowerShell security settings matter.
- Active Directory security is enterprise-critical.
Table of Contents
1. Windows Security Overview
Windows is the most targeted operating system due to its market dominance. However, modern Windows (10/11, Server 2019+) includes robust security features when properly configured. The challenge is knowing which features to enable and how to configure them effectively.
Windows security spans multiple layers: built-in security features, proper configuration, patch management, endpoint protection, and monitoring. Enterprise environments add Active Directory security and Group Policy management.
2. Windows Defender
2.1 Windows Security Features
| Feature | Function |
|---|---|
| Defender Antivirus | Real-time malware protection |
| Firewall | Inbound/outbound traffic control |
| SmartScreen | Blocks unknown executables |
| Credential Guard | Protects credentials with virtualization |
| Device Guard | Application whitelisting |
| Attack Surface Reduction | Blocks common attack techniques |
2.2 PowerShell Configuration
# Enable Attack Surface Reduction rules
Set-MpPreference -AttackSurfaceReductionRules_Ids `
BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550 `
-AttackSurfaceReductionRules_Actions Enabled
# Enable Controlled Folder Access (ransomware protection)
Set-MpPreference -EnableControlledFolderAccess Enabled
# Enable network protection
Set-MpPreference -EnableNetworkProtection Enabled
3. System Hardening
3.1 Essential Configuration
- Enable BitLocker: Full-disk encryption
- Enable Secure Boot: Prevents bootkit malware
- Disable SMBv1: Legacy protocol with vulnerabilities
- Enable Windows Firewall: On all profiles
- Configure UAC: Keep at default or higher
3.2 PowerShell Hardening Commands
# Disable SMBv1
Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol
# Verify BitLocker status
Get-BitLockerVolume
# Enable BitLocker on C: drive
Enable-BitLocker -MountPoint "C:" -RecoveryPasswordProtector
# Configure Windows Firewall
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True -DefaultInboundAction Block
4. Account Security
4.1 Local Admin Management
- Rename or disable built-in Administrator account
- Use unique local admin passwords per machine (LAPS)
- Remove users from local Administrators group by default
- Implement tiered admin model for enterprises
4.2 LAPS (Local Administrator Password Solution)
# Check LAPS password (requires AD permissions)
Get-ADComputer COMPUTERNAME -Properties ms-Mcs-AdmPwd |
Select-Object Name, @{Name="Password";Expression={$_.'ms-Mcs-AdmPwd'}}
Credential Theft
Attackers target cached credentials in memory. Credential Guard protects against Mimikatz-style attacks. In enterprises, implement tiered administration to prevent domain admin credentials from being exposed on workstations.
5. PowerShell Security
5.1 Execution Policy
# Check current execution policy
Get-ExecutionPolicy -List
# Recommended: Signed scripts only
Set-ExecutionPolicy AllSigned
# Enable PowerShell logging
# (Configure via Group Policy for enterprises)
5.2 Constrained Language Mode
Constrained Language Mode restricts PowerShell capabilities, blocking .NET and COM access often used by attackers.
# Check language mode
$ExecutionContext.SessionState.LanguageMode
# Should be "ConstrainedLanguage" on locked-down systems
6. Active Directory Security
6.1 Critical AD Protections
- Protected Users group: Enhanced credential protections
- Tiered administration: Separate admin accounts by tier
- PAWs: Privileged Access Workstations for admins
- LAPS: Unique local admin passwords
- Disable LLMNR/NBT-NS: Prevent MITM attacks
6.2 Common AD Attack Mitigations
| Attack | Mitigation |
|---|---|
| Kerberoasting | Strong service account passwords, gMSAs |
| Pass-the-Hash | Credential Guard, tiered admin |
| DCSync | Monitor/restrict replication privileges |
| Golden Ticket | Reset KRBTGT regularly, monitor usage |
7. Logging & Monitoring
7.1 Essential Windows Logs
# Critical event logs to monitor:
- Security: 4624, 4625 (logon success/failure)
- Security: 4672 (special privileges assigned)
- Security: 4688 (process creation)
- Security: 4697 (service installed)
- PowerShell: 4103, 4104 (script block logging)
- Sysmon: Enhanced monitoring capabilities
7.2 Enable Advanced Logging
# Enable command line in process creation events
# (Group Policy → Advanced Audit Policy → Audit Process Creation)
# Enable PowerShell script block logging
# (Group Policy → Administrative Templates → PowerShell)
Sysmon Recommendation
Deploy Sysmon for enhanced endpoint visibility. It logs process creation, network connections, file changes, and more. Combined with a SIEM, Sysmon provides detection capabilities far beyond native Windows logging.
8. Frequently Asked Questions
Conclusion
Windows security requires layered defenses: keep systems patched, enable built-in protections like Defender and BitLocker, properly manage accounts (especially admin rights), secure PowerShell, and implement comprehensive logging. For enterprises, Active Directory security is critical—compromised AD means compromised everything.
Continue Learning:
Linux Security
Endpoint Security