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

hashID does not recognize werkzeug hash results #51

Open
asaf400 opened this issue Jun 21, 2021 · 1 comment
Open

hashID does not recognize werkzeug hash results #51

asaf400 opened this issue Jun 21, 2021 · 1 comment

Comments

@asaf400
Copy link

asaf400 commented Jun 21, 2021

hashID is unable to automatically detect the hash which is a result of the generate_password_hash function in the common werkzeug library \ module used by flask based apps,

As defined here:
https://github.com/pallets/werkzeug/blob/d2625f545f53252314aee0c36818f52a52f7d321/src/werkzeug/security.py#L172

Example result:

In [1]: from werkzeug.security import check_password_hash, generate_password_hash

In [2]: generate_password_hash('demo')
Out[2]: 'pbkdf2:sha256:150000$GeDI5o4S$79f2079efda1d5b3953f062cb14a404a30e9c0458992f44a109a2cad0916b2d7'

In [4]: check_password_hash('pbkdf2:sha256:150000$GeDI5o4S$79f2079efda1d5b3953f062cb14a404a30e9c0458992f44a109a2cad0916b2d7','demo')
Out[4]: True

In [8]: list(myhash.identifyHash('pbkdf2:sha256:150000$GeDI5o4S$79f2079efda1d5b3953f062cb14a404a30e9c0458992f44a109a2cad0916b2d7'))
Out[8]: []

Note that for the example I used it hash id as an import, but the shell registered command returns same results but more human readable: '[+] Unknown hash'

I have been trying to identify this type of hash for some time, luckily I was able to find the correct function following the app code import stack. app -> flask app builder --> werkzeug/security.py

I came across hashID recommended in various sources (mainly stack overflow questions) but it was unable to help this case..

@bburky
Copy link
Collaborator

bburky commented Jun 24, 2021

This project is no longer under active development. See #50 for some alternative tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants