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

GNUboard SQL Injection

GNUboard SQL Injection
Posted Mar 14, 2014
Authored by Claepo Wang

GNUboard suffers from a remote SQL injection vulnerability in ajax.autosave.php.

tags | exploit, remote, php, sql injection
SHA-256 | 27ed72e6b9c12234ea050db92eeb684f66dbf2523f670b919e05fa9d75887ded

GNUboard SQL Injection

Change Mirror Download
==========================

Advisory: GNUboard SQL Injection Vulnerability
Author: claepo.wang@dbappsecurity.com.cn
Affected Version: GNUboard5(the latest version)
Vendor URL: http://sir.co.kr/
Vendor Status: Unfixed(I know little about Korean,so i do not know how to describe this vul to the vendor.)


==========================
Vulnerability Description
==========================

Recently, I found several vulnerabilities in the famous Korean forum program - the GNUboard.


Vulnerable file: /bbs/ajax.autosave.php


<?php
include_once('./_common.php’);//global ‘filter' on $_GET,$_POST,$_COOKIE,$_REQUEST

if (!$is_member) die('0’);//member login

$uid = trim($_REQUEST['uid']); //current user id
$subject = trim(stripslashes($_REQUEST['subject'])); //stripslashes ignores the global filter causes a SQL Inj.
$content = trim(stripslashes($_REQUEST['content'])); //same above

if ($subject && $content) {
$sql = " select count(*) as cnt from {$g5['autosave_table']} where mb_id = '{$member['mb_id']}' and as_subject = '$subject' and as_content = '$content' ";
$row = sql_fetch($sql); //the bad str($subject|$content) insert into sql query

if (!$row['cnt']) {
$sql = " insert into {$g5['autosave_table']} set mb_id = '{$member['mb_id']}', as_uid = '{$uid}', as_subject = '$subject', as_content = '$content', as_datetime = '".G5_TIME_YMDHIS."' on duplicate key update as_subject = '$subject', as_content = '$content', as_datetime = '".G5_TIME_YMDHIS."' ";
$result = sql_query($sql, false); // database select

echo autosave_count($member['mb_id']);
}
}
?>

==========================
POC && EXP
==========================

1. Login as a member

2. GET http://target/bbs/ajax.autosave.php?content=1&subject=1[inj_exp]
{exp can be found on my server: http://pandas.pw/gnuboard.exp}
3. Page returns 1062 : Duplicate entry ~admin~*FF6F916236F4FFEE8FADD21EC20216C5C3A04E50~1' for key 'group_key’ .

====================

Done! Thx a lot!



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
    0 Files
  • 17
    Apr 17th
    0 Files
  • 18
    Apr 18th
    0 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 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