taocms icon indicating copy to clipboard operation
taocms copied to clipboard

A malicious file upload vulnerability exists in File.php of the file management function module.

Open metaStor opened this issue 3 years ago • 0 comments

This is the latest 3.0.2 version of taocms.

Organize and utilize steps in two steps:

Step1: Audit the source code E:\xxx\taocms-3.0.2\include\Model\File.php, line 96, and find that there may be arbitrary new files vulnerability: a

Follow up $this->realpath and find that it comes from $this->path, and $this->path can be passed in through the get parameter (where SYS_ROOT is the root directory of the website): b

Here you can construct the request package for the new test.php file: c

New test.php is successfully created: d

Step2: It is also the E:\xxx\taocms-3.0.2\include\Model\File.php file. It is found in line 77 that there may be an arbitrary file writing vulnerability: e

The written content $_POST['filedata'] and the written target file $this->realpath (mentioned above) are all controllable, so the data packet is constructed and written to the webshell: f

Successful connection to webshell g h

metaStor avatar Jan 19 '22 07:01 metaStor