惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Project Zero
Project Zero
T
The Blog of Author Tim Ferriss
云风的 BLOG
云风的 BLOG
Recent Announcements
Recent Announcements
月光博客
月光博客
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Microsoft Security Blog
Microsoft Security Blog
The GitHub Blog
The GitHub Blog
Last Week in AI
Last Week in AI
罗磊的独立博客
NISL@THU
NISL@THU
酷 壳 – CoolShell
酷 壳 – CoolShell
P
Proofpoint News Feed
H
Help Net Security
L
LINUX DO - 最新话题
MongoDB | Blog
MongoDB | Blog
雷峰网
雷峰网
The Hacker News
The Hacker News
Apple Machine Learning Research
Apple Machine Learning Research
I
Intezer
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Know Your Adversary
Know Your Adversary
Recent Commits to openclaw:main
Recent Commits to openclaw:main
S
Secure Thoughts
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
C
CERT Recently Published Vulnerability Notes
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
N
News and Events Feed by Topic
F
Full Disclosure
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
Recorded Future
Recorded Future
T
Threat Research - Cisco Blogs
博客园 - 三生石上(FineUI控件)
S
Securelist
T
The Exploit Database - CXSecurity.com
Forbes - Security
Forbes - Security
H
Hacker News: Front Page
Security Archives - TechRepublic
Security Archives - TechRepublic
C
Check Point Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
V
Visual Studio Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Tor Project blog
博客园 - 司徒正美
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Automating Essential Eight Compliance Checks with PowerShell
ShadowStrike · 2026-04-27 · via DEV Community

Version 1.0.0

If you work in Australian IT, cybersecurity, or digital forensics, you've encountered the Essential Eight. It's referenced in government procurement requirements, security assessments, incident response frameworks, and organisational policies across both public and private sectors.

The Australian Signals Directorate's Essential Eight is a set of eight baseline mitigation strategies designed to protect Windows environments against cyber threats. Checking compliance manually is time-consuming and error-prone. In this tutorial, you'll build a PowerShell script that automates Essential Eight audits, produces colour-coded console output, and writes detailed compliance reports to timestamped files.

What You'll Build

A PowerShell script called essential_eight.ps1 that checks a Windows system against all eight ASD mitigation strategies and produces a comprehensive audit report showing PASS/FAIL/WARN/INFO status for each control.

Prerequisites

  • PowerShell 5.1 or later (Windows 10+)
  • Administrator privileges recommended (some checks require elevated access)
  • No external modules or dependencies

Understanding the Essential Eight

Before building the script, it's worth understanding what each strategy actually checks. The ASD publishes detailed guidance, but the practical questions are:

1. Application Control — Is there a mechanism (AppLocker, Windows Defender Application Control) preventing unauthorised executables from running?

2. Patch Applications — Are third-party applications kept up to date? Is Windows Update active?

3. Configure Microsoft Office Macro Settings — Are macros restricted to prevent malicious Office documents from executing code?

4. User Application Hardening — Are legacy and high-risk features (Internet Explorer, Windows Script Host, PowerShell v2) disabled or restricted?

5. Restrict Administrative Privileges — Are admin accounts limited? Is UAC enabled? Are standard users running with least privilege?

6. Patch Operating Systems — Is the OS on a supported and current build?

7. Multi-Factor Authentication — Is MFA enforced, especially for privileged access?

8. Regular Backups — Are backups in place and recent? Are they protected from modification?

Each strategy has Maturity Levels (ML1, ML2, ML3) in the full ASD framework. This script focuses on ML1 baseline checks — the foundation that must exist before maturity level progression begins.

The Complete Script

Here's the full implementation (condensed for readability - full version on GitHub):

# Essential Eight Compliance Checker
# Author: ShadowStrike (Strategos)

param(
    [Parameter(Mandatory=$false)]
    [string]$OutputDir = ".",

    [Parameter(Mandatory=$false)]
    [switch]$Verbose
)

# Initialise report
$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"
$outputFile = Join-Path $OutputDir "EssentialEight_Audit_$timestamp.txt"
$report = @()

# Track results
$passCount = 0
$failCount = 0
$warnCount = 0

