-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add a section for checking if the web application properly hashes passwords before storing them in the backend. #728
Comments
Are you able to provide me a scenario where it might be a direct attack vector against web? |
Yes I totally agree to @pinkLagoon. If the organization faces a data breach or even an insider threat scenario, the hashed passwords would be a second layer of security which could at least reduce the impact of the breach. |
We are clear on the need and purpose of hashing passwords. My question comes around: I am doing a penetration test, how can I know how the password is being handled? (maybe timing attacks to see how much server resources are being used, etc.) -- different attacks that evolved into sensitive data disclosure. This is one of the "The only way to review this is to code review it". Otherwise, a testing body doesn't have access to the code, there is no way to know about this (unless they got RCE, SQLi, data dumps, etc.) @kingthorin this can maybe be added to the cryptography section, but then we'd be colliding with the Password Storage Cheat Sheet. This is an ASVS requirement and have its own cheat sheet, I am debating how the WSTG could actually add anything beneficial to this. @elarlang @rbsec if you have any thoughts on this, they're more than welcome :) |
The only way I can see that this might fit in is if the tester were to come across one of the few remaining systems that in 2021+ still emails users their passwords in plaintext when they use "Forgot Password" (which obviously implies they are stored as such). |
As @kingthorin, the only really reliable way to determine that they're not hashing passwords is if they ever send you an existing clear text password. This is probably something that should be highlighted in the password reset testing guidance. At the moment it says:
But that's not really reliable - the flow could be:
Timing attacks are unlikely to be feasible from a blackbox perspective (especially given how fast MD5 is). You could maybe learn they're using specific hashes in a few cases (like the Bcrypt length issues) - but this could also just be truncation. I absolutely agree that this is an issue, but 99% of the time it's not one you'll find in a pentest (unless you can find other issues such as SQLi or arbitary file download). Unless you've got code and are also doing some code review/whitebox testing - but that seems a bit out of scope of the guide? |
Thinking about this, there's a somewhat related issue about magic hashes that you can test for from a blackbox perspective. It's more about hash comparison than the specific algorithm used, although if they are vulnerable then it probably implies they're using a weaker algorithm (as any has that starts with a Is that something that would be worth adding? |
This "magic hashes" or "PHP type juggling" is something worth testing, but test-result can be only verified incorrect situation. It also requires, that there is mistake in PHP program code (if hashes are compared correctly, there is no problem with linked hashes). I could not take it in as hashing testing. |
Please comment if you are still working on this issue, as it has been inactive for 30 days. To give everyone a chance to contribute, we are releasing it to new contributors. |
Please comment if you are still working on this issue, as it has been inactive for 90 days. To give everyone a chance to contribute, we are releasing it to new contributors. |
Please comment if you are still working on this issue, as it has been inactive for 90 days. To give everyone a chance to contribute, we are releasing it to new contributors. |
What would you like added?
Sometimes web applications do not hash their passwords before storing them. It should be rare these days but I've come across this a few times and could not find an appropriate WSTG item that matches this finding. This seems like a very important thing to be checking for especially if you have access to the source code of the application.
The text was updated successfully, but these errors were encountered: