How to Improve the permissions of Alibaba Cloud cmseasy and the getShell kill Vulnerability

Source: Internet
Author: User

Comments: When a registered user of the enterprise website system (cmseasy) updates the data and constructs a groupid form locally (the Administrator is deemed to have 888 permissions), the user can directly escalate the form to administrative permissions, getShell can be used in multiple places in the background, as long as the registration is enabled to kill details:

SQL _update ($ tbname, $ row, $ where) function of the vulnerability file in table. php
 
Function SQL _update ($ tbname, $ row, $ where ){
$ Sqlud = '';
If (is_string ($ row ))
$ Sqlud = $ row .'';
Else
Foreach ($ row as $ key => $ value ){
If (in_array ($ key, explode (',', $ this-> getcolslist ()))){
$ Value = addslashes ($ value );
If (preg_match ('/^ \ [(. *) \] $/', $ value, $ match ))
$ Sqlud. = "'$ key'". "=". $ match [1]. ",";
Elseif ($ value = "")
$ Sqlud. = "'$ key' = NULL ,";
Else
$ Sqlud. = "'$ key'". "='". $ value ."',";
}
}
$ Sqlud = rtrim ($ sqlud); www.jb51.net
$ Sqlud = rtrim ($ sqlud ,',');
$ This-> condition ($ where );
$ SQL = "Update'". $ tbname. "'set". $ sqlud. "WHERE". $ where;
Return $ SQL;
}
 
The POST value is traversed cyclically and directly written to the database for update, so that the user can customize the permission to determine the field
Privilege Escalation Vulnerability
Vulnerability proof: Registered User Name
 
Edit Materials
 
 
 
Get management permissions (ps: superb background)
 
 
 
GetShell
 
 


 
Solution:

Do not place the front-end users and common members in a table to escalate any permissions. Cancel the SQL _update function in table. php or filter the table.

You can temporarily disable registration.

Author CodePlay 【

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.