3 ms·
You know it's bad when it's so bad that as I write this no one has even bothered talking about how bad storing MD5'd passwords is. This even proves they aren't
by jerf 2y ago
You know it's bad when it's so bad that as I write this no one has even bothered talking about how bad storing MD5'd passwords is. This even proves they aren't even so much as salting it, which is itself insufficient for MD5.
But that isn't even relevant when you can go traipsing through the SQL query itself just by asking; wouldn't matter how well the passwords were stored.
- AntonyGarand 2y agoThe md5 part of the sqli is added by the pentester, likely because they needed a call that would end in a parenthesis within the injection parameter
- 0x0 2y agoThe screenshot in the article shows MD5() is returned as part of the error message from the web server, so it is probably also a part of the original server-side query.
- tomsmeding 2y agoThere is already a call to MD5 in the original query; see the first image in the article, which they apparently obtained by submitting ' as the username: https://images.spr.so/cdn-cgi/imagedelivery/j42No7y-dcokJuNgXeA0ig/68274892-b9e5-485b-a7d5-b05ddfb57518/Untitled/w=3840,quality=90,fit=scale-down https://images.spr.so/cdn-cgi/imagedelivery/j42No7y-dcokJuNg...
- jerf 2y agoYup, and there we can see the password is just splatted in with no salt. 99%+ the password is an injection attack too, but one only needs one set of the keys to the kingdom to make the point, so the article never discusses getting in via password instead and the author may well never have checked, because it couldn't make things any worse.
- rachofsunshine 2y agoThis used to be a question on the Triplebyte interview almost verbatim, and a huge percentage of (even quite good) engineers got it wrong. I'd say probably <20% both salted and used a cryptographically-secure hash; MD5 specifically came up all the time. And keep in mind that we filtered substantially before this interview, so the baseline is even worse than that!
- rjh29 2y agoDamn. Using salts and avoiding MD5 in favour of SHA-1 was well known even around 2005. Rainbow tables were a thing even then.
- Cthulhu_ 2y agoHow are people still learning about basic MD5 for security twenty years later? Are the resources people use that old?
- wildrhythms 2y agoProbably because a lot of computer science programs are stuck in 90s era curricula and many don't teach web development whatsoever.
- Tainnor 2y agoUsing pure SHA for passwords is almost equally bad as MD5, because the biggest problem with these algorithms is their speed (MD5 is completely broken when it comes to collision resistance, of course, but that's not the main concern with passwords). Instead, you should use functions like bcrypt or PBKDF2, which are purposefully built for passwords.