A single-file, read-only Bash CLI that audits any Linux/macOS server or remote host in 5 seconds for harvest-now, decrypt-later (HNDL) exposure across OpenSSH, TLS 1.3, and WireGuard.
Following the December 2, 2026 NSA/CISA/ONCD post-quantum advisory and Jason Donenfeld's WireGuard v2 mailing list update, operators needed one fast, auditable check instead of stitching together verbose ssh -vv, openssl s_client, and wg show commands across fleets.
- Read-only by design: Never edits
/etc/ssh,/etc/nginx, or/etc/wireguard. - Zero dependencies: Pure Bash 3.2+ using standard
ssh,openssl, andwg. - CI/Ansible ready: Structured
--jsonoutput and deterministic exit codes (0pass,1HNDL exposure found,2usage error).
| Layer | Local Audit ( sudo ./pqc-audit.sh ) | Remote Audit ( --host example.com ) | Pass Criteria | |---|---|---|---| | OpenSSH | Active sshd -T kexalgorithms (or clientssh -Q kex ) | Live ssh -vv negotiation | mlkem768x25519-sha256 orsntrup761x25519-sha512 | | TLS 1.3 | Local openssl list -kem-algorithms | Live openssl s_client -groups X25519MLKEM768 | NIST ML-KEM-768 /X25519MLKEM768 | | WireGuard | wg show all preshared-keys +rosenpass detection | Skipped (local-only) | 0 peers with(none) PSK |
git clone https://github.com/privatebyte-com/pqc-audit.git
cd pqc-audit
chmod +x pqc-audit.sh
sudo ./pqc-audit.sh --print-fix
./pqc-audit.sh --host cloudflare.com
./pqc-audit.sh --host vps.example.com --ssh-port 2222 --tls-port 443 --print-fix
./pqc-audit.sh --host cloudflare.com --json
{
"version": "1.1.0",
"target": "cloudflare.com",
"pass": 1,
"warn": 1,
"fail": 0,
"checks": {
"ssh": { "status": "WARN", "detail": "could not negotiate SSH on cloudflare.com:22 (port closed or filtered)" },
"tls": { "status": "PASS", "detail": "Negotiated TLS1.3 group: X25519MLKEM768 on cloudflare.com:443" },
"wireguard": { "status": "SKIP", "detail": "remote --host mode (run locally on the VPN node to inspect WireGuard peers)" }
}
}
| Flag | Default | Description | |---|---|---| | --host <host> | (local) | Probe a remote server's live SSH and TLS 1.3 handshakes | | --ssh-port <port> | 22 | SSH port for remote --host probe | | --tls-port <port> | 443 | TLS port for remote --host probe | | --print-fix | off | Print drop-in hardening snippets for failing checks | | --json | off | Emit single-line JSON summary (disables ANSI colors) | | -v ,--version | | Print version | | -h ,--help | | Print usage help |
- Remote TLS PQ probing requires OpenSSL 3.5+ locally: If your local workstation runs OpenSSL 3.0/3.2 (which does not know
X25519MLKEM768),pqc-auditreportsWARNrather than a falseFAIL. - Key exchange focus (HNDL): This tool auditsconfidentiality key exchange (the immediate harvest-now, decrypt-later threat), not post-quantum certificate signatures (
ML-DSA), which are still rolling out across public CAs. - No automatic mutations: Even with
--print-fix,pqc-auditonly prints commands for you to review and apply.
- Browser-native WireGuard 256-bit PSK generator & hardening workbench: privatebyte.com/post-quantum-checker
- WireGuard v2 & immediate PSK / Rosenpass hardening guide: privatebyte.com/blog/wireguard-v2-post-quantum
- OpenSSH
mlkem768& NginxX25519MLKEM768VPS migration guide:privatebyte.com/blog/post-quantum-ssh-tls-vps-guide
Maintained by PrivateByte · Security Policy · Contributing · Licensed under MIT.
原文来源:github.com