
Read-only Windows host hardening auditor in PowerShell with optional AI analysis
_.--""--._
.' | | '.
/ | | \ HostBadger
| (o)| |(o) | Windows host hardening
| | | |
\ '.__.' /
'._ \/ _.'
'--..--'

HostBadger audits the security settings of Windows machines and tells you what is weak. It works in two steps. A single PowerShell script takes a read-only snapshot of a host. The analyzer then reads the snapshots offline and writes an HTML report, a findings CSV and, if you want it, JSON Lines for a SIEM. Hand it one snapshot or a folder with hundreds and you get the whole fleet in one report, or one report per host.
.ps1 file,
with no module and no prompt, that runs as SYSTEM or as an administrator
through any tool that can run a PowerShell script on your hosts (an EDR's
live response such as CrowdStrike Falcon RTR, an RMM, Configuration Manager
or Intune scripts, a Group Policy startup script, PowerShell remoting) and
takes about 15 seconds per host.-CheckUpdates (the Windows Update service
searches for missing updates), -KevOnline (downloads the CISA KEV catalog,
www.cisa.gov), -DriversOnline (downloads the LOLDrivers catalog,
www.loldrivers.io), -EolOnline (downloads software lifecycle data,
endoflife.date), -ChocoOnline (downloads program versions,
community.chocolatey.org), -CveOnline (downloads CVEs and EPSS scores,
services.nvd.nist.gov and epss.empiricalsecurity.com) and -SendToAI (Gemini). Each one is named where it is offered.
Test-HostBadgerSafety.ps1 proves the rest from the code.It reads what a host actually does, which is not always what policy says it should.
-CheckUpdates), the updates that Windows Update reports as
missing, rated by Microsoft severity.-KevFile
or -KevOnline) each program that matches a product with vulnerabilities
known to be exploited becomes a lead to verify (the catalog has no version
ranges, so the match is by vendor and product name only). Releases past
their end of support (Flash, Java 6/7, old Office, Exchange and SQL Server,
Python, Node.js, .NET, old Visual C++ runtimes) are flagged from a lifecycle
table, no download needed. With -EolOnline (or -EolFile) the dates come
from endoflife.date (MIT), which adds Oracle Java, Eclipse Temurin,
PowerShell 7, VirtualBox and Wireshark, judges each SQL Server instance on its
service pack and its latest cumulative update or GDR build (read from the
engine file sqlservr.exe), and flags programs behind the latest
release of their line (software_outdated: Python 3.12.1 when 3.12.9 has been
out for months, a Firefox, Chrome or Notepad++ that stopped updating). A
release counts only if it came out before the snapshot and more than
-SoftwareGraceDays (30) earlier. With -ChocoOnline (or -ChocoFile) the
same check covers 7-Zip, VLC, Git for Windows, GIMP, WinSCP, PuTTY, FileZilla,
KeePass, Audacity, Mullvad VPN, OBS Studio and AnyDesk, from the versions and
publication dates of their Chocolatey community packages (the same list is
asked for whatever the hosts have, so the requests say nothing about them).
With -CveOnline (or -CveFile) software_cve lists the known
vulnerabilities of the installed version of Python, Node.js, .NET, Notepad++,
PowerShell 7, VirtualBox, Wireshark, 7-Zip, VLC, Git, GIMP, WinSCP, PuTTY,
FileZilla, KeePass, Audacity, Mullvad VPN and AnyDesk: the CVEs of each
product come from the NVD CVE API (asked for by
product, never by version) and their version ranges are judged locally; each
finding gives the count, the highest CVSS score, the CVEs in CISA KEV and the
highest EPSS score (probability of
exploitation), and names the release that fixes them all. NVD has a backlog
of CVEs without version data, so the newest ones can be missing. About 2.5
minutes without an NVD API key (NVD_API_KEY makes it faster).data\vulnerable-drivers.json
(rebuilt by tools\Convert-LolDrivers.ps1); -DriversOnline downloads a
fresh one. The Microsoft vulnerable driver blocklist turned off is a finding
too.