function Write-Check {
    param([string]$Strategy, [string]$Check, [string]$Status, [string]$Detail = "")

    $color = switch ($Status) {
        "PASS" { "Green"; $script:passCount++ }
        "FAIL" { "Red"; $script:failCount++ }
        "WARN" { "Yellow"; $script:warnCount++ }
        "INFO" { "Cyan" }
    }

    $line = "[$Status] $Strategy - $Check"
    if ($Detail) { $line += ": $Detail" }

    Write-Host $line -ForegroundColor $color
    $script:report += $line
}

# STRATEGY 1: APPLICATION CONTROL
try {
    $appLockerPolicy = Get-AppLockerPolicy -Effective -ErrorAction Stop
    if ($appLockerPolicy.RuleCollections.Count -gt 0) {
        Write-Check "AppControl" "AppLocker Policy" "PASS" "Effective rules configured"
    } else {
        Write-Check "AppControl" "AppLocker Policy" "FAIL" "No effective rules"
    }
} catch {
    Write-Check "AppControl" "AppLocker Policy" "FAIL" "Not configured"
}

# STRATEGY 2: PATCH APPLICATIONS
$wuService = Get-Service -Name wuauserv -ErrorAction SilentlyContinue
if ($wuService -and $wuService.Status -eq "Running") {
    Write-Check "Patching" "Windows Update Service" "PASS" "Running"
} else {
    Write-Check "Patching" "Windows Update Service" "FAIL" "Not running"
}

# Check last update date
$session = New-Object -ComObject Microsoft.Update.Session
$searcher = $session.CreateUpdateSearcher()
$history = $searcher.QueryHistory(0, 1) | Select-Object -First 1
$lastUpdate = $history.Date
$daysSince = (Get-Date) - $lastUpdate

if ($daysSince.Days -le 30) {
    Write-Check "Patching" "Last Update" "PASS" "$([math]::Round($daysSince.TotalDays)) days ago"
} else {
    Write-Check "Patching" "Last Update" "FAIL" "$([math]::Round($daysSince.TotalDays)) days ago (outdated)"
}

# STRATEGY 3: OFFICE MACRO SETTINGS
$excelPath = "HKCU:\Software\Microsoft\Office\16.0\Excel\Security"
if (Test-Path $excelPath) {
    $vbaWarnings = (Get-ItemProperty -Path $excelPath -Name VBAWarnings).VBAWarnings
    if ($vbaWarnings -eq 3 -or $vbaWarnings -eq 4) {
        Write-Check "MacroSettings" "Excel VBA" "PASS" "Restricted"
    } else {
        Write-Check "MacroSettings" "Excel VBA" "FAIL" "Unrestricted"
    }
}

# STRATEGY 4: USER APPLICATION HARDENING
$psv2 = Get-WindowsOptionalFeature -Online -FeatureName MicrosoftWindowsPowerShellV2Root
if ($psv2.State -eq "Disabled") {
    Write-Check "Hardening" "PowerShell v2" "PASS" "Disabled"
} else {
    Write-Check "Hardening" "PowerShell v2" "FAIL" "Enabled (should be removed)"
}

$langMode = $ExecutionContext.SessionState.LanguageMode
if ($langMode -eq "ConstrainedLanguage") {
    Write-Check "Hardening" "PS Language Mode" "PASS" "ConstrainedLanguage"
} else {
    Write-Check "Hardening" "PS Language Mode" "WARN" "FullLanguage (unrestricted)"
}

# STRATEGY 5: RESTRICT ADMIN PRIVILEGES
$uacPath = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System"
$uacEnabled = (Get-ItemProperty -Path $uacPath -Name EnableLUA).EnableLUA
if ($uacEnabled -eq 1) {
    Write-Check "Privileges" "UAC" "PASS" "Enabled"
} else {
    Write-Check "Privileges" "UAC" "FAIL" "Disabled"
}

# STRATEGY 6: PATCH OPERATING SYSTEMS
$os = Get-CimInstance Win32_OperatingSystem
$osBuild = $os.BuildNumber
if ([int]$osBuild -ge 19041) {
    Write-Check "OS Patching" "OS Support" "PASS" "Supported build"
} else {
    Write-Check "OS Patching" "OS Support" "FAIL" "Legacy build"
}

# STRATEGY 7: MULTI-FACTOR AUTHENTICATION
# Note: Full MFA assessment requires Azure AD audit
Write-Check "MFA" "Assessment" "INFO" "Requires directory-level audit"

