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

waraxe-2007-SA053.txt

waraxe-2007-SA053.txt
Posted Sep 26, 2007
Authored by Janek Vind aka waraxe | Site waraxe.us

NukeSentinel version 2.5.11 suffers from a critical SQL injection vulnerability.

tags | advisory, sql injection
SHA-256 | 44f9832c67f2adf006365d71a92904ce6381770dbfd5e4ffc3a8ab4e4c95c9ee

waraxe-2007-SA053.txt

Change Mirror Download

[waraxe-2007-SA#053] - Critical Sql Injection in NukeSentinel 2.5.11
====================================================================

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


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

http://www.nukescripts.net/modules.php?name=Downloads&op=getit&lid=1063

NukeSentinel is anti-hacking sofware, meant to be make phpnuke CMS more secure.
As known for everyone, phpnuke is one of the most unsecurely written content
management systems in history and even now, A.D. 2007 it's not better. Instead
of rewriting phpnuke from scatch, there are huge collection of various patches,
fixes, protector systems, platinum and whatever else editions and so on and
so on. All for adding additional "security" layers around buggy, bloated and
highly unoptimized phpnuke engine.
NukeSentinel seems to be most respected and powerful "protection system" for
phpnuke and yes - it can make attacking nuke-powered website more complicated.
But as we can see from current advisory, NukeSentinel itself has security
holes and can be exploited to attack website engine below.


Vulnerabilities: Critical Sql Injection in "nsbypass.php"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So let's look at script "includes/nsbypass.php" source code:

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

if(isset($_COOKIE['admin']) && !empty($_COOKIE['admin'])) {
$abadmin = base64_decode($_COOKIE['admin']);
$abadmin = explode(":", $abadmin);
$a_aid = "$abadmin[0]";
$a_pas = "$abadmin[1]";
}
$num = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_authors
WHERE `aid`='$a_aid' AND `pwd`='$a_pas'"));

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

As many times before in phpnuke insecurities history the attack comes through
base64 encoding/decoding. After base64_decode() there can be single quotes in
"$abadmin", but no variable sanitize applied! And it is easy to see sql
injection possibilities here. This can lead to stealing arbitrary information
from underlying database, inlcuding admin username and password md5 hash.
Next step can be cracking hash to reveal plaintext password or using md5 hash
directly for cookie manipulation, both leading to gain phpnuke admin privileges.

Now why it is critical sql injection IMHO?

1. "register_globals" does not matter, because attack comes from "$_COOKIES".
2. "magic_quotes" does not matter either, thanks to base64 encoding.
3. Sentinel itself will not catch attack in this case :)
4. We don't need UNION, because sql injection is located in query, dealing
with authors table. So we can attack even websites, using oldest mysql 3.x
5. We can attack even without knowing table prefix, which is great news.

And is there anything, making attack harder or unreliable? I can see only one
factor - we need to use blind sql injection method, using timing attack.
There can be possibility for faster, half-blind method too, but that's will
not work in many cases.
Now - I have written proof-of-concept exploit, which will steal admin password
md5 hash in less than 10 minutes. This exploit can be found from:

http://www.waraxe.us/forum-10.html

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

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

Let's hope, that NukeSentinel's new version will be out soon ...


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:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SHA Hash Calculator - http://sha1-hash-online.waraxe.us/
Biography Database - http://www.biosaxe.com/

---------------------------------- [ EOF ] ----------------------------
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
    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