1
0
Fork 0
mirror of https://github.com/swisskyrepo/PayloadsAllTheThings.git synced 2024-05-21 15:26:02 +02:00

Added a brief overview for type juggling

This commit is contained in:
@cnagy 2020-10-25 19:19:44 +00:00 committed by GitHub
parent fa497c2149
commit ec445110d6
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,8 @@ PHP provides two ways to compare two variables:
- Loose comparison using `== or !=` : both variables have "the same value".
- Strict comparison using `=== or !==` : both variables have "the same type and the same value".
PHP type juggling vulnerabilities arise when loose comparison (== or !=) is employed instead of strict comparison (=== or !==) in an area where the attacker can control one of the variables being compared. This vulnerability can result in the application returning an unintended answer to the true or false statement, and can lead to severe authorization and/or authentication bugs.
## Type Juggling
### True statements
@ -101,4 +103,4 @@ var_dump(sha1('aaO8zKZF') == sha1('aa3OFF9m'));
* [Writing Exploits For Exotic Bug Classes: PHP Type Juggling By Tyler Borland](http://turbochaos.blogspot.com/2013/08/exploiting-exotic-bugs-php-type-juggling.html)
* [Magic Hashes - WhieHatSec](https://www.whitehatsec.com/blog/magic-hashes/)
* [PHP Magic Tricks: Type Juggling](https://owasp.org/www-pdf-archive/PHPMagicTricks-TypeJuggling.pdf)
* [PHP Magic Tricks: Type Juggling](https://owasp.org/www-pdf-archive/PHPMagicTricks-TypeJuggling.pdf)