• Rob's side project: I recently started Gun-Forums.com and we currently have a $100 raffle - if you're into guns, join up and enter the raffle to win $100.00. Gun Forums

Manual conversion of shadow file modified base-64 hash to hex


New Member
Hi all, I'm trying to figure out how I can manually convert the hashes stored in the shadow file to hex so I can paste them into online rainbow tables.
The bits of information I have found so far are:
The salt is stored as plaintext in the shadow file
The hash is generated from this salt+supplied password
The hash in the shadow file is stored in a modified version of Base64 (Crypt() encoding)
Here is the problem using MD5 as an example:
1. Generate an MD5 hash using an online tool such as: https://www.md5hashgenerator.com/
2. Type in the plaintext 'passwordpassword' and the md5 hash for this is: 9dbb300e28bc21c8dab41b01883918eb
3. Converting this hex value to MIME Base-64 using an online too gives you: nbswDii8IcjatBsBiDkY6w==
4. In Linux type: mkpasswd -m md5 -S password -R 1 password
From my understanding, the line above will create an md5 hash of the salt 'password' + the supplied password
of 'password' (so passwordpassword). The -R 1 ensures that the algorithm is only run once.

5. The output of the above command is: $1$password$Da2mWXlxe6J7jtww12SNG/

So the comparison between the hashes for the two different outputs is:

Even if you were to change each character around due to different characters being used in base-64, it still doesn't add up. For example the 6th and 7th characters in 'nbswDii8IcjatBsBiDkY6w==' are both 'i's so you would assume that both the 6th and 7th characters in 'Da2mWXlxe6J7jtww12SNG/' would both be the same character, but they're not (They are 'Xl' in this case).

Anyone know what I'm missing here?


New Member
I think I figured something out - we can't just substitute each character out like that with base64.
Could still do with knowing how to translate the shadow file hashes to hex values that I can then just bang in a rainbow table though.

Members online

Latest posts