I need to extract a password from a hash. This hash was generated by prepending and appending two different predefined strings to the password:


Given both predefined strings and the resultant hash of the concatenation, is it possible to use a tool such as rtgen to create a rainbow table based on knowledge of these strings?

  • 1
    Do you only want to unhash one password? Then creating a rainbow table is pointless – Longpoke Feb 7 '13 at 20:55

You would have to either find a tool which already handles exactly this kind of hashing, or modify one to suit your needs. For instance, this project seems to contain an opensource rainbow table generation implementation.

Of course, such a table would be produced for specific values of "PredefinedText1" and "PredefinedText2" and would be useless to attack hashes which were computed with distinct text values. If you have only one password to crack, or if you have several but all in one go, then it would be more efficient to do a direct dictionary attack on the password. Rainbow tables, like all kinds of precomputed tables, are interesting only if you plan to attack several hashes at distinct times.

| improve this answer | |
  • Great suggestion. I decided to find an opensource project (mrtg) and modify it for my needs.. – Lexicon Feb 7 '13 at 21:27

This should be an easy change. The reduction function is almost always variable in some way so you can select whether you're reducing to all number, varying letters and symbols, etc. All you have to do is a last line before the reduction function returns which includes concatenating your starting and ending strings.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.