Skip to content

Sandler73/Windows-Security-Audit-Project

Windows Security Audit Project


Windows Security Audit Project

Lint Unit Tests Integration Tests Full Matrix

Latest Release License: MIT Last Commit Open Issues Stars

Security: Audited PowerShell 5.1+ | 7.x Maintained: Yes

Platform: Windows Shell: PowerShell Code Style: PSScriptAnalyzer PRs Welcome

Lines of Code: 42,630 Dependencies: 0 Wiki: 17 Pages Checks Frameworks

Windows 11 Windows 10 Server 2025 Server 2022 Server 2019 Server 2016

Module-Based Multi-Framework Windows Security Assessment, Auditing, and Remediation Tool

Overview β€’ Key Features β€’ Quick Start β€’ Documentation β€’ Remediation Capabilities β€’ Contributing


πŸ–₯️ Supported Operating Systems

OS Versions Status PowerShell Notes
Windows 11 21H2, 22H2, 23H2, 24H2 βœ… Tested 5.1, 7.x Primary client target
Windows 10 21H2, 22H2, IoT LTSC 2021 βœ… Tested 5.1, 7.x Legacy client support
Windows Server 2025 24H2 βœ… Tested 5.1, 7.x Latest server release
Windows Server 2022 21H2 βœ… Tested 5.1, 7.x Primary server target
Windows Server 2019 1809 βœ… Tested 5.1, 7.x Long-term server support
Windows Server 2016 1607 βœ… Tested 5.1, 7.x Minimum server target
Server Core variants All above βœ… Compatible 5.1, 7.x All checks work headless
Windows < 21H2 / Server < 2016 β€” ❌ Not supported β€” See deferred work

Requirements: Administrator privileges Β· 100 MB free disk space Β· No internet access required


πŸ“‹ Overview

The Windows Security Audit Project is an advanced PowerShell-based security compliance auditing tool that evaluates Windows systems against multiple industry-standard security frameworks. The current release performs 3,994 automated security checks across 16 compliance modules, generating comprehensive reports in HTML, JSON, CSV, and XML with actionable remediation guidance.

Every check includes a severity rating (Critical/High/Medium/Low/Informational) and cross-references to equivalent controls across other frameworks, enabling multi-framework compliance scoring from a single audit run. The tool is fully self-contained β€” zero external dependencies, pure PowerShell stdlib β€” and supports parallel execution, baseline drift comparison, rollback script generation, Group Policy export, and predefined remediation bundles.

Whether you're conducting compliance audits, hardening systems, maintaining security baselines, or feeding SIEM/SOAR pipelines, this tool provides the depth and automation you need.

🎯 Key Features

πŸ” Comprehensive Security Assessment

  • βœ… 3,994 Security Checks across 16 compliance frameworks
  • βœ… Multi-Framework Coverage β€” ACSC Essential Eight, CIS Controls v8, CISA Best Practices/KEV, CMMC 2.0, Core Windows Baseline, ENISA/NIS2, GDPR, HIPAA, ISO 27001:2022, Microsoft Security Baseline, Microsoft Defender for Endpoint, NIST SP 800-53 R5/CSF 2.0/800-171/800-207, NSA Cybersecurity, PCI DSS v4.0.1, SOC 2 Type II, DISA STIG
  • βœ… Modular Architecture β€” run all frameworks or select specific modules
  • βœ… Severity Classification β€” every check rated Critical/High/Medium/Low/Informational
  • βœ… Cross-Framework Correlation β€” every check carries CrossReferences mapping to equivalent controls in other frameworks
  • βœ… Standalone Module Execution β€” any module can run independently without the orchestrator
  • βœ… Result Validation β€” automated 9-field result-object normalization
  • βœ… No External Dependencies β€” pure PowerShell stdlib; zero pip/npm/nuget/external network calls

πŸ“Š Advanced Reporting

  • βœ… Interactive HTML Reports with:
    • πŸŒ“ Dark/Light theme toggle
    • πŸ” Advanced filtering and sorting per column
    • πŸ“€ Export All / Export Selected modal (CSV, Excel, JSON, XML Workbook, SIEM XML, TXT)
    • β˜‘οΈ Checkbox-based selective export
    • πŸ“‘ Per-module and global export options
    • πŸ“Š Executive dashboard with statistics
  • βœ… SIEM-Compatible XML output for security monitoring platforms
  • βœ… Multiple Output Formats - HTML, JSON, CSV, XML, Console, plus 6 browser-based exports
  • βœ… 9-Field Result Objects β€” Module, Category, Status, Severity, Message, Details, Remediation, CrossReferences, Timestamp
  • βœ… Structured Data β€” API and automation-friendly formats

πŸ”§ Intelligent Remediation

  • βœ… Interactive Remediation - Review and apply fixes individually
  • βœ… Automated Remediation - Batch fix with safety confirmations
  • βœ… Selective Remediation - Target specific status types (Fail, Warning, Info)
  • βœ… Targeted Remediation - Fix only selected issues from JSON export
  • βœ… Remediation Logging - Comprehensive audit trail of all changes
  • βœ… Safety Mechanisms - Double-confirmation and countdown timers
  • βœ… Rollback Support - Detailed logs for reverting changes

