Windows 11 DISA STIG Automation & Remediation

Project Overview

This project demonstrates the automated hardening of a Windows 11 Virtual Machine to meet the rigorous security standards of the Defense Information Systems Agency (DISA) Security Technical Implementation Guides (STIGs).

Using Tenable Nessus for vulnerability scanning and PowerShell for remediation, I identified critical configuration vulnerabilities and developed scripts to automatically correct them, significantly reducing the system's attack surface.

What are DISA STIGs?

DISA STIGs are the "gold standard" for secure configuration. They are a set of technical cybersecurity requirements for specific software and hardware, developed by the Department of Defense (DoD). Compliance with STIGs is mandatory for any system connecting to DoD networks.

Why this matters:


Table of Contents


️ The Remediation Scripts

Below is the repository of PowerShell scripts developed to resolve specific findings from the initial vulnerability scan.

1. The System event log size must be configured to 32768 KB or greater.

STIG ID: WN11-AU-000510

PowerShell: Remediate STIG WN11-AU-000510 (System Log Size)

2. The Security event log size must be configured to 1024000 KB or greater.

STIG ID: WN11-AU-000505

PowerShell: Remediate STIG WN11-AU-000505 (Security Log Size)

3. The Application event log size must be configured to 32768 KB or greater.

STIG ID: WN11-AU-000500

PowerShell: Remediate STIG WN11-AU-000500 (Application Log Size)

4. The Windows Installer feature "Always install with elevated privileges" must be disabled.

STIG ID: WN11-CC-000315

PowerShell: Remediate STIG WN11-CC-000315 (Always Install Elevated)

5. Users must be prevented from changing installation options.

STIG ID: WN11-CC-000310

PowerShell: Remediate STIG WN11-CC-000310 (User Control Over Installs)

6. The Windows Remote Management (WinRM) client must not use Basic authentication.

STIG ID: WN11-CC-000330

PowerShell: Remediate STIG WN11-CC-000330 (WinRM Client Basic Auth)

7. The Windows Remote Management (WinRM) service must not use Basic authentication.

STIG ID: WN11-CC-000345

PowerShell: Remediate STIG WN11-CC-000345 (WinRM Service Basic Auth)

8. PowerShell script block logging must be enabled on Windows 11

STIG ID: WN11-CC-000326

PowerShell: Remediate STIG WN11-CC-000326 (Script Block Logging)

9. PowerShell Transcription must be enabled on Windows 11

STIG ID: WN11-CC-000327

PowerShell: Remediate STIG WN11-CC-000327 (PowerShell Transcription)

10. Solicited Remote Assistance must not be allowed

STIG ID: WN11-CC-000155

PowerShell: Remediate STIG WN11-CC-000155 (Solicited Remote Assistance)

11. Run as different user must be removed from context menus

STIG ID: WN11-CC-000039

PowerShell: Remediate STIG WN11-CC-000039 (Remove Run as Different User)

Verification & Results

To verify the effectiveness of the remediation scripts, a Tenable Nessus vulnerability scan was conducted before and after the script execution.

Phase 1: Initial Discovery

The initial scan revealed multiple high and medium severity vulnerabilities corresponding to the STIG checks listed above. Below is one example of a vulnerability which was remediated and passed on the final scan.

Initial vulnerability scan results showing failed compliance checks.

Figure 1: Initial vulnerability scan results showing failed compliance checks.

Phase 2: Post-Remediation

After executing the PowerShell automation suite, a follow-up scan confirmed that all targeted vulnerabilities were successfully remediated. The system is now compliant with the specified DISA STIG controls.

Final vulnerability scan results showing successful remediation.

Figure 2: Final vulnerability scan results showing successful remediation (Green/Passed).


Conclusion

This project highlights the critical role of automated policy enforcement in cybersecurity. By scripting the remediation of DISA STIG findings, I reduced the time required to secure the endpoint from hours of manual registry editing to seconds of script execution, ensuring a repeatable and auditable security baseline.