-4

I have an encrypted RSA key which needs a pass-phrase to unlock. I have forgotten the pass-phrase, but I remember that there are only 6 digits in that pass-phrase. I think brute-forcing it would give me the pass-phrase.

Thanks for your help iabdhv liasbv

janechii
  • 1,055
  • 1
  • 11
  • 26
Kickstand
  • 21
  • 1
  • 1
  • 6
  • 1
    Since your question is tagged "john-the-ripper" it sounds like you're asking for help with using that program to brute-force the passphrase, not with writing a program of your own to do it. That sort of thing is off-topic here; StackOverflow is specifically for programming questions. – Wyzard Jul 09 '17 at 06:18
  • Why so much hate and downvotes? Bruteforce is done programatically and John-The-Ripper is a good tool to add in your bruteforce code. – Cyborg Feb 11 '20 at 03:17

1 Answers1

1

Well you could google for this and as in the comment the tag john the ripper was mentioned, but is not there anymore, I still assume that you initially wanted to use jtr. A manual is given here.

It's basic steps are:

  1. Download and compile the Jumbo version of John the Ripper from Github.

  2. Use gpg2john to convert your rsa_key to a jtr understandable format refered as file1 now.

  3. Use john --incremental file1 to start jtr in brute-force mode.

Note however that the third step will make jtr also use chars and not only digits. You could change this by via settings in the config or you could simply create a small script to generate a password list with all possible passwords.

for number1 in range(0,9):
  for number2 in range(0,9):
    for number3 in range(0,9):
      for number4 in range(0,9):
        for number5 in range(0,9):
          for number6 in range(0,9):
            print str(number1) + str(number2) + str(number3) + str(number4) + str(number5) + str(number6) 

And then start this script on linux using python scriptname.py > passwords.txt after it terminated start jtr using the following command: john --wordlist=passwords.txt file1

Sebastian Walla
  • 1,104
  • 1
  • 9
  • 23