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.

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

FeatureFunction
Defender AntivirusReal-time malware protection
FirewallInbound/outbound traffic control
SmartScreenBlocks unknown executables
Credential GuardProtects credentials with virtualization
Device GuardApplication whitelisting
Attack Surface ReductionBlocks 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

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

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.1 Critical AD Protections

6.2 Common AD Attack Mitigations

AttackMitigation
KerberoastingStrong service account passwords, gMSAs
Pass-the-HashCredential Guard, tiered admin
DCSyncMonitor/restrict replication privileges
Golden TicketReset 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

Do I need third-party antivirus?
For most users, Windows Defender is sufficient. It performs well in independent tests. Enterprises may benefit from EDR solutions for advanced detection and response. Third-party AV is no longer required for basic protection.
How do I check if my Windows is properly hardened?
Use Microsoft Baseline Security Analyzer or CIS-CAT to compare against CIS benchmarks. Windows Security app shows status of key protections. Enterprise tools like Microsoft Defender for Endpoint provide security posture assessment.

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