堡垒机泄漏中的私钥

  • Leak details: A few days ago, a Fortigate/Fortinet devices config files leak link was posted. Collected in 2022 due to CVE-2022-40684. First reported by heise and Kevin Beaumont. Leak contains TLS and SSH private keys.
  • Private key encryption: Leaked keys are encrypted with a static encryption key tracked as CVE-2019-6693. Password for key encryption is also encrypted and a script to decrypt exists. Decrypted passwords are mostly hex numbers with padding.
  • Key numbers and certificates: Around 100,000 private keys in PKCS format and 60,000 in OpenSSH format. Most certificates self-signed, few thousand by public CAs (most expired). 84 WebPKI certificates not expired or revoked.
  • Action taken: Reported still valid certificates to CAs for revocation. Filed two bug reports due to difficulties. Updated analysis with more complete data (around 98,000 SSH keys and 167,000 PKCS keys). Discovered 314 Let's Encrypt ACME private keys and deactivated accounts.
  • Detecting affected keys: Detection added to badkeys. Open source tool installable via Python's package management. A list of SPKI SHA256 hashes of affected keys shared. Detection based on incomplete data initially.
  • Rant: Security products often source of vulnerabilities. Believing more attack surface increases security is wrong.
  • Script: A script to extract and decrypt passwords and private keys from Fortigate configuration files is available at github.com/hannob/forti/blob/main/fortipwkey.
阅读 7
0 条评论