source-trace / beescms

PHP+MYSQL,多语言系统,内容模块易扩展,模板风格多样化,模板制作简单功能强大,专业SEO优化,后台操作方便,完全可以满足企业网站、外贸网站、事业单位、教育机构、个人网站使用。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

There is a file upload vulnerability so that the webshell can be obtained

R0both opened this issue · comments

Let's take a look at the code
图片
Because the system does not strictly filter and restrict the pictures uploaded by users, resulting in file upload vulnerabilities. From the code, it can be seen that only the size of the picture and the Content-Type and so on are verified during the upload, so only need to modify the Content-Type to bypass Upload.
After the administrator logged in, open the following one page.
图片
Upload php.php and grab the package to modify the Content-Type to "image/jpg"
图片
Then we can see that php.php was successfully uploaded.
Then we access the uploaded file
图片