Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PBKDF2-HMAC-* not recognized #160

Closed
4 tasks done
lap1nou opened this issue Oct 12, 2023 · 13 comments · Fixed by #165
Closed
4 tasks done

PBKDF2-HMAC-* not recognized #160

lap1nou opened this issue Oct 12, 2023 · 13 comments · Fixed by #165
Labels
bug Something isn't working enhancement enhance an existing feature
Milestone

Comments

@lap1nou
Copy link

lap1nou commented Oct 12, 2023

Hello,

Thank you for this amazing tool.

I think hash of type PBKDF2-HMAC-* is not recognized, for example the hash mode 11900 of hashcat:

haiti -e 'md5:1000:MTg1MzA=:Lz84VOcrXd699Edsj34PP98+f4f3S0rTZ4kHAIHoAjs='

# Unknown hash type
  • PBKDF2-HMAC-MD5 (11900)
  • PBKDF2-HMAC-SHA1 (12000)
  • PBKDF2-HMAC-SHA256 (10900)
  • PBKDF2-HMAC-SHA512 (12100)

Regards.

@github-actions
Copy link

Hey, thank you for opening this issue! 🙂 To boost priority on this issue and support open source please tip the team at https://issuehunt.io/r/noraj/haiti/issues/160

@noraj
Copy link
Owner

noraj commented Oct 12, 2023

Where those hash are coming from? Which software and version? The format don't seem common.

Not supported yet:

  • PBKDF2-HMAC-MD5 (HC 11900)
  • PBKDF2-HMAC-SHA1 (HC 20400)
  • PBKDF2-HMAC-SHA512 (HC 12100)

Supported:

  • PBKDF2-HMAC-SHA1 (JtR pbkdf2-hmac-sha1)
  • PBKDF2-HMAC-SHA256 (JtR pbkdf2-hmac-sha256 + django, vbox, cisco, etc.)
  • PBKDF2-HMAC-SHA256 (HC 10900 (PHP))
  • PBKDF2-HMAC-SHA512 (HC 7100 (OSX) JtR pbkdf2-hmac-sha512)

@noraj noraj added bug Something isn't working enhancement enhance an existing feature labels Oct 12, 2023
@lap1nou
Copy link
Author

lap1nou commented Oct 12, 2023

Hey @noraj,

I saw one of them being used by this: https://werkzeug.palletsprojects.com/en/3.0.x/utils/#module-werkzeug.security.

@noraj
Copy link
Owner

noraj commented Oct 12, 2023

Ok I'll check if it's python hashlib format or if it's werkzeug that is formating them this way.

@noraj
Copy link
Owner

noraj commented Oct 14, 2023

hashlib by itself format classical format either in hex or raw binary

>>> import hashlib
>>> hashlib.pbkdf2_hmac('md5', b'password', b'bad salt' * 2, 500_000).hex()
'07fbc83dbfa2c08236c1fb59a56e58ef'

werkzeug use this format

>>> import werkzeug
>>> werkzeug.security.generate_password_hash('password', method='pbkdf2:md5', salt_length=16)
'pbkdf2:md5:600000$KeQ0sF2wqnb9UI5Z$9cc66c4bde295ec5d5ed1417cd36aa1b'

So could you tell me more about where does this hash come from? Because the format doesn't match.

@noraj
Copy link
Owner

noraj commented Oct 23, 2023

I added a lot of new formats and enhanced existing ones related to PBKDF2 in this branch: https://github.com/noraj/haiti/compare/noraj/pbkdf2?expand=1

There is still some work:

  • fix
    • PBKDF2-SHA512(Generic) / HC 20200
    • Telegram Desktop >= v2.1.14 (PBKDF2-HMAC-SHA512) / HC 24500
  • add
    • Web2py pbkdf2-sha512 / HC 21600
    • Telegram Desktop < v2.1.14 (PBKDF2-HMAC-SHA1) / HC 22600
    • VMware VMX (PBKDF2-HMAC-SHA1 + AES-256-CBC) / HC 27400
    • ENCsecurity Datavault (PBKDF2) / HC 29910 / 29920
    • werkzeug format
  • verify
    • HC 20300
    • HC 20400
    • Telegram Mobile App Passcode (SHA256) / HC 22301 (not related to PBKDF2)
    • telegram JtR

@noraj noraj added this to the 2.0.0 milestone Oct 23, 2023
@noraj noraj mentioned this issue Oct 24, 2023
@lap1nou
Copy link
Author

lap1nou commented Oct 24, 2023

@noraj Thank you really much, sorry I couldn't help you I had a lot of work this week, hope I can contribute someday.

Regards.

@noraj
Copy link
Owner

noraj commented Oct 24, 2023

@lap1nou Do you want me to assign you #162?

@lap1nou
Copy link
Author

lap1nou commented Oct 26, 2023

@noraj I can try to propose some changes yup.

@noraj
Copy link
Owner

noraj commented Oct 26, 2023

About PBKDF2?

@lap1nou
Copy link
Author

lap1nou commented Oct 26, 2023

About #162.

@noraj
Copy link
Owner

noraj commented Oct 26, 2023

Yeah please do. Make a comment on it so I can assign it to you.

@noraj
Copy link
Owner

noraj commented Oct 28, 2023

@lap1nou I would like to release 2.0.0 this weekend, so I'll manage #162 myself as I see on your fork that you don't have a WPA branch yet. So please don't start to work on it. If you want to add some new types, please look at uncommon hash types on https://hashcat.net/wiki/doku.php?id=example_hashes and check if they exist in prototypes.json. Thanks for wanting to help ;)

Update: I tagged #162 for 2.0.1 milestone so please feel free to work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement enhance an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants