|
| 1 | +# John the Rocker (Category: Cryptography) |
| 2 | +The challenge is the following, |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | +And we are given [idrsa.id_rsa.docx](./files/idrsa.id_rsa.docx). I tried opening this on Word, but gave me the following error, |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | +So I converted this to a .txt file and put it into [idrsa.id_rsa.txt](./files/idrsa.id_rsa.txt). After converting it to a .txt file, the contents were visible, |
| 11 | + |
| 12 | +``` |
| 13 | +-----BEGIN RSA PRIVATE KEY----- |
| 14 | +Proc-Type: 4,ENCRYPTED |
| 15 | +DEK-Info: AES-128-CBC,115D424076ADCE7E40ACC1E44E4E791A |
| 16 | + |
| 17 | +flkT1+aCoQZ4YBHg2VRW3x4HzlEKFwqQ+ePMzEi2BIREHXDtHR1+QUrYRSQLzP4E |
| 18 | +jDSkmPWPoTvTXRAyXKrQL8FzkvYDcP9hjkzt41tjsRHz2nkI9K+WFm8DNi6qVS9H |
| 19 | +J/yWZdvUED6XwwxTFe6D01GwU7yc7xheE4GlIBazk68Q0tNuH34H8T+hnfkTyNA6 |
| 20 | +BJL861zNhZNIoWm/352vYydnT/HynugCGn+TIu88C+tLBpcLdLSh50OgTiZ8QK2A |
| 21 | +Z82PoPfD1ziVmg7E4BIY1/1qJnNxCMTzUG4PbjLpdkRxHu5aOGzbGZK4K0inDNfr |
| 22 | +B7ZedUOCSUTN0VGl5/spDO506vSOjzGL9/iDhYNBRvn4hW3VlPE6nRXAQ78r4Z49 |
| 23 | +ou0r2x7WvzrpFOPXjvlNHUFyWF9x5ZWsqNnr3PFL2wlCVvGq2z/mWvFdmy0tr6nV |
| 24 | +FjEpOwrKMt0hvTcCwry8FKAyPDFafpZq4fg90Jd9xCYWJIZMxuEPOY0jfcSC7QOy |
| 25 | +woOhMMCFA3mbJJWOAOKynZdx/7fe/0+Q0XMlljDNXNGNqKRqS9OUhKH967FYxw4W |
| 26 | +AQHrN2NdT5WoXJhbDu67Z2jb89LAFR+uBlaxauLS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9tZSCG5cdRq+r1ROF30QnvnUowsbq0eeT4TVfb+kCaHx |
| 42 | +-----END RSA PRIVATE KEY----- |
| 43 | +
|
| 44 | +``` |
| 45 | + |
| 46 | +Therefore, this was a RSA private key and I assumed the objective was to crack this RSA private key. Also, the name of the challenge was `John the Rocker`, so I assumed that this was a reference to `John the Ripper` and I had to use John the Ripper to crack the RSA private key. |
| 47 | + |
| 48 | + |
| 49 | +I first made the hash file of [idrsa.id_rsa.txt](./files/idrsa.id_rsa.txt) using, |
| 50 | + |
| 51 | +`$ ssh2john idrsa.id_rsa.txt > hashidrsa.hash` |
| 52 | + |
| 53 | +Then specified [rockyou.txt](https://github.com/praetorian-inc/Hob0Rules/blob/master/wordlists/rockyou.txt.gz) as the wordlist using, |
| 54 | + |
| 55 | +`$ john hashidrsa.hash -wordlist=rockyou.txt` |
| 56 | + |
| 57 | +After a few minutes, John the Ripper found the password, which was `!!**john**!!` |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | +The challenge didn't have any further instructions, so I assumed that the flag would be, |
| 62 | + |
| 63 | +`vishaCTF{!!**john**!!}` |
| 64 | + |
| 65 | +and submitting it confirmed that this was the flag. |
0 commit comments