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

| Subject: | Re: SQL injection (or not?) |
|---|---|
| Date: | Tue, 8 Aug 2006 14:07:15 -0500 |
On 8/8/06, rr@neo.dtcom.lv <rr@neo.dtcom.lv> wrote:
I'm having weird situation with sql injection (I guess). Unfortunately there is no error message displayed - blind injection, so all that I know - query is valid or not.
The first step I take when working on a blind SQL injection is to see if I can get it to respond with a "YES' and a "NO" query. When I suspect a blind sql injection I will try to alter the pages content via the injection.
For example. If a site will list products by number doing a search for the query productid='1' OR '1' = '1', should return the entire list of products. So potentially we could have a page return will an entire list of products instead of just one. If I was able to get the query productid='1' AND '1'='1' to return a page will only the one item then I would have what I call a "YES" query. Since the item we are questioning ( 1=1) is true. If you were able to get the request productid=1' AND '1'='0' to return a page with no listing, then you would have found the answer to a "NO" query.
Some times they will check for a query that returns no rows and send that to a generic error page. So at times you may only get a Yes page and a NO/error page. Which prevents you from being able to distinguish between a NO and a bad query.
In the end you would have the ability to put in queries like productid='1' AND substr(@@version,1,1) > 'g' and learn if the first character of the version was greater than G based on if the YES page was returned or the NO/Error page.
script.aspx?parameter=' and 'a'%2b'a'='aa no result, aparently query is invalid, so it is not MSSQL, kind of
script.aspx?parameter=' and concat('a','a')='aa returns page, sql query turns out to be valid, MySQL??
meanwhile script.aspx?parameter=' and concat('a','a','a')='aaa no result, so it is not MySQL
also I know that database should be MSSQL
concat is first function I found to work. Maybe it is not sql injection? What else could it be?
rr
-- Michael Klingler, CISSP SecurityMetrics Penetration Tester
------------------------------------------------------------------------------ This List Sponsored by: Cenzic
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: What is being a pen tester really like?, Dotzero |
|---|---|
| Next by Date: | Re: What is being a pen tester really like?, Tim |
| Previous by Thread: | SQL injection (or not?), rr |
| Next by Thread: | Re: SQL injection (or not?), A. Ramos |
| Indexes: | [Date] [Thread] [Top] [All Lists] |