开发者

Do you recognize this password hashing format?

开发者 https://www.devze.com 2023-04-03 13:19 出处:网络
I\'m trying to reverse-engineer a password scheme on a legacy PHP application, so I can port the passwords to a new system which will be replacing it. The application has passwords stored in two forma

I'm trying to reverse-engineer a password scheme on a legacy PHP application, so I can port the passwords to a new system which will be replacing it. The application has passwords stored in two formats, a newer and an older one. The newer one simply uses crypt() with salt. The older one doesn't seem to have any supporting code any more (at least not in version control), and no hint of what may have been used. I have one account in the old style for which I may know the password, but I don't know how to check it.

The password is stored in the following format:

$1$f1KtBi.v$nWwBN8CP3igfC3Emo0OB8/

It appears to be t开发者_StackOverflowhree fields, delimited by $: 1, f1KtBi.v, and nWwBN8CP3igfC3Emo0OB8/. The first field is always 1. The second and third fields always match the regular expression [a-zA-Z0-9/.]+. The second field always has 8 characters, the third field always has 22.

Have you seen this password storage scheme before? Any idea what hashing mechanism might have been used?


This is the output of the crypt()[docs] function.

The 1 means that it used the MD5 algo internally.


That's most likely produced with crypt(), especially with MD5:

CRYPT_MD5 - MD5 hashing with a twelve character salt starting with $1$

Good luck finding the salt.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号