πŸ“ˆ Quality Assurance

  • βœ… Result Validation - Ensures data integrity across all modules
  • βœ… Status Normalization - Consistent categorization (Pass/Fail/Warning/Info/Error)
  • βœ… Module Statistics - Real-time tracking and reporting
  • βœ… Execution Metadata - Complete audit trail preservation
  • βœ… Error Handling - Graceful degradation on check failures

πŸ†• What's New in 6.1.x

  • βœ… Risk Priority Scoring β€” 1-100 score combining severity, exploitability, exposure, asset criticality (-ShowRiskPriority)
  • βœ… Cross-Framework Correlations β€” group findings that test the same underlying control across modules (-ShowCorrelations)
  • βœ… Compensating Control Detection β€” flag failed checks where a passing related control mitigates risk (-ShowCompensatingControls)
  • βœ… Baseline Drift Comparison β€” diff against previous audit JSON for new failures, resolved findings, regressions (-Baseline)
  • βœ… Rollback Script Generation β€” auto-generate inverse-script from applied remediations (-RollbackPath)
  • βœ… Group Policy Export β€” generate .pol file from registry-modifying remediations (-ExportGPO)
  • βœ… Remediation Bundles β€” DisableLegacyProtocols, HardenAuthentication, EnableAuditLogging, LockDownRDP, EssentialEightLevel1 (-RemediationBundle)
  • βœ… Comprehensive Help β€” robust 10-section in-script help via -Help/-H/-?/help/-help/--help/--h
  • βœ… Auto-Logging β€” log file auto-generated at <ScriptRoot>\logs\audit-yyyyMMdd-HHmmss.log when -LogFile omitted; color-coded console output by default
  • βœ… +795 New Checks β€” every module expanded; total now 3,994 across 16 modules

See CHANGELOG.md for the complete release history.

🏒 Supported Frameworks

Module Framework Checks Focus Areas
acsc Australian Cyber Security Centre Essential Eight + Maturity Levels 170 Application control, patching, macros, hardening, admin privs, MFA, backups + ISM, PSPF, ACSI 33, APP
cis CIS Controls v8 + IG2/IG3 + Cloud/Mobile/ICS-OT Companion Guides 260 Industry best practices, asset inventory, workload-specific (IIS/Exchange/SQL) detection
cisa CISA Best Practices, KEV catalog, Zero Trust Maturity Model 289 KEV (CVE-2017-0144, CVE-2021-34527, CVE-2023-24932, CVE-2020-1472), BOD 23-02, Secure by Design, ZTMM 5 pillars, CPGs v1.0.1, Bad Practices, PRNI
cmmc CMMC 2.0 L1/L2/L3 + NIST SP 800-172 + DFARS 252.204-7012 145 Access control, audit, config mgmt, IA, media, comms, integrity, SPRS scoring, CDI/CUI
core Foundational Windows Security Baseline + Win11 modern features 243 TPM 2.0, VBS+HVCI, Kernel DMA, USB policy, Print Spooler, Sandbox, Pluton, System Guard, kCET, MOTW
enisa ENISA Cybersecurity + NIS2 Directive + Cyber Resilience Act + DORA 248 NIS2 Art. 21, CRA, Threat Landscape, RICT, IoC, EUCC, AI Threat Landscape
gdpr GDPR Articles 5/15-21/28/32/35 + ePrivacy + Schrems II 183 Privacy by design, encryption, CIA + resilience, DPIA, pseudonymisation
hipaa HIPAA Security Rule + NIST SP 800-66 R2 + HITECH + 405(d) HICP 237 Sec.164.312 access/audit/integrity/transmission, HHS Recognized Security Practices, Breach Notification, Cures Act, ONC
iso27001 ISO 27001:2022 + 27002:2022 + 27017/27018 (Cloud) + 27701 (Privacy) 286 Annex A controls, automated SoA, ISO 27005 risk + 27031 ICT continuity
ms Microsoft Security Baseline (Win11 24H2/Server 2025) + Edge + M365 Apps 367 SCT/LGPO, Defender, AppLocker, ASR, Edge baseline, M365 Office macros, Smart App Control, update channels
ms-defenderatp Microsoft Defender for Endpoint (ATP/EDR) 155 Component currency, Network Protection, CFA, EPP, WDAC, MDI, per-rule ASR (15 GUIDs), Live Response, Cloud Apps, IOCs
nist NIST SP 800-53 R5 + CSF 2.0 + 800-171 R3 + 800-207 ZTA + 800-161 SCRM + FedRAMP R5 520 Federal compliance, 8 control families (AC/AU/CM/IA/IR/MP/SC/SI) + 12 framework extensions
nsa NSA Cybersecurity (CSI + AD hardening + Top 10 Mitigations) 225 Credential isolation, AppWhitelisting, HVCI, AD DC/member hardening, BlackLotus mitigation, CSfC, IPv6
pcidss PCI DSS v4.0/v4.0.1 + PIN Security + 3DS Core + SSF 279 Customized Approach, SAQ detection, CHD discovery, network segmentation, SAD prohibition, Req 9 physical
soc2 SOC 2 Trust Service Criteria + AICPA TSP Section 100 PoF 162 Common Criteria + Processing Integrity + Privacy criteria, Type II evidence collection
stig DISA STIGs + SRG cross-mapping + Microsoft Defender STIG 225 V-finding format, STIG Viewer compatibility, BlackLotus mitigation, CAT I/II/III distribution + POA&M flagging

Total Coverage: 3,994 security checks with severity classification and cross-framework correlation. Coverage spans access control, authentication, auditing/logging, network security, data protection at-rest and in-transit, malware defense, system hardening, EDR, Zero Trust architecture, privacy compliance, payment card security, healthcare data protection, supply chain risk management, and cloud-extension controls.

πŸš€ Quick Start

Prerequisites

  • Operating System: Windows 10/11 or Windows Server 2016/2019/2022/2025
  • PowerShell: Version 5.1 or later (included in modern Windows)
  • Privileges: Administrator rights required for complete results
  • Privileges for Remediation: Administrator rights mandatory for applying fixes

Installation

  1. Clone the repository:
   git clone https://github.com/Sandler73/Windows-Security-Audit-Project.git
   cd Windows-Security-Audit-Project
  1. Set execution policy (if needed):
   Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
  1. Verify prerequisites:
   # Check PowerShell version
   $PSVersionTable.PSVersion

   # Check if running as Administrator
   ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)

Basic Usage

Run full audit with default HTML report:

.\Windows-Security-Audit.ps1

Run specific frameworks:

.\Windows-Security-Audit.ps1 -Modules Core,NIST,CISA

Run with Defender ATP assessment:

.\Windows-Security-Audit.ps1 -Modules Core,MS,MS-DefenderATP

Generate CSV output:

.\Windows-Security-Audit.ps1 -OutputFormat CSV

SIEM integration with XML:

.\Windows-Security-Audit.ps1 -OutputFormat XML -OutputPath "\\SIEM\imports\audit.xml"

Run a single module standalone (no orchestrator needed):

.\modules\module-cis.ps1

πŸ”§ Remediation Capabilities

Version 5.3 introduces comprehensive remediation features with multiple workflows to suit different needs and risk tolerances.

Remediation Modes

1. Interactive Remediation (Safest)

Review and approve each fix individually:

.\Windows-Security-Audit.ps1 -RemediateIssues
  • Prompts for each remediation
  • Full visibility into changes
  • Skip option (Y/N/S)
  • Recommended for production systems

2. Status-Based Remediation

Target specific severity levels:

# Fix only critical failures
.\Windows-Security-Audit.ps1 -RemediateIssues_Fail

# Fix warnings interactively
.\Windows-Security-Audit.ps1 -RemediateIssues_Warning

# Address informational items
.\Windows-Security-Audit.ps1 -RemediateIssues_Info

# Fix everything (all status types)
.\Windows-Security-Audit.ps1 -RemediateIssues

3. Automated Remediation (Advanced)

Batch remediation with safety confirmations:

.\Windows-Security-Audit.ps1 -RemediateIssues_Fail -AutoRemediate

Safety Features:

  • Displays all changes before execution
  • Requires typing "YES" to confirm
  • Secondary confirmation with 10-second timeout
  • Requires typing "CONFIRM" to proceed
  • Comprehensive remediation logging

4. Targeted Remediation (Precision)

Fix only specific issues selected from HTML report:

Workflow:

# Step 1: Run audit and review findings
.\Windows-Security-Audit.ps1

# Step 2: In HTML report, select specific issues and click "Export Selected"
# This generates a JSON file (e.g., Selected-Report.json)

# Step 3: Run targeted auto-remediation
.\Windows-Security-Audit.ps1 -AutoRemediate -RemediationFile "Selected-Report.json"

Benefits:

  • Surgical precision - fix only what you select
  • Review in detail before committing
  • Perfect for change control processes
  • Ideal for compliance-driven remediation

Remediation Logging

All remediation actions are logged with full details:

Remediation-Log-YYYYMMDD-HHMMSS.json

Log includes:

  • Timestamp for each action
  • Module and category
  • Issue description
  • Remediation command executed
  • Success/failure status
  • Error messages (if failed)

Example Remediation Output

========================================================================================================
                                  REMEDIATION MODE
========================================================================================================

[*] Mode: Remediate FAIL issues only
[*] Found 42 issue(s) with remediation available

[*] Issue: SMBv1 protocol is ENABLED
    Module: STIG | Status: Fail | Category: STIG - V-220968 (CAT II)
    Remediation: Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol -NoRestart
    Apply remediation? (Y/N/S=Skip remaining): Y
    [+] Remediation applied successfully

[*] Issue: Guest account is ENABLED
    Module: Core | Status: Fail | Category: Core - Accounts
    Remediation: Disable-LocalUser -Name Guest
    Apply remediation? (Y/N/S=Skip remaining): Y
    [+] Remediation applied successfully

