Walkthru:
A. https://cowsayroot.com/walkthrough-covfefe/ [to crack passphrase from SSH private key, mini buffer overflow, buf[20] adding /bin/bash after 20 character ]
Notes:
http://www.cables.ws/cracking-rsa-private-key-passphrase-with-john-the-ripper/ [to crack passphrase from SSH private key]
1. Here is an example of what an SSH private key looks like.
A. https://cowsayroot.com/walkthrough-covfefe/ [to crack passphrase from SSH private key, mini buffer overflow, buf[20] adding /bin/bash after 20 character ]
Notes:
http://www.cables.ws/cracking-rsa-private-key-passphrase-with-john-the-ripper/ [to crack passphrase from SSH private key]
1. Here is an example of what an SSH private key looks like.
—–BEGIN RSA PRIVATE KEY—–
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,AEB88C140F69BF2074788DE24AE48D46
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,AEB88C140F69BF2074788DE24AE48D46
DbPrO78kegNuk1DAqlAN5jbjXv0PPsog3jdbMFS8iE9p3UOL0lF0xf7PzmrkDa8R
5y/b46+9nEpCMfTPhNuJRcW2U2gJcOFH+9RJDBC5UJMUS1/gjB/7/My00Mwx+aI6
……..
RUgZkbMQZNIIfzj1QuilRVBm/F76Y/YMrmnM9k/1xSGIskwCUQ+95CGHJE8MkhD3
—–END RSA PRIVATE KEY—–
5y/b46+9nEpCMfTPhNuJRcW2U2gJcOFH+9RJDBC5UJMUS1/gjB/7/My00Mwx+aI6
……..
RUgZkbMQZNIIfzj1QuilRVBm/F76Y/YMrmnM9k/1xSGIskwCUQ+95CGHJE8MkhD3
—–END RSA PRIVATE KEY—–
2. In this case create the public/private key pair with a predictable password:
/usr/sbin/ssh2john ~/.ssh/id_rsa > id_rsa.hash
3. Next, all you need to do is point John the Ripper to the given file, with your dictionary:
/usr/sbin/john --wordlist=/usr/share/wordlists/rockyou.txt id_rsa.hash
Comments
Post a Comment