Waraxe IT Security Portal  
  Login or Register
::  Home  ::  Search  ::  Your Account  ::  Forums  ::   Waraxe Advisories  ::  Tools  ::
April 17, 2014
 Members List
 IRC chat
 Base64 coder
 MD5 hash
 CRC32 checksum
 ROT13 coder
 SHA-1 hash
 Sql Char Encoder
 y3dips ITsec
 Md5 Cracker
 User Manuals
 Recommend Us
 Your Account

User Info
Welcome, Anonymous

Latest: Lokesh
New Today: 0
New Yesterday: 0
Overall: 8982

People Online:
Visitors: 208
Members: 0
Total: 208
·[web applications] - RunCMS 1.6.1 - (pm.class.php) Multiple SQL Injection Vulnerabilities
·[web applications] - csUpload Script Site - Authentication Bypass Vulnerability
·[web applications] - QuickCms 5.4 - Multiple Vulnerabilites
·[dos / poc] - Heartbleed User Session Extraction Exploit
·[dos / poc] - Asterisk 1.x - BYE Message Remote Denial of Service Vulnerability
·[remote exploits] - Vtiger Install Unauthenticated Remote Command Execution Exploit
·[remote exploits] - MS14-017 Microsoft Word RTF Object Confusion Exploit
·[remote exploits] - BlackBerry Z 10 Buffer Overflow Vulnerability
·[remote exploits] - Sun Java Runtime Environment 1.6 - WebStart JNLP File Stack Buffer Overflow
·[remote exploits] - GSC Client 1.00 2067 - Privilege Escalation Vulnerability

PacketStorm News
·FreeBSD Security Advisory - OpenSSL Issues
·FreeBSD Security Advisory - NFS Server Deadlock
·Cisco Security Advisory 20140409-asa
·Cisco Security Advisory 20140409-heartbleed
·Mandriva Linux Security Advisory 2014-067
·Slackware Security Advisory - openssl Updates
·Red Hat Security Advisory 2014-0380-01
·Red Hat Security Advisory 2014-0389-01
·Red Hat Security Advisory 2014-0383-01
·Red Hat Security Advisory 2014-0382-01

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


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:


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

How to fix:

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


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


Janek Vind "waraxe"

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

Copyright © by Waraxe IT Security Portal All Right Reserved.

Published on: 2007-09-25 (5994 reads)

[ Go Back ]
Top members by posts
waraxe  waraxe - 2407
vince213333  vince213333 - 736
vn5socks  vn5socks - 703
pexli  pexli - 665
Mullog  Mullog - 539
demon  demon - 485
shai-tan  shai-tan - 477
Cyko  Cyko - 374
tsabitah  tsabitah - 328
·Vuln: Sophos Web Appliance Privilege Escalation and Remote Code Execution Vulnerabilities
·Vuln: qEngine Database Backup Information Disclosure Vulnerability
·Vuln: LibYAML 'yaml_parser_scan_uri_esc apes()' Function Remote Heap Based Buffer Overflow Vulnerability
·Vuln: Python 'readline()' Function Denial of Service Vulnerability
·Bugtraq: iVault Private P&V 1.1 iOS - Path Traversal Vulnerability
·Bugtraq: BlueMe Bluetooth v5.0 iOS - Code Execution Vulnerability
·Bugtraq: AppFish Offline Coder v2.2 iOS - Persistent Software Vulnerability
·Bugtraq: [SECURITY] [DSA 2899-1] openafs security update
·More rss feeds from SecurityFocus


Film DVD comments and reviews
All logos and trademarks in this site are property of their respective owner. The comments and posts are property of their posters, all the rest (c) 2004-2013 Janek Vind "waraxe"
Page Generation: 0.042 Seconds