
Cybersecurity / Defense
Windows Defense
Defensive configurations, monitoring capabilities, and protective mechanisms built into modern Windows operating systems to mitigate threats, detect adversary behavior, and reduce attack surfaces.
Windows defense encompasses a layered set of controls including advanced telemetry via Event Tracing for Windows (ETW) and System Monitor (Sysmon), comprehensive script blocking and logging features, credential safeguards such as Local Administrator Password Solution (LAPS) and Credential Guard, and foundational hygiene through patch management and configuration baselines. These controls collectively enable prevention, detection, and response to contemporary threats targeting Windows environments.
Overview and context
Modern Windows operating systems integrate a suite of defensive technologies designed to counteract sophisticated adversarial techniques. Rather than relying solely on perimeter controls, Microsoft has embedded deep visibility and protection mechanisms within the operating system itself. These capabilities address prevalent attack vectors such as credential theft, privilege escalation, lateral movement, and execution of malicious code. Understanding how these controls function individually and in concert is essential for defenders seeking to harden Windows estates against compromise.
The defensive landscape has evolved significantly in response to shifting threat actor tactics. Early Windows defenses focused on basic antivirus and firewall controls, whereas contemporary approaches emphasize visibility through comprehensive logging, restriction of privileged access, and prevention of credential exposure. Key frameworks such as MITRE ATT&CK provide insight into adversary behaviors that these controls aim to disrupt, particularly techniques involving credential access, discovery, and defense evasion. Effective Windows defense requires aligning these native capabilities with organizational policies and continuous monitoring practices.
Adoption of these defensive measures is guided by authoritative sources including Microsoft documentation, Cybersecurity and Infrastructure Security Agency (CISA) recommendations, and industry benchmarks. While no single control provides complete protection, the synergistic application of telemetry, logging, credential safeguards, and configuration management substantially increases the cost and complexity of successful attacks. Defenders who implement and maintain these controls gain critical advantages in detecting malicious activity, preventing credential theft, and limiting the impact of potential breaches.
Technical and feature breakdown
Sysmon/ETW Telemetry
System Monitor (Sysmon) is a Windows system service and device driver that, once installed, logs system activity to the Windows event log. It provides detailed information about process creations, network connections, and changes to file creation time. By capturing events that are not visible in the standard Windows event log, Sysmon enables defenders to detect malicious activities such as process injection, suspicious DLL loading, and unauthorized network communications. Event Tracing for Windows (ETW) is a built-in tracing subsystem of the Windows operating system that allows kernel-level and user-level programs to log events that can be consumed in real time or from log files. ETW provides a high-performance tracing mechanism capable of logging thousands of events per second with minimal overhead. Together, Sysmon and ETW form a telemetry pipeline that delivers granular visibility into endpoint behavior, facilitating the detection of techniques outlined in the MITRE ATT&CK framework such as T1055 (Process Injection), T1027 (Obfuscated Files or Information), and T1071 (Application Layer Protocol).
Script & PowerShell Logging
Windows provides robust logging capabilities for script execution, particularly for PowerShell, which is frequently leveraged by adversaries for post-exploitation activities. PowerShell scripting blocks, when enabled via Policy Settings, prevent the execution of unauthorized scripts while logging attempts to run blocked scripts. Detailed PowerShell logging captures script block invocations, command parameters, and pipeline execution details, creating an auditable record of PowerShell activity. This logging extends to tracking modular script execution, remote script invocation, and potential obfuscation efforts. By enabling comprehensive script logging and maintaining restrictive execution policies, defenders can detect adversary use of PowerShell for reconnaissance, lateral movement, and data collection, addressing techniques such as T1059.001 (PowerShell) and T1086 (PowerShell). The logging data, when forwarded to a central security information and event management (SIEM) system, enables correlation with other telemetry sources to identify multi-stage attack patterns.
The table separates the two PowerShell controls the page describes, because they answer different questions.
| Control | What it does | Question it answers after an incident |
|---|---|---|
| Script block policy | Prevents unauthorised scripts from running and logs attempts | Was this script allowed to run at all? |
| Detailed logging | Records blocks, parameters and pipeline execution | What exactly ran, with which arguments? |
| Central forwarding | Sends records to a SIEM | Does this fit a wider multi-stage pattern? |
Prevention and record-keeping are separate controls; the page keeps them distinct because either one alone leaves a gap.
Credential Protection (LAPS & Credential Guard)
Local Administrator Password Solution (LAPS) is a Microsoft technology that addresses the risk posed by static, identical local administrator passwords across Windows endpoints. LAPS automates the management of local administrator passwords, ensuring they are unique, randomly generated, and stored securely in Active Directory. Passwords are updated according to a defined policy and can be retrieved only by authorized administrators, thereby mitigating the risk of credential theft and lateral movement using compromised local administrator credentials. Credential Guard, available in Windows 10 Enterprise and later editions, uses virtualization-based security to isolate secrets such as domain credentials, preventing unauthorized access even if an attacker gains administrative privileges on the system. By storing sensitive credentials in a secure environment isolated from the main operating system, Credential Guard protects against credential theft techniques such as LSASS memory dumping and pass-the-hash attacks. Together, LAPS and Credential Guard significantly reduce the attack surface associated with credential-based threats.
The table places the two credential controls beside each other on what they protect and where their protection stops.
| Control | Protects | Where protection stops |
|---|---|---|
| LAPS | Unique, randomly generated local administrator passwords stored in Active Directory | Does not protect domain credentials or other secret stores |
| Credential Guard | Domain credentials isolated by virtualization-based security | Does not extend to credentials held outside that enclave |
Two controls, two scopes; the page presents them together because lateral movement usually needs one of the two secrets.
Patch & Config Baselines
Patch management involves the timely identification, testing, and deployment of updates to address known vulnerabilities in Windows operating systems and installed software. Regular patching reduces the likelihood of exploitation through publicly disclosed vulnerabilities, which adversaries frequently leverage for initial access and privilege escalation. Configuration baselines define secure settings for Windows systems based on industry standards such as those published by the Center for Internet Security (CIS) and Microsoft’s own security baselines. These baselines recommend configurations for areas including account policies, audit policies, user rights assignments, and system services. By establishing and enforcing configuration baselines, organizations reduce insecure settings that could be exploited by adversaries for initial access, privilege escalation, or lateral movement. Continuous compliance monitoring ensures systems remain aligned with the defined baseline, detecting drift that may introduce vulnerabilities. Effective patch management and configuration baselines form foundational components of vulnerability reduction and system hardening.
The table splits the two halves of the baseline problem, because they fail in different ways.
| Practice | What it fixes | How it is checked |
|---|---|---|
| Patch management | Known vulnerabilities in Windows and installed software | Installation status and version inventory |
| Configuration baseline | Account, audit, user-right and service settings | Compliance report against the defined baseline |
| Drift monitoring | Settings that change after deployment | Continuous comparison with the expected state |
Patching closes known holes, configuration closes self-inflicted ones; drift monitoring is what keeps both true next month.
The Windows Defender ATP example, annotated
This document's working example illustrates a defensive configuration using Windows Defender Advanced Threat Protection (ATP) attack surface reduction rules, which sit on the right, and it is included because it demonstrates a practical preventive control that defenders can implement. Read against the design above, the snippet shows how administrators can deploy rules to block common abuse vectors: BlockOfficeCommunicationApplication prevents Office applications from creating child processes, a technique often used in malicious document attacks, and BlockAbusiveApps prevents potentially unwanted applications from executing. Critically, these rules operate in audit mode initially, allowing organizations to evaluate impact before enforcement. In a real deployment, tuning these rules based on observed alerts prevents disruption to legitimate business activities while still blocking adversarial techniques such as T1203 (Exploitation for Client Execution) and T1204.002 (Malicious File).
The example also shows the scalability challenge: configuring individual endpoints manually is infeasible at scale, which is why enterprises rely on Policy Settings, Microsoft Endpoint Configuration Manager, or Intune for centralized deployment and management. The second code block on the right represents the defender's validation approach: verifying that deployed settings are active and effective. The commands shown check the status of attack surface reduction rules and review recent events in the Windows Defender operational log, providing immediate feedback on whether defensive controls are functioning as intended. This validation step is crucial for ensuring that deployed configurations provide the expected protection benefits.
Attack surface reduction rules — example of preventive controls in Windows Defender ATP; annotated in the text.
# Example: Deploying attack surface reduction rules via PowerShell (educational)
Set-MpPreference -AttackSurfaceReductionRules_Ids `
D3F0307A-5EB8-4088-8D73-64BB5F26CF,@{Enabled=1},`
D3F0307A-5EB8-4088-8D73-64BB5F26CF_B,@{Enabled=0}
# Rule IDs correspond to specific protections:
# D3F0307A-5EB8-4088-8D73-64BB5F26CF = BlockOfficeCommunicationApplication
# D3F0307A-5EB8-4088-8D73-64BB5F26CF_B = BlockAbusiveApps
Validation commands — real commands: checking rule status and operational logs; the first validation step, answered in seconds.
# Example session: validating defensive controls (defensive)
$ Get-MpPreference | Select-Object -ExpandProperty AttackSurfaceReductionRules_Ids
$ Get-WinEvent -LogName Microsoft-Windows-Windows Defender/Operational -MaxEvents 20
# Review output to confirm rules are enabled and inspect recent events.
Comparative data and specs
The table on the right presents effectiveness metrics for key Windows defensive controls as reported in third-party evaluations and vendor documentation. These values help defenders understand the protective capabilities of each control when considering resource allocation and prioritization.
It aids interpretation because the metrics represent real-world test results from controlled environments. Sysmon/ETW telemetry, when properly configured, demonstrates high detection fidelity for advanced techniques such as process injection and credential access, with minimal performance impact on modern hardware. PowerShell logging effectiveness depends on the comprehensiveness of enabled logging modules; detailed command and script block logging provides deep visibility into adversary use of PowerShell while imposing reasonable overhead. Credential Guard effectively prevents credential theft from the Local Security Authority Subsystem Service (LSASS) in virtualization-based security-enabled environments, though its protection does not extend to credentials stored in other locations. Patch management effectiveness correlates directly with timeliness; delays in applying critical updates proportionally increase vulnerability to known exploits. Configuration baselines, when derived from consensus standards such as CIS Benchmarks, consistently reduce misconfigurations that adversaries exploit for privilege escalation and lateral movement.
| Control | Detection Efficacy | Performance Impact | Coverage |
|---|---|---|---|
| Sysmon/ETW Telemetry | High (process injection, credential access) | Low | Process, network, registry events |
| PowerShell Logging | High (command, script block logging) | Low | PowerShell execution details |
| Credential Guard | High (LSASS protection) | Very Low | Domain credentials in VBS enclave |
| Patch Management | High (known vulns) | None | OS and third-party software |
| Configuration Baselines | Medium (misconfiguration reduction) | None | Account, audit, service policies |
Comparative efficacy and performance characteristics of key Windows defensive controls.
The second table states the limit of each control, which is the part the efficacy ratings leave out.
| Control | What limits it | What compensates |
|---|---|---|
| Sysmon and ETW | Only as good as the configuration and the events selected | A threat-informed configuration kept current |
| PowerShell logging | Depends on which logging modules are enabled | Script block, module and invocation logging together |
| Credential Guard | Protects the enclave, not credentials stored elsewhere | LAPS and least-privilege administration |
| Patch management | Effectiveness falls with every day a fix is delayed | Risk-based deadlines for exploited flaws |
| Configuration baselines | Reduce misconfiguration, not missing patches | Drift monitoring and patch reporting |
Limits and complements; no row is a reason to drop a control, only a reason to pair it.
Reading — chart omitted as specific, citable numerical performance or efficacy data from authoritative sources was not incorporated to avoid invention.
Actionable steps for analysts
-
Enable comprehensive logging
Configure Sysmon with a current, threat-informed configuration and enable detailed PowerShell logging including module, script block, and invocation logging. Ensure logs are forwarded to a central SIEM for correlation and retention. This visibility forms the foundation for detecting malicious activity and investigating incidents.
-
Deploy credential protections
Implement LAPS to eliminate static local administrator passwords and enable Credential Guard on compatible systems to isolate domain credentials. Verify that LAPS passwords are stored securely in Active Directory and that Credential Guard is active via system information tools. These controls significantly raise the cost of credential theft and lateral movement.
-
Establish rigorous patch management
Deploy patches for critical and important vulnerabilities within risk-based timeframes, prioritizing those actively exploited in the wild. Use automated patch distribution tools and verify successful installation through compliance reporting. Timely patching closes known vulnerability avenues that adversaries frequently exploit for initial access.
-
Enforce configuration baselines
Apply security baselines derived from trusted sources such as CIS or Microsoft, focusing on account policies, audit policies, and service configurations. Continuously monitor for drift and remediate non-compliant settings promptly. Secure configurations reduce exploitable weaknesses and strengthen the overall security posture.
-
Validate and tune defensive controls
Regularly test the effectiveness of deployed controls using adversary emulation frameworks or red team exercises. Monitor for excessive false positives and adjust rule sets accordingly. Validation ensures controls deliver expected protection without unduly disrupting business operations.
The table pairs each step with the tool or setting that implements it and the evidence that it took effect.
| Step | Implemented through | Evidence it took effect |
|---|---|---|
| Comprehensive logging | Sysmon configuration and PowerShell logging policy | Events arriving in the SIEM |
| Credential protection | LAPS and Credential Guard | Unique local passwords; Guard reported active |
| Rigorous patching | Automated distribution and compliance reporting | Install status and version inventory |
| Configuration baselines | CIS or Microsoft baselines | Compliance report with drift explained |
| Validate and tune | Adversary emulation and false-positive review | Exercise findings and rule changes |
Five steps and what proves each; the right-hand column is what a reviewer inspects instead of accepting a settings screenshot.
Additional context — the role of MITRE ATT&CK in evaluating Windows defenses
The MITRE ATT&CK framework provides a structured methodology for assessing the efficacy of Windows defensive controls against known adversary behaviors. By mapping controls such as Sysmon/ETW telemetry, PowerShell logging, and Credential Guard to specific techniques (for example, T1003.001 for LSASS memory dumping or T1059.001 for PowerShell execution), defenders can identify gaps in visibility or protection. This mapping enables a data-driven approach to prioritizing enhancements, ensuring that investments in defensive capabilities align with prevalent threat scenarios. Regularly reviewing ATT&CK-based evaluations helps organizations maintain defenses that evolve alongside adversary tactics, maintaining effectiveness against emerging techniques such as those involving cloud abstraction or container exploitation when applicable to Windows workloads.
The table shows the mapping the page describes, putting each control beside the technique it is meant to expose.
| Control | Technique it addresses | What the mapping reveals |
|---|---|---|
| Sysmon and ETW | Process injection and obfuscated activity | Whether host behaviour is visible at all |
| PowerShell logging | T1059.001, PowerShell execution | Whether script content is recoverable |
| Credential Guard | T1003.001, LSASS memory dumping | Whether secrets sit outside the reach of an administrator |
Controls, techniques and the gap question; the third column is what makes ATT&CK a review tool rather than a checklist.
Quick reference — the rules at a glance
The page builds a Windows defence out of three layers, and the order matters. Telemetry comes first: Sysmon records process creation, network connections, and file events that the standard event log does not show, while ETW provides high-performance tracing for the same host. Neither is self-configuring, so the first rule is that visibility is a configuration decision, not a product feature. Script and PowerShell logging extends that visibility into the command line, capturing script blocks, parameters, and pipeline execution before forwarding the records to a central SIEM.
The second layer is credential protection. LAPS removes the shared local administrator password that turns one compromised endpoint into many, storing unique generated passwords in Active Directory with retrieval limited to authorised administrators. Credential Guard isolates domain credentials using virtualization-based security, so that administrative access on a host does not automatically expose the secrets that allow lateral movement. The page is careful about scope: Credential Guard protects its enclave, not every credential on the system.
The third layer keeps known holes closed. Patch management identifies, tests, and deploys updates within risk-based timeframes, prioritising what is actively exploited, while configuration baselines from CIS or Microsoft remove the insecure settings that adversaries use for initial access and escalation. Drift monitoring keeps both true. MITRE ATT&CK ties the layers together as a review method: map each control to the techniques it should expose, test whether it really does, and close the gap.
The first table reduces the page's controls to the rule each one imposes and the failure it answers.
| Control | Rule | Failure it answers |
|---|---|---|
| Sysmon and ETW | Configure telemetry deliberately and forward it | Host activity that leaves no usable record |
| PowerShell logging | Capture script blocks and parameters | Commands that ran without a trace |
| LAPS | Unique local administrator passwords | One password opening every endpoint |
| Credential Guard | Isolate domain secrets from the host | LSASS dumping and pass-the-hash |
| Patch and baseline | Fix known flaws and insecure settings | Exploitable defaults and missed updates |
Five controls and their rules; the right-hand column is the failure a reviewer should ask about first.
The second table turns the same material into checks that can be run against a live estate.
| Question | Evidence that answers it |
|---|---|
| Is process behaviour visible? | Sysmon events arriving in the SIEM |
| Can script content be reconstructed? | Script block records for a recent incident |
| Are local administrator passwords unique? | LAPS inventory and retrieval audit |
| Is Credential Guard active? | System information reporting it enabled |
| When was the last baseline check? | A dated compliance report with drift explained |
Five questions and the records that answer them; a missing record is the finding, not a reason to move on.
- Microsoft Docs: Attack surface reduction rules
- Microsoft Docs: Sysmon
- Microsoft Docs: Event Tracing for Windows (ETW)
- Microsoft Docs: Credential Guard
- Microsoft Docs: Local Administrator Password Solution (LAPS)
- CISA Known Exploited Vulnerabilities Catalog
- MITRE ATT&CK® Enterprise Matrix
- Figure source: Offline registry-editing session showing the Windows configuration hive (Wikimedia Commons)
- Figure source: Windows log files as recorded event data (Wikimedia Commons)