Technique:Recognizing embedded keys and certificates
Appearance
| On this wiki | Facts · Code · Notes · Topics |
|---|
Checklist of byte patterns and strings that reveal keys, certificates and keystores inside executables, firmware and archives, with links to each container format.
Search order
- ASCII armor:
-----BEGIN(Format:PEM,OPENSSH PRIVATE KEYFormat:OpenSSH private key,PGPFormat:OpenPGP). - Binary keystores by magic at offset 0:
FE ED FE ED/CE CE CE CE(Format:Java KeyStore),openssh-key-v1\0after base64 decoding. - DER:
30 82 xx xxwith02 01 03next for PKCS#12 (Format:PKCS12), or nested30 82for a certificate (Format:ASN.1 DER and BER); search for the OID bytes2A 86 48 86 F7 0D 01 01 01(rsaEncryption) or2A 86 48 CE 3D 02 01(id-ecPublicKey). - Windows signatures: certificate table of a PE, see Format:PE (Portable Executable)/Authenticode.
This page covers recognition only; it does not describe extracting secrets from protected containers. Apple keychain and Android keystore files: Unverified, not examined.