|
Message-ID: <49771A9F.3090309@nlcc.us> Date: Wed, 21 Jan 2009 06:52:47 -0600 From: Billy Newsom <billy@...c.us> To: john-users@...ts.openwall.com Subject: Re: md5 hash with a salt? Format? Solar Designer wrote: > On Wed, Jan 21, 2009 at 05:10:08AM -0600, Billy Newsom wrote: >> My plaintext password might be "silly" and the salt was 4d. >> >> So if we ran >> %md5 -s '4dsilly' >> MD5 ("4dsilly") = 396df9c93be5ec566810be9dfbae7b4f >> >> Okay, how in the world do I get john to run that? What should my password >> file look like, and which md5 option do I tell it to use? > > I am not aware of an existing patch for JtR to crack salted raw MD5 > hashes (with the salt prepended or appended to the password), although > it would be trivial to make one. For this reason, when this question > was raised before, I recommended to use an external filter() along with > the existing raw MD5 patch (or rather, with the jumbo patch, since it > includes that): > > http://www.openwall.com/lists/john-users/2008/02/03/9 I think since I am using a port via FreeBSD ports, that many of those patches are applied already. > > For your specific example, you may use: > > [List.External:PrependSalt] > void filter() > { > int i; > > i = 0; while (word[i++]); // determine the length (plus one) > while (i--) word[i + 2] = word[i]; // make room for the salt > // prepend the salt > word[0] = '4'; > word[1] = 'd'; > } That's nifty, but it of course means that if I had a password file of 20 passwords and 20 different salts, then I would need to run john 20 times. This is a great start, no doubt, but obviously a patch or hack will allow the issue to be taken care of more elegantly. I hope this is the start of some interest in md5, since it is going to be a good arena in the next few years before it eventually disappears. Incidentally, I tried this and it sort of worked some of the time. Username:4d:396df9c93be5ec566810be9dfbae7b4f %john --format=raw-MD5 passfile And JtR found some simple test cases, but it was not working I don't think as good with a file having 4 lines. For some reason, it came up with only 3 passwords to crack. Loaded 3 password hashes with no different salts (Raw MD5 [raw-md5]) I did realize on caveat. All I really would have to do for an advanced crack is to prepend the "4d" or whatever the salt is to each word in the wordlist. Trivial, I suppose, but I don't know the sed command to do it, at least not without doing some rtfm. Same problem is that we need to do that sort of change for each salt. And the good news is that I need to crack just one password as it stands right now, so I will happily chug along with what you provided. I guess I need to see the Wiki. I am running blind as it is now. Thanks! -- To unsubscribe, e-mail john-users-unsubscribe@...ts.openwall.com and reply to the automated confirmation request that will be sent to you.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.