========================================================================================================
Remediation Summary:
  Total issues found: 42
  Successfully remediated: 38
  Failed remediations: 2
  Skipped: 2
  Success rate: 90.5%
========================================================================================================

[*] Remediation log saved to: Remediation-Log-20250101-120000.json
[*] Some settings may require a system restart to take effect.
Would you like to restart now? (Y/N):

πŸ“Š Output Formats & Reports

1. HTML Report (Interactive) - Default

Features:

  • 🎨 Theme Toggle - Switch between light and dark modes
  • πŸ“Š Executive Dashboard - Summary statistics and compliance overview
  • πŸ” Advanced Filtering - Filter by status, category, or keyword per column
  • ↕️ Dynamic Sorting - Click column headers to sort
  • πŸ“€ Export Options:
    • Export All - Complete report in multiple formats
    • Export Selected - Choose specific issues via checkboxes
    • Per-Module Export - Export individual framework results
    • Format Options - CSV, Excel, JSON, XML, TXT
  • πŸ“‘ Collapsible Modules - Expand/collapse each framework section
  • πŸ”§ Remediation Guidance - Detailed fix instructions for each finding
  • πŸ“± Responsive Design - Works on desktop and tablet displays

Export Workflow:

  1. Review findings in HTML report
  2. Use checkboxes to select specific issues
  3. Click "Export Selected" β†’ Choose format (JSON for remediation)
  4. Use exported JSON with -RemediationFile parameter

2. XML Report (SIEM Integration)

Standardized format for security monitoring platforms:

<?xml version="1.0" encoding="UTF-8"?>
<security_audit>
  <metadata>
    <export_date>2025-01-01T12:00:00Z</export_date>
    <computer_name>HOSTNAME</computer_name>
    <total_checks>3994</total_checks>
    <pass_count>456</pass_count>
    <fail_count>42</fail_count>
  </metadata>
  <events>
    <event>
      <timestamp>2025-01-01T12:00:00Z</timestamp>
      <module>STIG</module>
      <status>Fail</status>
      <category>V-220968</category>
      <message>SMBv1 protocol is ENABLED</message>
      <remediation>Disable-WindowsOptionalFeature...</remediation>
    </event>
  </events>
</security_audit>

Use Cases:

  • Splunk, QRadar, ArcSight integration
  • Automated compliance monitoring
  • Trend analysis and alerting
  • Centralized security dashboards

3. JSON Report (Automation)

{
  "ExecutionInfo": {
    "ComputerName": "HOSTNAME",
    "OSVersion": "Windows 11 Pro",
    "ScanDate": "2025-01-01 12:00:00",
    "Duration": "00:02:34",
    "TotalChecks": 3994,
    "PassCount": 456,
    "FailCount": 42
  },
  "Results": [
    {
      "Module": "STIG",
      "Category": "STIG - TLS/SSL",
      "Status": "Fail",
      "Severity": "High",
      "Message": "V-220968: SMBv1 protocol is ENABLED",
      "Details": "CAT II: Disable SMBv1 immediately β€” lateral movement vector",
      "Remediation": "Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol -NoRestart",
      "CrossReferences": { "STIG": "V-220968", "NIST": "SC-8", "CIS": "18.3.3" },
      "Timestamp": "2025-03-03 12:00:00"
    }
  ]
}

4. CSV Report (Spreadsheet Analysis)

Excel-compatible format for:

  • Pivot tables and dashboards
  • Remediation tracking
  • Progress monitoring
  • Management reporting

5. Console Output (Real-Time)

========================================================================
                    Windows Security Audit Project v6.1.2
                Comprehensive Multi-Framework Security Assessment
========================================================================

[*] Modules to execute: Core, CIS, MS, MS-DefenderATP, NIST, STIG, NSA, CISA

[Core] Starting core security baseline checks...
[+] Module Core completed: 176 checks (152 pass, 12 fail, 12 warning)

[STIG] Checking DISA STIG compliance...
[+] Module STIG completed: 184 checks (148 pass, 22 fail, 14 warning)

========================================================================
                            AUDIT SUMMARY
========================================================================
Total Checks:    3994
Passed:          1542 (83.1%)
Failed:          156 (8.4%)
Warnings:        118 (6.4%)
Info:            28 (1.5%)
Errors:          0 (0.0%)
Duration:        00:02:34
========================================================================

[+] HTML report saved to: Security-Audit-Report-20250101-120000.html
[*] Opening report in browser...
[+] Audit completed successfully!

πŸ“– Documentation

Comprehensive documentation is available in the Project Wiki:

Getting Started

Reference Documentation

Advanced Topics

πŸ› οΈ Command-Line Parameters

.\Windows-Security-Audit.ps1 
    [-Modules <String[]>]              # Frameworks to run (default: All β€” includes MS-DefenderATP)
    [-OutputFormat <String>]           # Output format: HTML, CSV, JSON, XML, Console
    [-OutputPath <String>]             # Custom output path
    [-RemediateIssues]                 # Interactive remediation (all statuses)
    [-RemediateIssues_Fail]            # Remediate FAIL status only
    [-RemediateIssues_Warning]         # Remediate WARNING status only
    [-RemediateIssues_Info]            # Remediate INFO status only
    [-AutoRemediate]                   # Automated remediation with confirmations
    [-RemediationFile <String>]        # JSON file with selected issues to remediate

Parameter Examples

Framework Selection:

# Run all frameworks (default)
.\Windows-Security-Audit.ps1

# Run specific frameworks
.\Windows-Security-Audit.ps1 -Modules Core,NIST,CISA

# Run single framework
.\Windows-Security-Audit.ps1 -Modules STIG

Output Control:

# Generate HTML report (default)
.\Windows-Security-Audit.ps1 -OutputFormat HTML

# Generate CSV for Excel analysis
.\Windows-Security-Audit.ps1 -OutputFormat CSV

# Generate XML for SIEM
.\Windows-Security-Audit.ps1 -OutputFormat XML

# Console output only
.\Windows-Security-Audit.ps1 -OutputFormat Console

# Custom output location
.\Windows-Security-Audit.ps1 -OutputPath "C:\SecurityAudits\Report.html"

Remediation Workflows:

# Interactive remediation (review each)
.\Windows-Security-Audit.ps1 -RemediateIssues

# Auto-fix critical failures only
.\Windows-Security-Audit.ps1 -RemediateIssues_Fail -AutoRemediate

# Interactive fix warnings
.\Windows-Security-Audit.ps1 -RemediateIssues_Warning

# Targeted remediation from JSON
.\Windows-Security-Audit.ps1 -AutoRemediate -RemediationFile "Selected-Report.json"

🎯 Use Cases

1. Compliance Auditing

Scenario: Annual SOC 2, FISMA, or CMMC compliance audit

# Generate comprehensive compliance report
.\Windows-Security-Audit.ps1 -Modules NIST,STIG,CIS -OutputFormat HTML

# Export findings to CSV for compliance tracking
# Use HTML report's "Export All" β†’ CSV feature

2. System Hardening

Scenario: Harden new Windows servers before production deployment

# Step 1: Baseline audit
.\Windows-Security-Audit.ps1 -Modules Core,CIS,MS

# Step 2: Review and auto-fix critical issues
.\Windows-Security-Audit.ps1 -RemediateIssues_Fail -AutoRemediate

# Step 3: Verify remediation
.\Windows-Security-Audit.ps1 -Modules Core,CIS,MS

3. Configuration Drift Detection

Scenario: Monthly security posture checks

# Generate baseline
.\Windows-Security-Audit.ps1 -OutputPath "C:\Baselines\2025-01-baseline.html"

# Compare later
.\Windows-Security-Audit.ps1 -OutputPath "C:\Baselines\2025-02-check.html"

# Use CSV exports to track changes in Excel

4. Incident Response

Scenario: Validate system security after suspected compromise

# Quick security validation (core checks)
.\Windows-Security-Audit.ps1 -Modules Core -OutputFormat JSON

# Comprehensive validation (all frameworks)
.\Windows-Security-Audit.ps1 -OutputFormat HTML

5. SIEM Integration

Scenario: Automated compliance monitoring pipeline

# Scheduled task to generate XML for SIEM
.\Windows-Security-Audit.ps1 -OutputFormat XML -OutputPath "\\SIEM\drops\%COMPUTERNAME%-audit.xml"

6. Change Control Validation

Scenario: Pre/post-change security validation

# Pre-change baseline
.\Windows-Security-Audit.ps1 -OutputPath "Pre-Change-Audit.json"

# Post-change validation
.\Windows-Security-Audit.ps1 -OutputPath "Post-Change-Audit.json"

# Compare JSON files programmatically

πŸ—‚οΈ Project Structure

Windows-Security-Audit/
β”œβ”€β”€ Windows-Security-Audit.ps1    # Main orchestrator (v5.3)
β”‚   β”œβ”€β”€ Result validation & normalization
β”‚   β”œβ”€β”€ Module execution engine
β”‚   β”œβ”€β”€ Multi-format report generation
β”‚   └── Intelligent remediation system
β”‚
β”œβ”€β”€ modules/                              # Compliance framework modules
β”‚   β”œβ”€β”€ module-acsc.ps1                  # ACSC Essential Eight (123 checks)
β”‚   β”œβ”€β”€ module-cis.ps1                   # CIS Benchmarks (223 checks)
β”‚   β”œβ”€β”€ module-cisa.ps1                  # CISA Best Practices (231 checks)
β”‚   β”œβ”€β”€ module-cmmc.ps1                  # CMMC Level 2 (103 checks)
β”‚   β”œβ”€β”€ module-core.ps1                  # Core Security Baseline (177 checks)
β”‚   β”œβ”€β”€ module-enisa.ps1                 # ENISA Guidelines (198 checks)
β”‚   β”œβ”€β”€ module-gdpr.ps1                  # GDPR Technical Controls (133 checks)
β”‚   β”œβ”€β”€ module-hipaa.ps1                 # HIPAA Security Rule (184 checks)
β”‚   β”œβ”€β”€ module-iso27001.ps1              # ISO 27001:2022 (244 checks)
β”‚   β”œβ”€β”€ module-ms.ps1                    # Microsoft Baselines (314 checks)
β”‚   β”œβ”€β”€ module-ms-defenderatp.ps1        # Defender ATP (86 checks)
β”‚   β”œβ”€β”€ module-nist.ps1                  # NIST SP 800-53/CSF (474 checks)
β”‚   β”œβ”€β”€ module-nsa.ps1                   # NSA Guidance (173 checks)
β”‚   β”œβ”€β”€ module-pcidss.ps1                # PCI DSS v4.0 (227 checks)
β”‚   β”œβ”€β”€ module-soc2.ps1                  # SOC 2 Type II (124 checks)
β”‚   └── module-stig.ps1                  # DISA STIGs (185 checks)
β”‚
β”œβ”€β”€ Reports/                              # Generated reports (auto-created)
β”‚   β”œβ”€β”€ Security-Audit-Report-*.html
β”‚   β”œβ”€β”€ Security-Audit-Report-*.json
β”‚   β”œβ”€β”€ Security-Audit-Report-*.csv
β”‚   └── Security-Audit-Report-*.xml
β”‚
β”œβ”€β”€ Logs/                                 # Remediation logs (auto-created)
β”‚   └── Remediation-Log-*.json
β”‚
β”œβ”€β”€ README.md                             # This file
β”œβ”€β”€ CONTRIBUTING.md                       # Contribution guidelines
β”œβ”€β”€ CHANGELOG.md                          # Version history
β”œβ”€β”€ SECURITY.md                           # Security policy
β”œβ”€β”€ LICENSE                               # MIT License
└── .gitignore                            # Git ignore rules

πŸ” What Gets Audited?

Security Domains

Domain Checks Examples
Access Control 200+ Account policies, user rights, privilege management, local admin enumeration
Authentication 160+ Password policies, MFA requirements, credential protection (WDigest, LSASS)
Audit & Accountability 140+ Event logging (18+ subcategories), audit policies, log retention, PowerShell logging
System Hardening 250+ UAC, Secure Boot, service configuration, AutoPlay/AutoRun, least privilege
Network Security 180+ Firewall (all profiles), SMB security, LLMNR, NetBIOS, protocol hardening
Data Protection 120+ BitLocker encryption, EFS usage, data at rest/in transit protection
Malware Defense 150+ Windows Defender (real-time, cloud, behavior), signature updates, ASR rules
Application Control 80+ AppLocker policies, WDAC, software restriction, execution policies
Update Management 60+ Windows Update status, pending updates, automatic update configuration
Incident Response 50+ System Restore, backup configuration, VSS, recovery capabilities

Example Checks (Subset)

βœ… Critical Security Controls:

  • SMBv1 protocol disabled (WannaCry/NotPetya vector)
  • BitLocker encryption enabled on system drive
  • Windows Defender real-time protection active
  • PowerShell v2 disabled (no logging, downgrade attacks)
  • Guest account disabled
  • Built-in Administrator renamed/disabled
  • UAC enabled with secure desktop prompts
  • Account lockout policy configured (≀5 attempts)
  • Network Level Authentication required for RDP
  • LSASS running as Protected Process Light

βœ… Compliance Requirements:

  • Minimum password length β‰₯14 characters (STIG)
  • Password history β‰₯24 passwords (STIG/CIS)
  • Audit policy configured for 18+ subcategories (NIST)
  • Security event log β‰₯1024 MB (STIG)
  • Firewall enabled on all profiles (CAT I)
  • LAN Manager authentication level β‰₯5 (STIG)
  • SMB signing required (NIST/CIS)
  • WDigest credential caching disabled (NSA)

βœ… Hardening Measures:

  • Credential Guard enabled (if supported)
  • Device Guard/HVCI configured
  • Attack Surface Reduction rules active
  • Controlled Folder Access (ransomware protection)
  • Network Protection enabled
  • Exploit Protection configured
  • Secure Boot enabled
  • Unnecessary services disabled

See Module Documentation for complete check listings.

⚠️ Important Considerations

Administrative Privileges

Audit Mode:

  • Many checks require Administrator privileges
  • Non-admin execution shows warnings but continues
  • Some checks will return "Unable to verify" without elevation

Remediation Mode:

  • Administrator privileges MANDATORY
  • Script validates admin rights before remediation
  • Exits gracefully if running without elevation

Performance & Impact

Execution Time:

  • Full audit (all 16 modules): 3-7 minutes
  • Single module: 15-60 seconds
  • Factors: System speed, enabled features, module selection

System Impact:

  • Read-only operations during audit (no changes)
  • Minimal CPU/memory usage
  • No network traffic (except Windows Update checks)
  • Safe to run on production systems

Remediation Impact:

  • Makes persistent configuration changes
  • May affect system functionality
  • Some changes require restart
  • Test in non-production first

Security & Privacy

βœ… What the script does:

  • Reads system configuration (registry, services, policies)
  • Queries Windows Security Center
  • Checks file/folder permissions
  • Generates local reports

❌ What the script does NOT do:

  • Transmit data externally
  • Install software
  • Create network connections (except localhost)
  • Access user data or files
  • Modify system during audit (only with remediation flags)

Report Security:

  • Reports may contain sensitive system information
  • Store reports securely with appropriate access controls
  • Sanitize reports before sharing externally
  • Consider encrypting reports for compliance

Testing & Validation

Before Production Use:

  1. Test on non-production systems first
  2. Review all remediation commands before auto-applying
  3. Create system restore point before remediation
  4. Have backups available
  5. Plan maintenance window for changes requiring restart

Validation:

  • Run baseline audit, remediate, then re-audit
  • Compare before/after results
  • Verify system functionality after remediation
  • Check application compatibility

Limitations

  • Local assessment only - Does not audit remote systems or domains
  • Point-in-time - Results represent configuration at execution time
  • Platform-specific - Windows 10/11 and Server 2016+ only
  • Feature detection - Some checks may not apply to all Windows editions
  • No active scanning - Does not test for exploitable vulnerabilities

Disclaimer

This tool is provided for security assessment and compliance auditing purposes. Results should be reviewed by qualified security professionals and validated in the context of your environment. The tool identifies potential security issues but does not guarantee comprehensive security coverage. Always test in non-production environments before applying remediations to production systems.

🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for details.

Ways to Contribute

  • πŸ› Report bugs - Found an issue? Open a GitHub issue
  • πŸ’‘ Suggest features - Have an idea? Start a discussion
  • πŸ“ Improve documentation - Enhance wiki pages and examples
  • πŸ”§ Submit bug fixes - Fix issues and submit PRs
  • ✨ Add checks - Contribute new security checks or modules
  • πŸ§ͺ Test - Validate on different Windows versions
  • 🌐 Translate - Help with internationalization

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/NewSecurityCheck)
  3. Follow coding standards (see Development Guide)
  4. Test thoroughly on multiple Windows versions
  5. Update documentation
  6. Commit changes (git commit -m 'Add: New SMB3 encryption check')
  7. Push to branch (git push origin feature/NewSecurityCheck)
  8. Open a Pull Request with detailed description

Coding Standards

  • PowerShell style - Follow PowerShell best practices
  • Error handling - Use try/catch blocks appropriately
  • Comments - Document complex logic
  • Function naming - Use Verb-Noun format
  • Result format - Follow standardized output structure
  • Testing - Validate on Windows 10, 11, Server 2019, 2022

πŸ“œ License

This project is licensed under the MIT License - see LICENSE for details.

What This Means

βœ… You can:

  • Use commercially
  • Modify and distribute
  • Use privately
  • Sublicense

❌ You cannot:

  • Hold authors liable
  • Use trademarks

πŸ“‹ You must:

  • Include license and copyright notice
  • State changes made

πŸ™ Acknowledgments

This project builds upon the work and guidance of various security organizations:

Security Frameworks

  • DISA - Defense Information Systems Agency STIGs
  • NIST - National Institute of Standards and Technology
  • CIS - Center for Internet Security Benchmarks
  • NSA - National Security Agency Cybersecurity Guidance
  • CISA - Cybersecurity and Infrastructure Security Agency
  • Microsoft - Security Compliance Toolkit

Community

  • Contributors who've submitted PRs and reported issues
  • Security professionals who've provided feedback
  • Windows administrators who've tested in production environments

Tools & Libraries

  • PowerShell team for the excellent scripting platform
  • Windows security community for research and documentation

πŸ“ž Support & Resources

Get Help

Stay Updated

  • ⭐ Star the repository - Get notifications for new releases
  • πŸ‘€ Watch - Follow development activity
  • πŸ”” Subscribe to releases - Get notified of new versions

Security Issues

  • Review SECURITY.md for vulnerability reporting
  • Report security issues privately via GitHub Security Advisories
  • Expected response time: 48-72 hours

πŸ“Š Project Statistics

Metric Value
Current Version 6.1.2
Total Security Checks 3,994
Frameworks Covered 16
Code Base ~38,000 lines of PowerShell (modules: ~36,000 + orchestrator: ~2,400 + shared lib: ~1,800)
Modules 16 specialized compliance modules
Output Formats 5 native (HTML, JSON, CSV, XML, Console) + 6 browser-based exports
Windows Versions Tested 10 (21H2+), 11 (21H2+), Server 2016, 2019, 2022, 2025
PowerShell Version 5.1+
Result Fields 9 (Module, Category, Status, Severity, Message, Details, Remediation, CrossReferences, Timestamp)
Foundation Library Functions 39
Active Development βœ… Yes

πŸ“„ Version History

Version 6.1.2 (Current) - April 2026 (Patch)

  • πŸ› FIXED: 24 Get-BitLockerStatus -Cache parameter-not-found errors across 13 modules
  • πŸ› FIXED: 3 Get-OSInfo -Cache parameter-not-found errors
  • πŸ› FIXED: 27 [int]"None" Int32 conversion errors in CIS/NIST/STIG (replaced with ConvertTo-SafeInt)
  • πŸ› FIXED: No log file generated when -LogFile is omitted (shared library now auto-generates logs\audit-yyyyMMdd-HHmmss.log)
  • πŸ› FIXED: Write-AuditLog was file-only (now emits color-coded console output, suppressible via -Quiet)
  • πŸ› FIXED: Empty cache-stats display (corrected property names ServicesCached/RegistryCached/HotFixesCached/LocalUsersCached)
  • ✨ ADDED: 15 DEBUG-level statements covering invocation context, prerequisites, module discovery, execution mode, per-module timing, export, completion summary
  • ✨ ADDED: -Quiet and -ScriptRoot parameters on Initialize-AuditLogging

Version 6.1.1 - April 2026 (Patch)

  • πŸ› FIXED: Get-CachedAuditPolicy automation regression β€” function was Mandatory and required user input, breaking unattended runs (now optional + dual return mode: text or parsed objects)
  • ✨ ADDED: Multiple help-invocation forms (-Help, -H, -?, -ShowHelp, help, -help, --help, --h, /?, /help, /h)
  • ✨ ADDED: Comprehensive 10-section Show-DetailedHelp function (banner, synopsis, description, frameworks, parameters by group, examples, bundles, quick reference, requirements, more info)
  • πŸ“ UPDATED: Comment-based help (Get-Help) now documents -ShowHelp parameter, all alias forms, and includes a help-invocation example

Version 6.1.0 - April 2026 (Major Feature Release)

  • ✨ NEW: Risk priority scoring (1-100 scale combining severity, exploitability, exposure, criticality) via -ShowRiskPriority
  • ✨ NEW: Cross-framework correlation grouping via -ShowCorrelations
  • ✨ NEW: Compensating control detection via -ShowCompensatingControls
  • ✨ NEW: Baseline drift comparison via -Baseline <path>
  • ✨ NEW: Rollback script generation via -RollbackPath <path>
  • ✨ NEW: Group Policy .pol file export via -ExportGPO <path>
  • ✨ NEW: Remediation bundles (DisableLegacyProtocols, HardenAuthentication, EnableAuditLogging, LockDownRDP, EssentialEightLevel1) via -RemediationBundle
  • ✨ NEW: Pre-confirmation impact analysis for auto-remediation (reboot/logoff/service/network/destructive summary)
  • πŸ”§ EXPANDED: 3,994 total checks (up from 3,199; +795 across all 16 modules)
  • πŸ”§ CONSOLIDATED: NIST module categories (230 β†’ 20) with control-family groupings; precise control IDs preserved in CrossReferences
  • πŸ”§ EXPANDED: Foundation library β€” 10 new cross-cutting functions (ConvertTo-RegistryRollback, ConvertTo-ServiceRollback, Get-RemediationImpact, Get-RiskPriorityScore, Find-CompensatingControls, Find-CrossFrameworkCorrelations, Compare-ToBaseline, Export-RegistryPolicyFile, Test-InternetFacingHost, Test-DomainControllerHost)

Version 6.0.5 - March 2026

  • ✨ NEW: 8 new compliance modules (ACSC, CMMC, ENISA, GDPR, HIPAA, ISO27001, PCI-DSS, SOC2)
  • πŸ”§ EXPANDED: Total checks increased from 1,855 to 3,199 across 16 modules
  • πŸ”§ IMPROVED: XSL-styled XML output, report overhaul, 6 browser-based export formats

Version 6.0.0 - March 2025

  • ✨ NEW: Severity classification on every check (Critical/High/Medium/Low/Informational)
  • ✨ NEW: Cross-framework correlation infrastructure
  • ✨ NEW: Microsoft Defender for Endpoint module (86 checks)
  • ✨ NEW: Standalone module execution support
  • ✨ NEW: Cache-aware registry/service/policy helpers via shared library
  • ✨ NEW: 9-field result objects (added Severity and CrossReferences)
  • πŸ”§ EXPANDED: 1,855 total checks across 8 modules

Version 5.3 - February 2025

  • ✨ NEW: Interactive and automated remediation system
  • ✨ NEW: Targeted remediation from HTML report selections
  • ✨ NEW: SIEM-compatible XML output format
  • ✨ NEW: Enhanced HTML reports with theme toggle
  • ✨ NEW: Multi-format export from HTML (CSV, Excel, JSON, XML, TXT)
  • πŸ”§ IMPROVED: Safety mechanisms for automated remediation
  • πŸ› FIXED: Status value consistency across modules

Version 5.0 - December 2024

  • Complete rewrite with modular architecture
  • 550+ security checks across 7 frameworks
  • Multiple output formats (HTML, JSON, CSV)
  • Comprehensive documentation

See CHANGELOG.md for complete version history.


⭐ If this project helps you secure Windows systems, please consider giving it a star! ⭐

⬆ Back to Top

Made with ❀️ for the cybersecurity community

About

Enhance Windows security with this Powershell-based framework! Audit & remediate against CIS, NIST, DISA STIG, NSA, CISA, ENISA, ISO 27001, & Core baselines. Features 500+ checks, interactive & automated remediation, and detailed reporting (HTML/JSON/CSV/XML).

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors