Fixes PHP2Shell (CVE-2026-109618, CVE-2026-109619) on Windows. Finds PHP in PATH, common folders, XAMPP, WampServer, Laragon, Chocolatey, Scoop and IIS FastCGI, upgrades each to the patched windows.php.net build with matching thread safety, compiler and architecture (SHA-256 verified), backs up the folder, keeps php.ini, restarts IIS and Apache, and applies PHP's interim mitigation where no fix exists. Exit codes: 0 patched, 1 still vulnerable, 2 couldn't run.
Fixes PHP2Shell (CVE-2026-109618, CVE-2026-109619) on Linux and macOS. Finds every PHP installation, upgrades vulnerable PHP packages with apt, dnf, yum, zypper, apk or Homebrew, recognizes vendor backports from package changelogs, restarts PHP-FPM, Apache and LiteSpeed, verifies the result, and applies PHP's interim mitigation where no fix exists. Exit codes: 0 patched, 1 still vulnerable, 2 couldn't run.
Removes the Claude Code extension backdoor on Windows. On 2026-10-29 Cursor's marketplace served trojanized builds of anthropic.claude-code 2.1.312 and 2.1.313 for about 11 hours; the payload adds an SSH key, installs the OpenSSH server, opens a reverse SSH tunnel and persists across reboots. Version 2.1.314 is clean. For every profile it deletes infected extension folders, removes the SysMon scheduled task and the sysmon.cmd Startup entry when they run the payload, stops the tunnel, removes the payload files and tunnel key, removes the svc-telemetry key from authorized_keys including the administrators file, and sweeps again to verify. Indicators come from Cursor's security notice. Exit codes: 0 clean, 1 something remains, 2 couldn't run.
Removes the Claude Code extension backdoor on Linux and macOS. On 2026-10-29 Cursor's marketplace served trojanized builds of anthropic.claude-code 2.1.312 and 2.1.313 for about 11 hours; the payload adds an SSH key, opens a reverse SSH tunnel and persists across reboots. Version 2.1.314 is clean. For every user it deletes infected extension folders (their JavaScript names the attacker's address or the svc-telemetry key), removes the persistence (LaunchAgent, @reboot cron entry, dropped files and tunnel key), stops the tunnel, removes the svc-telemetry key from authorized_keys, and sweeps again to verify. Indicators come from Cursor's security notice. Exit codes: 0 clean, 1 something remains, 2 couldn't run.
Hardens Windows against PrintNightmare (CVE-2021-34527, CVE-2021-1675), where Point and Print let an authenticated user load a printer driver that runs as SYSTEM. Applies Microsoft's documented hardening from KB5005010 (RestrictDriverInstallationToAdministrators = 1, NoWarningNoElevationOnInstall = 0, UpdatePromptSettings = 0), re-reads every value to verify, and reports the Print Spooler's state, whether this host shares printers, and whether the build carries the July 2021 fix. Optionally disables the spooler (-DisableSpooler) or requires package-aware drivers (-PackagePointAndPrintOnly). Exit codes: 0 hardened, 1 still exposed, 2 couldn't run.
Fixes Copy Fail (CVE-2026-31431) on Linux, a local privilege escalation in the kernel's AF_ALG algif_aead interface that is in CISA's Known Exploited Vulnerabilities catalog. Works out whether the running kernel is patched from its package changelog or upstream version (fixed in 7.0, 6.19.12 and 6.18.22), installs the distribution's kernel update with apt, dnf, yum, zypper or apk, blocks the algif_aead module so the host is not exploitable before the reboot, recognizes a vendor mitigation that is already in place, and reports whether CONFIG_CRYPTO_USER_API_AEAD is built into the kernel, where only the update helps. Exit codes: 0 not exploitable, 1 still exposed or a reboot is needed, 2 couldn't run.
Fixes the eMudhra CA key compromise on Windows. Eight eMudhra intermediate CAs were issued with guessable keys and revoked on 2026-10-18; each also exists cross-signed by Sectigo's AAA Certificate Services. Puts both compromised roots in the Disallowed store (the roots are embedded, so it works even though Windows installs roots on demand), distrusts any compromised certificate cached in a store, verifies with a chain build, lists certificates that need reissuing, and reports bundled trust stores. Run with -Undo to roll the distrust back. Exit codes: 0 every targeted root is distrusted, 1 one is not, 2 couldn't run.
Fixes the eMudhra CA key compromise on Linux and macOS. Eight eMudhra intermediate CAs were issued with guessable keys and revoked on 2026-10-18; each also exists cross-signed by Sectigo's AAA Certificate Services. Upgrades ca-certificates and NSS with apt, dnf, yum, zypper, apk or Homebrew, then distrusts both compromised roots (p11-kit blocklist, /etc/ca-certificates.conf exclusion, or a macOS keychain deny), verifies the trust store, lists leaf certificates that need reissuing, and reports bundled trust stores (certifi, Go, Node.js, Java). Run with --undo to roll the distrust back. Exit codes: 0 neither root is trusted, 1 one still is, 2 couldn't run.
This script fixes the Windows CIS Benchmark check 5.39: "Ensure 'Windows Remote Management (WS- Management) (WinRM)' is set to 'Disabled'."