Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Bugtraq
[Top] [All Lists]

[waraxe-2007-SA#058] - Critical Sql Injection in NukeSentinel 2.5.12

Subject: [waraxe-2007-SA#058] - Critical Sql Injection in NukeSentinel 2.5.12
Date: 27 Sep 2007 15:38:08 -0000

[waraxe-2007-SA#058] - Critical Sql Injection in NukeSentinel 2.5.12
====================================================================

Author: Janek Vind "waraxe"
Date: 27. September 2007
Location: Estonia, Tartu
Web: http://www.waraxe.us/advisory-58.html


Target software description:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Developer: http://www.nukescripts.net

NukeSentinel is anti-hacking sofware, used as additional security layer
around well-known-for-security-holes-as-swiss-cheese phpnuke CMS.


Vulnerabilities: Critical Sql Injection in "includes/nukesentinel.php"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

NukeSentinel 2.5.12 is latest update with multiple security holes pathed,
still there are possibilities to conduct sql injection attacks and compromise
underlying website.

Let's look at script "includes/nukesentinel.php" source code:

------------>[source code]<------------

function write_ban($banip, $htip, $blocker_row) {
  global $ab_config, $nuke_config, $db, $prefix, $user_prefix,
 $admin, $nsnst_const;
  if(isset($_COOKIE['admin']) && !empty($_COOKIE['admin'])) {
    $abadmin = base64_decode($_COOKIE['admin']);
    $abadmin = explode(":", $abadmin);
    $a_aid = "$abadmin[0]";
  }
  $admin_row = abget_admin($a_aid);

------------>[/source code]<-----------

and next is presented "abget_admin()" source code:

------------>[source code]<------------

function abget_admin($author){
  global $prefix, $db;
  $adminresult = $db->sql_query("SELECT * FROM `".$prefix."_nsnst_admins`
 WHERE `aid`='$author'");
  $admin_row = $db->sql_fetchrow($adminresult);
  return $admin_row;
}

------------>[/source code]<-----------

As we can witness, incoming "$_COOKIE['admin']" variable is used in
base64 decoding and produced string is not sanitized at all before using
it in sql query. Result is classical sql injection case, which can be
exploited as blind sql injection.
Proof of concept exploit has been written by me and can retrieve any data
from database within short time. By stealing phpnuke admin password md5
hash it is possible to gain administrative privileges and compromise all
the website.

//-----> See ya soon and have a nice day ;) <-----//

How to fix:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Waiting for new NukeSentinel version  :))


Greetings:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Greets to ToXiC, LINUX, y3dips, Sm0ke, Heintz, slimjim100, Chb
and anyone else who know me!
Greetings to Raido Kerna.
Tervitusi Torufoorumi rahvale!

Contact:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

come2waraxe@yahoo.com
Janek Vind "waraxe"

Homepage: http://www.waraxe.us/


Shameless advertise:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

User Manuals - http://user-manuals.waraxe.us/
Chemistry Books - http://chemistry.oldreadings.com/

---------------------------------- [ EOF ] ----------------------------

<Prev in Thread] Current Thread [Next in Thread>
  • [waraxe-2007-SA#058] - Critical Sql Injection in NukeSentinel 2.5.12, come2waraxe <=