lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <439C56EE.6020000@katamail.com>
Date: Sun Dec 11 16:42:27 2005
From: ascii at katamail.com (ascii)
Subject: Re: [KAPDA::#16] - SMF SQL Injection

grudge@...urityfocus.com wrote:
> I'm a developer from over at simplemachines and 
 > I do not see how this can pose an exploit?

/* tabs are evil */
if (!is_numeric($_REQUEST['start'])) {

  $request = db_query("SELECT COUNT(ID_MEMBER)
   FROM {$db_prefix}members
   WHERE LOWER(SUBSTRING(realName, 1, 1)) < '".
   substr(strtolower($_REQUEST['start']), 0, 1)
   ."' AND is_activated = 1", __FILE__, __LINE__);

  list ($_REQUEST['start']) = mysql_fetch_row($request);
  mysql_free_result($request);
}

me too, this piece of code isn't exploitable

at last you can inject a ' that will issue a
php error (path disclosure, error log filling
but not an usable sql injection)

> The code is entered at this point:
> if (!is_numeric($_REQUEST['start']))

i would prefer ctype_digit or preg_match [09]
cause is_numeric accept also hex, signed and
floats

> substr(strtolower($_REQUEST['start']), 0, 1)
> I simply cannot see how you could possibly 
 > exploit SQL from this?

it's impossible imho, but don't relay on magic quotes
or this type of stuff, put a beautiful
mysql_real_escape_string on each string passed to the db
and cast integers (int)intval($_GET['id'])

seems KAPDA Researchers researched this 'vuln' too fast : )

ascii - http://www.ush.it

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