Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Pen-Test
[Top] [All Lists]

Re: Which SQL is that? SQL Injection question

Subject: Re: Which SQL is that? SQL Injection question
Date: Tue, 18 Jul 2006 11:16:33 -0400
Great answer!

On 7/17/06, Daniele Bellucci <daniele.bellucci@gmail.com> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> I am doing penetration test for client and have weird situation. Seems like I
> have SQL injection hole and I can command SQL server in "blind" injection. In
> some reason common technique
>
> ' or 'a'='a
>
> does not give right results

looks like target webapp, doesn't require a result set greater than 1 record

> but
>
> ' and 'a'='a
>
> does.

Yes, this is because the above injection string will result only one
record!

> '+and+exists+(select+1+from+sys.dual)+and'a'='a
> Generic error message. No reason explanation. Means that not Oracle. I also
> tried many other places like INFORMATION_SCHEMA to look up but no luck.

be aware , INFORMATION_SCHEMA is not available in MySQL lesser than v.5!

> '+and'a'||'a'='aa
> Also error. Again means not Oracle

...and not postgres

> '+and'a'%2b'a'='aa
> This is weird. No error but no result either. Empty screen. Not MS SQL and
> many others. Why?

[see below]

> '+and+concat('a','a')='aa
> Also works and provides result

concat is ONLY available in mysql! Postgres, Oracle, M$ SQL Serve
they all have different function for strings concats.

Other DBMS uses different function to concatenatre strings ..
that's why IMHO target DBMS is MySql!


> '+and+concat('a','a')='a > emtpy screen

because in MySQL: select concat('a','a') returns 'aa'


Hope these helps ;) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEvAi609kcuJoOgZARAglnAJ4l2d7bt+xrknO7KkAWL21SxEluaQCeNvKn
KMFFpdU+20mxaRdOZ+99iJY=
=AbdA
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
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.
------------------------------------------------------------------------------



------------------------------------------------------------------------------ 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.
------------------------------------------------------------------------------


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