# STRATEGY 8: REGULAR BACKUPS
$vssService = Get-Service -Name VSS
if ($vssService.Status -eq "Running") {
    Write-Check "Backups" "Volume Shadow Copy" "PASS" "Running"
} else {
    Write-Check "Backups" "Volume Shadow Copy" "WARN" "Not running"
}

# Write summary
Write-Host "`n[AUDIT SUMMARY]"
Write-Host "  PASS: $passCount" -ForegroundColor Green
Write-Host "  FAIL: $failCount" -ForegroundColor Red
Write-Host "  WARN: $warnCount" -ForegroundColor Yellow

$report | Out-File -FilePath $outputFile -Encoding UTF8

Enter fullscreen mode Exit fullscreen mode

How to Use It

Troubleshooting: Execution Policy

If you see an error about scripts being disabled or not digitally signed:

Step 1: Set execution policy

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Enter fullscreen mode Exit fullscreen mode

Step 2: Unblock the file if downloaded

Unblock-File .\essential_eight.ps1

Enter fullscreen mode Exit fullscreen mode

Windows marks files downloaded from GitHub with Zone.Identifier metadata. Even with RemoteSigned policy, these files are blocked unless digitally signed or explicitly unblocked.

Check your current policy with Get-ExecutionPolicy -List.

Security Note: Read the Code Before You Run It

This script is not digitally signed. Code signing certificates cost $200-500/year and are unnecessary for open-source scripts where you can read the source code yourself.

Before running this or any PowerShell script:

  1. Read it completely — every line, every function, every registry path
  2. Understand what it does — does it match the stated purpose?
  3. Check for risks — network calls, file deletions, credential access

Apply the ABC principle:

  • Assume nothing
  • Believe nothing
  • Check everything

A digital signature tells you WHO wrote code, not WHETHER it's safe. You are the final security control. Never execute code you haven't personally reviewed and understood.


Basic Audit

.\essential_eight.ps1

Enter fullscreen mode Exit fullscreen mode

Runs the audit and writes report to EssentialEight_Audit_[timestamp].txt in the current directory.

Specify Output Directory

.\essential_eight.ps1 -OutputDir "C:\Compliance\Reports"

Enter fullscreen mode Exit fullscreen mode

Run as Administrator

Some checks require elevated privileges. Right-click PowerShell → "Run as Administrator", then:

.\essential_eight.ps1

Enter fullscreen mode Exit fullscreen mode

Understanding the Output

The script produces colour-coded console output:

  • [PASS] (green) - Control meets baseline requirements
  • [FAIL] (red) - Control does not meet requirements
  • [WARN] (yellow) - Partial compliance or requires manual review
  • [INFO] (cyan) - Informational finding, not a compliance check

Sample output (example system for demonstration - not real audit data):

[ESSENTIAL EIGHT COMPLIANCE AUDIT]
System: WORKSTATION-01

[STRATEGY 1: APPLICATION CONTROL]
[PASS] AppControl - AppLocker Policy: Effective rules configured
[INFO] AppControl - WDAC Policy: Not deployed (AppLocker in use)

[STRATEGY 2: PATCH APPLICATIONS]
[PASS] Patching - Windows Update Service: Running
[PASS] Patching - Last Update: 2026-04-18 - 6 days ago

[STRATEGY 3: OFFICE MACRO SETTINGS]
[PASS] MacroSettings - Excel VBA Warnings: Macros disabled (Value: 3)
[PASS] MacroSettings - Word VBA Warnings: Notification enabled (Value: 4)

[STRATEGY 4: USER APPLICATION HARDENING]
[PASS] Hardening - PowerShell v2: Disabled
[PASS] Hardening - PowerShell Version: v5.1
[WARN] Hardening - PowerShell Language Mode: FullLanguage (unrestricted)
[PASS] Hardening - Script Block Logging: Enabled

[STRATEGY 5: RESTRICT ADMINISTRATIVE PRIVILEGES]
[PASS] Privileges - Current User Role: Running as standard user
[PASS] Privileges - UAC Status: Enabled
[PASS] Privileges - Local Administrators: 2 account(s) - acceptable range

