Skip to content

Latest commit

 

History

History
41 lines (23 loc) · 1.04 KB

README.md

File metadata and controls

41 lines (23 loc) · 1.04 KB

Type Juggling - PHP

What's wrong ?

  • MD5 (deprecated cryptographic hash functions)
  • Loose comparison

That's all ?

How to pwned it ?

Try with a default password:

$ src/cli.php --password p4ssW0rD

Your are not authorized.

Try with "240610708" as password

$ src/cli.php --password 240610708

What do you should know ?

How to secure it ?

  • strict comparison (not enought, what about timming attack ?)
  • use password_hash(), password_verify() or hash_equals(). these functions are constant time. This makes it safe against timing attacks.
  • Use modern hash function such as argon2, scrypt or bcrypt.