Waraxe IT Security Portal  
  Login or Register
::  Home  ::  Search  ::  Your Account  ::  Forums  ::   Waraxe Advisories  ::  Tools  ::
September 2, 2010
Menu
 Home
 Logout
 Discussions
 Forums
 Members List
 IRC chat
 Tools
 Base64 coder
 MD5 hash
 CRC32 checksum
 ROT13 coder
 SHA-1 hash
 URL-decoder
 Sql Char Encoder
 Affiliates
 urlaxe services
 y3dips ITsec
 Md5 Cracker
 plain-text.info
 LifeDork
 User Manuals
 AlbumNow
 Content
 Content
 Sections
 FAQ
 Top
 Info
 Feedback
 Recommend Us
 Search
 Journal
 Your Account



User Info
Welcome, Anonymous
Nickname
Password
(Register)

Membership:
Latest: soresger
New Today: 4
New Yesterday: 3
Overall: 6561

People Online:
Visitors: 95
Members: 5
Total: 100

Online Now:
01: Alexiron - Forums
02: annonym - Forums
03: niailuo - Forums
04: skmpz - Forums
05: soresger - Forums
milw0rm
Currently there is a problem with headlines from this site
PacketStorm News
·USN-956-1.txt
·USN-930-3.txt
·disableaslrarm-shellcode. txt
·sumatrapdf-dos.txt
·joomlamyblogcontroller-lf i.txt
·ninkobb-xsrf.txt
·adobearpushstring-corrupt .txt
·adobearnewfunction-corrup t.txt
·adobearnewclass-corrupt.t xt
·adobear1023-overflow.txt

read more...
Security Basics
·Re: Linux or Unix distribution for network sniffing
·iPhone/iPad Application D evelopment - Android Mobi le Application Development
·Re: Linux or Unix distribution for network sniffing
·Re: Linux or Unix distribution for network sniffing
·Is there any way to test the health of a solid state drive?
·Re: Socks Tunnel over SSH
·Re: Linux or Unix distribution for network sniffing
·Re: Linux or Unix distribution for network sniffing
·Re: Linux or Unix distribution for network sniffing
·Re: Linux or Unix distribution for network sniffing

read more...
[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/









Copyright © by Waraxe IT Security Portal All Right Reserved.

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

[ Go Back ]
Top members by posts
waraxe  waraxe - 2341
pexli  pexli - 642
vince213333  vince213333 - 604
shai-tan  shai-tan - 477
LINUX  LINUX - 404
Cyko  Cyko - 324
y3dips  y3dips - 281
lenny  lenny - 275
tehhunter  tehhunter - 261
SpyderMonkey  SpyderMonkey - 210

M$ Security Bulletins
Currently there is a problem with headlines from this site
News @ SecurityFocus
·News: Twitter attacker had proper credentials
·News: PhotoDNA scans images for child abuse
·News: Conficker data highlights infected networks
·News: Popular apps need better patching, says report
·Brief: Google offers bounty on browser bugs
·Brief: Cyberattacks from U.S. "greatest concern"
·Brief: Microsoft patches as fraudsters target IE flaw
·Brief: Attack on IE 0-day refined by researchers
·News: Adobe pushes out Flash security fix
·News: Most consumers reuse banking passwords

read more...
Vuln Watch
·VulnWatch

read more...
alexa
Incidents
·About
·
RSS
·
Archive
·
About
·
RSS
·
Archive
·
About
·
RSS
·
Archive
·
About

read more...



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-2008 Janek Vind "waraxe"

Page Generation: 0.088 Seconds