pen-test
[Top] [All Lists]

Re: Magic Quotes question

To: DokFLeed <dokfleed@dokfleed.net>
Subject: Re: Magic Quotes question
From: Tim <tim-pentest@sentinelchicken.org>
Date: Mon, 22 Jan 2007 15:33:39 -0500
Cc: pen-test@securityfocus.com
Delivered-to: sp-com-lists@consult.net
Delivered-to: pentest-list2@consult.net
Delivered-to: mailing list pen-test@securityfocus.com
Delivered-to: moderator for pen-test@securityfocus.com
In-reply-to: <00b901c73c76$013cae70$4201a8c0@labtop>
List-help: <mailto:pen-test-help@securityfocus.com>
List-id: <pen-test.list-id.securityfocus.com>
List-post: <mailto:pen-test@securityfocus.com>
List-subscribe: <mailto:pen-test-subscribe@securityfocus.com>
List-unsubscribe: <mailto:pen-test-unsubscribe@securityfocus.com>
Mailing-list: contact pen-test-help@securityfocus.com; run by ezmlm
References: <20070116165531.92543.qmail@cgisecurity.net> <00a301c73a06$92806010$650fa8c0@labtop> <E9E5210E-3713-4972-A585-B288F4686F01@opus1.com> <00b901c73c76$013cae70$4201a8c0@labtop>
Resent-date: Mon, 22 Jan 2007 22:11:02 -0700 (MST)
Resent-from: pen-test-return-1078483452@securityfocus.com
Resent-message-id: <20070123051102.B1B6F237683@outgoing3.securityfocus.com>
Resent-sender: listbounce@securityfocus.com
Sender: listbounce@securityfocus.com
User-agent: Mutt/1.5.13 (2006-08-11)
> regardless all the possible ways and arguments,
> is there an actual way to bypass Magic Quotes?
> CHAR doesnt work,  also %% doesnt work
> i.e.
> INTO OUTFILE 'D:/www/zin.php'
> would be
> INTO OUTFILE CHAR(39,68,58,47,199,199,199,47,122,105,110,46,112,104,112,39);
> and will not work
> 
> any proven ideas?


The simplest answer I have for you is that bypassing magic quotes can be
done in some situations, but it largely depends on the following:

1.  Which database backend you're using.

2.  Where in a query you're attempting to inject, and what you're trying
    to inject.



In your case, I don't believe what you're doing can be made to work on
MySQL.  However, instead of going for the gold (writing a file for
remote execution), you accept the silver (do a UNION on other tables
with sensitive info), you can probably bypass it.

tim

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

Need to secure your web apps?
Cenzic Hailstorm finds vulnerabilities fast.
Click the link to buy it, try it or download Hailstorm for FREE.

http://www.cenzic.com/products_services/download_hailstorm.php?camp=701600000008bOW
------------------------------------------------------------------------


<Prev in Thread] Current Thread [Next in Thread>