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 【