Home CMS Tutorial PHPCMS The logic problem of PHPCMS vulnerability causes getshell

The logic problem of PHPCMS vulnerability causes getshell

Nov 21, 2019 am 09:23 AM
getshell phpcms loopholes

The logic problem of PHPCMS vulnerability causes getshell

About the repair problem of getshell caused by a certain logic problem in phpcms

简介:
1. 漏洞名称:phpcms某处逻辑问题导致getshell
2. 补丁文件:/phpcms/libs/classes/attachment.class.php
3. 补丁来源:云盾自研
4. 漏洞描述:phpcms的/phpcms/libs/classes/attachment.class.php中,对输入参数$ext未进行类型限制,导致逻辑漏洞的产生。
【注意:该补丁为云盾自研代码修复方案,云盾会根据您当前代码是否符合云盾自研的修复模式进行检测,如果您自行采取了
底层/框架统一修复、或者使用了其他的修复方案,可能会导致您虽然已经修复了改漏洞,云盾依然报告存在漏洞,遇到该情况
可选择忽略该漏洞提示】
…
阿里云漏洞提示。
Copy after login

Solution:

1. According to the vulnerability description, find the corresponding location of the corresponding file attachment.class.php (near line 144), and add the patch code.

The patch code is as follows:

if($ext !== 'gif|jpg|jpeg|bmp|png'){
    if(!in_array(strtoupper($ext),array('JPG','GIF','BMP','PNG','JPEG'))) exit('附加扩展名必须为gif、jpg、jpeg、
    bmp、png');
}
Copy after login

The added code, the screenshot is as follows:

The logic problem of PHPCMS vulnerability causes getshell

2. Then, copy the modified file, Upload to the corresponding file location on the server and overwrite it directly;

3. Finally, log in to the Alibaba Cloud backend and click Verify (screenshot below) to complete the vulnerability repair.

The logic problem of PHPCMS vulnerability causes getshell

The above is all about the repair of the "logical problem somewhere in phpcms causing getshell" vulnerability.

PHP Chinese website, a large number of free PHPCMS tutorials, welcome to learn online!

The above is the detailed content of The logic problem of PHPCMS vulnerability causes getshell. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to reproduce the EyouCMS V1.5.1 front-end getshell vulnerability How to reproduce the EyouCMS V1.5.1 front-end getshell vulnerability May 20, 2023 pm 08:14 PM

Introduction to 0x00 vulnerability Zanzan Network Technology EyouCMS (EyouCMS) is an open source content management system (CMS) based on ThinkPHP of China Zanzan Network Technology Company. Eyoucmsv1.5.1 and previous versions have arbitrary user background login and file inclusion vulnerabilities. This vulnerability allows an attacker to set an administrator's session in the foreground by calling the API, and the background remote plug-in download file contains getshell. 0x01 affected version EyouCMS

Example analysis of Spring Boot Actuator's unauthorized access to getshell Example analysis of Spring Boot Actuator's unauthorized access to getshell May 23, 2023 am 08:56 AM

The boss of the preface department dug up this vulnerability in a certain src. It was an old hole. I thought it was interesting, so I set up a local environment to test it. Actuator is a functional module provided by springboot for introspection and monitoring of application systems. With the help of Actuator, developers can easily view and collect statistics on certain monitoring indicators of the application system. When Actuator is enabled, if relevant permissions are not controlled, illegal users can obtain monitoring information in the application system by accessing the default actuator endpoints, leading to information leakage or even server takeover. As shown above, the actuator is springb

Jailbreak any large model in 20 steps! More 'grandma loopholes' are discovered automatically Jailbreak any large model in 20 steps! More 'grandma loopholes' are discovered automatically Nov 05, 2023 pm 08:13 PM

In less than a minute and no more than 20 steps, you can bypass security restrictions and successfully jailbreak a large model! And there is no need to know the internal details of the model - only two black box models need to interact, and the AI ​​can fully automatically defeat the AI ​​and speak dangerous content. I heard that the once-popular "Grandma Loophole" has been fixed: Now, facing the "Detective Loophole", "Adventurer Loophole" and "Writer Loophole", what response strategy should artificial intelligence adopt? After a wave of onslaught, GPT-4 couldn't stand it anymore, and directly said that it would poison the water supply system as long as... this or that. The key point is that this is just a small wave of vulnerabilities exposed by the University of Pennsylvania research team, and using their newly developed algorithm, AI can automatically generate various attack prompts. Researchers say this method is better than existing

What are the background administrator rights of Getshell in ZenTao 12.4.2? What are the background administrator rights of Getshell in ZenTao 12.4.2? May 16, 2023 pm 03:43 PM

0x00 Introduction ZenTao is a professional domestic open source R&D project management software that integrates product management, project management, quality management, document management, organizational management and transaction management, completely covering the core processes of R&D project management. The management idea is based on the internationally popular agile project management method - Scrum. On the basis of following its values, combined with the current status of domestic project research and development, it integrates multiple functions such as task management, demand management, bug management, use case management, etc., covering software from planning to to the entire life cycle of a release. 0x01 Vulnerability Overview ZenTao version 12.4.2 has an arbitrary file download vulnerability. This vulnerability is because the filtering in the download method in the client class is not strict and ftp can be used to download files.

Buffer overflow vulnerability in Java and its harm Buffer overflow vulnerability in Java and its harm Aug 09, 2023 pm 05:57 PM

Buffer overflow vulnerabilities in Java and their harm Buffer overflow means that when we write more data to a buffer than its capacity, it will cause data to overflow to other memory areas. This overflow behavior is often exploited by hackers, which can lead to serious consequences such as abnormal code execution and system crash. This article will introduce buffer overflow vulnerabilities and their harm in Java, and give code examples to help readers better understand. The buffer classes widely used in Java include ByteBuffer, CharBuffer, and ShortB

How to solve common file upload vulnerabilities in PHP language development? How to solve common file upload vulnerabilities in PHP language development? Jun 10, 2023 am 11:10 AM

In the development of web applications, the file upload function has become a basic requirement. This feature allows users to upload their own files to the server and then store or process them on the server. However, this feature also makes developers need to pay more attention to a security vulnerability: the file upload vulnerability. Attackers can attack the server by uploading malicious files, causing the server to suffer varying degrees of damage. PHP language is one of the languages ​​widely used in web development, and file upload vulnerabilities are also one of the common security issues. This article will introduce

The OpenAI DALL-E 3 model has a vulnerability that generates 'inappropriate content.' A Microsoft employee reported it and was slapped with a 'gag order.' The OpenAI DALL-E 3 model has a vulnerability that generates 'inappropriate content.' A Microsoft employee reported it and was slapped with a 'gag order.' Feb 04, 2024 pm 02:40 PM

According to news on February 2, Shane Jones, manager of Microsoft’s software engineering department, recently discovered a vulnerability in OpenAI’s DALL-E3 model, which is said to be able to generate a series of inappropriate content. Shane Jones reported the vulnerability to the company, but was asked to keep it confidential. However, he eventually decided to disclose the vulnerability to the outside world. ▲Image source: Report disclosed by ShaneJones. This site noticed that ShaneJones discovered through independent research in December last year that there was a vulnerability in the DALL-E3 model of OpenAI text-generated images. This vulnerability can bypass the AI ​​Guardrail (AIGuardrail), resulting in the generation of a series of NSFW inappropriate content. This discovery attracted widespread attention

Comma operator vulnerabilities and protective measures in Java Comma operator vulnerabilities and protective measures in Java Aug 10, 2023 pm 02:21 PM

Overview of Comma Operator Vulnerabilities and Defense Measures in Java: In Java programming, we often use the comma operator to perform multiple operations at the same time. However, sometimes we may overlook some potential vulnerabilities of the comma operator that may lead to unexpected results. This article will introduce the vulnerabilities of the comma operator in Java and provide corresponding protective measures. Usage of comma operator: The syntax of comma operator in Java is expr1, expr2, which can be said to be a sequence operator. Its function is to first calculate ex

See all articles