fix(crypto): md5 is for the weak#753
Closed
IdkWhatAmIDoin wants to merge 1 commit into
Closed
Conversation
the core database was using md5 to hash, which is why?? i changed it to use password_hash() and password_verify() in login.php, MySQL/PGSQL.php, brute/impossible, captcha/impossible, and csrf/impossible.
| ('3','Hack','Me','1337',MD5('charley'),'{$avatarUrl}1337.jpg', NOW(), '0'), | ||
| ('4','Pablo','Picasso','pablo',MD5('letmein'),'{$avatarUrl}pablo.jpg', NOW(), '0'), | ||
| ('5','Bob','Smith','smithy',MD5('password'),'{$avatarUrl}smithy.jpg', NOW(), '0');"; | ||
| ('1','admin','admin','admin','\$2y\$12\$rf2N1mIKbZu9NZWRzY7FfOYtqLGCNB8aw78xkGGHQyP5ZY2LJIs6u','{$avatarUrl}admin.jpg', NOW(), '0'), |
| ('5','Bob','Smith','smithy',MD5('password'),'{$avatarUrl}smithy.jpg', NOW(), '0');"; | ||
| ('1','admin','admin','admin','\$2y\$12\$rf2N1mIKbZu9NZWRzY7FfOYtqLGCNB8aw78xkGGHQyP5ZY2LJIs6u','{$avatarUrl}admin.jpg', NOW(), '0'), | ||
| ('2','Gordon','Brown','gordonb','\$2y\$12\$JVFYv1SekB3U8vyzNfAxU.PXXF1vEFhR6v.9vDSe9q2eoTMEyrpGC','{$avatarUrl}gordonb.jpg', NOW(), '0'), | ||
| ('3','Hack','Me','1337','\$2y\$12\$CiOXblIO7H8Vd2eRRQAmIO6VDxVuqSGiTxs6zJ75juL.rQWNAqxby','{$avatarUrl}1337.jpg', NOW(), '0'), |
| ('3','Hack','Me','1337',MD5('charley'),'{$baseUrl}1337.jpg'), | ||
| ('4','Pablo','Picasso','pablo',MD5('letmein'),'{$baseUrl}pablo.jpg'), | ||
| ('5','bob','smith','smithy',MD5('password'),'{$baseUrl}smithy.jpg');"; | ||
| ('1','admin','admin','admin','\$2y\$12\$rf2N1mIKbZu9NZWRzY7FfOYtqLGCNB8aw78xkGGHQyP5ZY2LJIs6u','{$baseUrl}admin.jpg'), |
| ('5','bob','smith','smithy',MD5('password'),'{$baseUrl}smithy.jpg');"; | ||
| ('1','admin','admin','admin','\$2y\$12\$rf2N1mIKbZu9NZWRzY7FfOYtqLGCNB8aw78xkGGHQyP5ZY2LJIs6u','{$baseUrl}admin.jpg'), | ||
| ('2','Gordon','Brown','gordonb','\$2y\$12\$JVFYv1SekB3U8vyzNfAxU.PXXF1vEFhR6v.9vDSe9q2eoTMEyrpGC','{$baseUrl}gordonb.jpg'), | ||
| ('3','Hack','Me','1337','\$2y\$12\$CiOXblIO7H8Vd2eRRQAmIO6VDxVuqSGiTxs6zJ75juL.rQWNAqxby','{$baseUrl}1337.jpg'), |
Contributor
Author
|
i think i broke something in the lower tiers |
Contributor
Author
|
ok so the lower tiers are completely broken right now, they still use md5(). probably not good to merge right now |
Contributor
Author
|
btw, maintainer edits are onn |
Owner
|
This is a deliberately vulnerable app, that's why it uses md5. It doesn't affect the challenges but gives you something extra to play with if you dump the database. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summary
the core database was using md5 to hash, which is why?? i changed it to use password_hash() and password_verify() in login.php, MySQL/PGSQL.php, brute/impossible, captcha/impossible, and csrf/impossible.
what changed
md5(): replaced withpassword_hash()for the password shit, why would you use md5 for thatvarchar(32): md5 hash size LOL, increased to 255