Skip to content

fix(crypto): md5 is for the weak#753

Closed
IdkWhatAmIDoin wants to merge 1 commit into
digininja:masterfrom
IdkWhatAmIDoin:fix/impossible-md5-passwords
Closed

fix(crypto): md5 is for the weak#753
IdkWhatAmIDoin wants to merge 1 commit into
digininja:masterfrom
IdkWhatAmIDoin:fix/impossible-md5-passwords

Conversation

@IdkWhatAmIDoin

Copy link
Copy Markdown
Contributor

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 with password_hash() for the password shit, why would you use md5 for that
varchar(32): md5 hash size LOL, increased to 255

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'),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just bcrypt

('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'),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just bcrypt

('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'),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just bcrypt

('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'),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just bcrypt

@IdkWhatAmIDoin

Copy link
Copy Markdown
Contributor Author

i think i broke something in the lower tiers

@IdkWhatAmIDoin

Copy link
Copy Markdown
Contributor Author

ok so the lower tiers are completely broken right now, they still use md5(). probably not good to merge right now

@IdkWhatAmIDoin

Copy link
Copy Markdown
Contributor Author

btw, maintainer edits are onn

@digininja

Copy link
Copy Markdown
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.

@digininja digininja closed this May 28, 2026
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

Successfully merging this pull request may close these issues.

3 participants