[STRATEGY 6: PATCH OPERATING SYSTEMS]
[INFO] OS Patching - Operating System: Microsoft Windows 10 Pro (Build 19045)
[PASS] OS Patching - OS Support Status: Windows 10 version 2004+ (supported)

[STRATEGY 7: MULTI-FACTOR AUTHENTICATION]
[INFO] MFA - Windows Hello: Credential provider detected
[INFO] MFA - Credential Providers: 3 provider(s) registered
[INFO] MFA - Note: Full MFA assessment requires Azure AD / Active Directory audit

[STRATEGY 8: REGULAR BACKUPS]
[INFO] Backups - Windows Backup Service: Not active (may use third-party)
[PASS] Backups - Volume Shadow Copy: Running
[PASS] Backups - Latest Shadow Copy: 2026-04-23 - 1 days ago

[AUDIT SUMMARY]
  PASS: 15
  FAIL: 0
  WARN: 1

Enter fullscreen mode Exit fullscreen mode

The timestamped report file contains the same information in plain text format for archiving.

Code Walkthrough

Strategy 1: Application Control

Checks for AppLocker or Windows Defender Application Control (WDAC):

$appLockerPolicy = Get-AppLockerPolicy -Effective
if ($appLockerPolicy.RuleCollections.Count -gt 0) {
    Write-Check "AppControl" "AppLocker Policy" "PASS" "Effective rules configured"
}

Enter fullscreen mode Exit fullscreen mode

AppLocker policies can be deployed via Group Policy or locally. The -Effective parameter returns the combined result of all policies affecting the system.

For WDAC, the script checks for policy files in C:\Windows\System32\CodeIntegrity\CiPolicies\Active\.

Strategy 2: Patch Applications

Verifies Windows Update service is running and checks last update date:

$session = New-Object -ComObject Microsoft.Update.Session
$searcher = $session.CreateUpdateSearcher()
$history = $searcher.QueryHistory(0, 1) | Select-Object -First 1
$lastUpdate = $history.Date
$daysSince = (Get-Date) - $lastUpdate

Enter fullscreen mode Exit fullscreen mode

The Windows Update COM API provides detailed patch history. This check flags systems where the last update was >30 days ago as outdated.

Strategy 3: Office Macro Settings

Checks registry settings for Excel and Word macro behaviour:

$excelPath = "HKCU:\Software\Microsoft\Office\16.0\Excel\Security"
$vbaWarnings = (Get-ItemProperty -Path $excelPath -Name VBAWarnings).VBAWarnings

Enter fullscreen mode Exit fullscreen mode

VBAWarnings values:

  • 1 = Enable all macros (dangerous)
  • 2 = Disable all with notification
  • 3 = Disable all except digitally signed
  • 4 = Disable all without notification (most secure)

Values 3 and 4 meet Essential Eight ML1 baseline.

Strategy 4: User Application Hardening

Multiple checks including PowerShell v2 removal and script block logging:

$psv2 = Get-WindowsOptionalFeature -Online -FeatureName MicrosoftWindowsPowerShellV2Root
if ($psv2.State -eq "Disabled") {
    Write-Check "Hardening" "PowerShell v2" "PASS" "Disabled"
}

Enter fullscreen mode Exit fullscreen mode

PowerShell v2 lacks modern security features (script block logging, Constrained Language Mode support) and should be removed from all systems.

Script block logging check:

$scriptBlockPath = "HKLM:\Software\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging"
$scriptBlockEnabled = (Get-ItemProperty -Path $scriptBlockPath -Name EnableScriptBlockLogging).EnableScriptBlockLogging

Enter fullscreen mode Exit fullscreen mode

When enabled (value = 1), all PowerShell script execution is logged to Windows Event Log, providing audit trails for forensic investigation.

Strategy 5: Restrict Administrative Privileges

Checks UAC status and local administrator count:

$uacPath = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System"
$uacEnabled = (Get-ItemProperty -Path $uacPath -Name EnableLUA).EnableLUA

$admins = Get-LocalGroupMember -Group "Administrators"

Enter fullscreen mode Exit fullscreen mode

UAC (User Account Control) prompts for elevation when administrative actions are attempted. Disabling UAC is a common misconfiguration that violates Essential Eight requirements.

The administrator count check flags systems with excessive admin accounts. Typically, only built-in Administrator and one domain admin account should exist on workstations.

Strategy 6: Patch Operating Systems

Verifies OS is on a supported build:

$os = Get-CimInstance Win32_OperatingSystem
$osBuild = $os.BuildNumber

if ([int]$osBuild -ge 19041) {
    Write-Check "OS Patching" "OS Support" "PASS" "Supported build"
}

Enter fullscreen mode Exit fullscreen mode

Build 19041 = Windows 10 version 2004, the minimum currently-supported consumer version. Enterprise LTSC versions may have different support timelines.

Strategy 7: Multi-Factor Authentication

MFA assessment requires directory-level audit (Azure AD, Active Directory):

$credProviders = Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers"

Enter fullscreen mode Exit fullscreen mode

The script checks for Windows Hello and registered credential providers, but full MFA enforcement validation requires checking conditional access policies in Azure AD or examining GPO settings for smart card requirements.

Strategy 8: Regular Backups

Checks Volume Shadow Copy Service and recent shadow copies:

$shadows = Get-CimInstance Win32_ShadowCopy | Where-Object { $_.VolumeName -like "*C:*" }
$latestShadow = $shadows | Sort-Object InstallDate -Descending | Select-Object -First 1
$daysSince = (Get-Date) - $latestShadow.InstallDate

Enter fullscreen mode Exit fullscreen mode

Shadow copies are point-in-time snapshots used for System Restore and file recovery. The script flags systems where the latest shadow copy is >7 days old.

Real-World Use Cases

Pre-audit preparation: Run this script on sample systems before formal compliance assessments to identify gaps early.

Continuous monitoring: Schedule the script as a daily task and email the report to security teams. Track compliance drift over time.

Incident response baseline: After a security incident, run the script on affected systems to document Essential Eight posture at the time of compromise.

Procurement verification: When deploying new workstations, run the audit to verify vendor configuration meets baseline requirements before acceptance.

Maturity level progression: Use the baseline audit results to identify systems ready for ML2/ML3 implementation.

Extending the Script

HTML report generation: Replace the plain-text output with an HTML file including coloured tables and charts.

Email integration: Add Send-MailMessage to automatically email reports to compliance teams.

Remote execution: Wrap the script in Invoke-Command to audit multiple systems from a central management workstation.

SIEM integration: Parse the output and send findings to a SIEM platform for centralised compliance monitoring.

Remediation actions: Add a -Remediate switch that automatically fixes common failures (enable UAC, remove PowerShell v2, enable script block logging).

Maturity Levels Beyond ML1

This script focuses on ML1 (baseline) checks. The ASD Essential Eight Maturity Model has three levels:

Maturity Level 1: Partly aligned with intent. Baseline controls exist but may not be comprehensive.

Maturity Level 2: Mostly aligned with intent. Controls cover most assets and attack vectors.

Maturity Level 3: Fully aligned with intent. Comprehensive controls across all assets with robust monitoring.

Progression from ML1 → ML2 → ML3 requires increasingly stringent technical controls and centralised management. For example:

  • Application Control ML1: AppLocker with basic rules
  • Application Control ML2: Centralised AppLocker or WDAC with allow-listing
  • Application Control ML3: WDAC with cryptographic verification of all executables

This script provides the ML1 foundation. Assessing ML2/ML3 compliance requires additional checks beyond what local PowerShell can determine (requires SCCM, Intune, or GPO reporting).

GitHub Repository

The complete script, sample reports, and this tutorial are available on GitHub:

essential-eight-checklist

PowerShell scripts for practical Essential Eight compliance checking on Windows systems.




Conclusion

Essential Eight compliance doesn't require expensive enterprise tools. PowerShell provides native cmdlets for checking application control, patching status, user hardening, privilege restrictions, and backup configurations.

This script packages those checks into a practical audit workflow that runs on any Windows 10/11 system without dependencies. For IT security professionals, compliance teams, and system administrators working in Australian government or enterprise environments, automated Essential Eight auditing is a fundamental operational requirement.

The value isn't just in the compliance report — it's in the velocity. Running this audit manually would take an experienced admin 30-60 minutes per system. The script completes it in seconds and produces consistent, auditable results.


Built by ShadowStrike (Strategos) — where we build actual security tools instead of theatre 🎃.