Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIZHICMS V2.5 has background Arbitrary File Downloads causing RCE #91

Open
Hehanzzz opened this issue Dec 10, 2023 · 2 comments
Open

JIZHICMS V2.5 has background Arbitrary File Downloads causing RCE #91

Hehanzzz opened this issue Dec 10, 2023 · 2 comments

Comments

@Hehanzzz
Copy link

Vulnerability recurrence:

  1. Construct a PHP sentence and then compress it in zip format through the compressed package

image

  1. Upload the zip to the VPS server and use python on the VPS to start an http service

image

  1. Log in to the website backend, find Extension Management -> Plug-in List, and search for an uninstalled plug-in to download in the operations on the right side of the page (and capture packets through Burp at the same time)

image

  1. Copy the URL of the compressed package file on the VPS, replace the download_url parameter with the zip link address on your VPS, and release the packet (but do not turn off interception, because there are still several packet URLs that need to be replaced)

image

Such as:

image

  1. Then repeat this operation to replace all the urls originally specified to down.jizhicms.cn

image

You can see that this request was returned on the VPS

image

  1. Then visit the vulnerable website, the directory is /app/admin/exts/ plus the file name of the PHP one-sentence Trojan constructed in the first step

image

Vulnerability analysis:
In the update method in the file located at app/admin/c/PluginsController.php, $remote_url does not perform a security check on the url, which allows any zip file to be downloaded remotely and decompressed as can be seen in the code behind.

image

According to the code on line 719, we can know that the downloaded and decompressed file is stored under app/admin/exts

image

@Hehanzzz
Copy link
Author

This vulnerability was reported by Hehanzzz

@chenjingruhai
Copy link

6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants