Skip to content

zzq66/cve4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

NAME OF AFFECTED PRODUCT(S):zzcms AFFECTED AND/OR FIXED VERSION(S):zzcms2023 PROBLEM TYPE:File Upload; Impact:Arbitrary code execution; DESCRIPTION:ZZCMS 2023 has a file upload vulnerability in 3/E_bak5.1/upload/index.php, allowing attackers to exploit this vulnerability to gain server privileges and execute arbitrary code.

First, download the latest version of zzcms: image

Login to the admin panel using the default username and password: admin admin.

Click on "Backup Data." image

Choose one of the database tables for backup. image

Capture the request using Burp Suite. image

Modify the "tablename" field to "eval($_POST[1])." image

Click on "View Backup Instructions." image image

Change the file name to "config.php" and modify the post parameter content to "1=phpinfo();"

Now, a one-liner PHP webshell is uploaded to the backend. image image

Vulnerability Code Analysis: The "phonebak.php" file takes $_POST as a parameter, meaning it's user-controllable. image

The "tablename" parameter is passed to the $tablename variable. image

Later, the tablename is formatted into a string in the form of $tb[".$tablename[$i]."]=0: image

There is no single quote around "tablename," and no corresponding escaping or filtering operations are performed. This allows the $string to be written into a PHP file along with other content, ultimately leading to Remote Code Execution (RCE). image

Mitigation Measures:

Disable the backup module. Implement character filtering and relevant escaping operations on the $tablename variable.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published