Tuesday, 11 June 2013

Dork for sql injection


sql injection in 5 chapters


#Chapter1: Knowing How to Use/Create Dorks#


For Beginners

A method of finding websites vulnerable to SQL injection is using what we call "dorks"

Dorks:They are like search criteria in which a search engine returns results related to your dork.
The process can be a little time consuming, but the outcome will be worth it after learning on how to use dorks


For this tutorial, the search engine we'll be using is Google



Step1: Finding your dorks i.e. the criteria you'll be using

For this tutorial, we'll be using this dork "inurl:index.php?id="


Step2: Making use of your Dorks with the help of Google


Here's what you do:
Go to http://www.google.com
Type the dork in the search bar "inurl:index.php?id=" (with or without quotes)
Now you'll find a whole lot of links in your results



Here's how you can speed up your process:

In your mouse, there should be a scroll button right?

Hover your mouse on each link and hit the scroll button so that it'll open on a new tab. (Lets say you can open about 10 links at a time)

Step3: Vulnerability approach


Now to see whether the website is vulnerable to SQL injection or not, we simply put in a quote " ' " at the end of the url address.

So our site will look like this


Code:


http://www.site.com/index.php?id=123'




Do the same thing with the websites you opened on your tabs and see if there's any vulnerable website.



To determine if a website is vulnerable or not, it should return an error!



Note: If you can't find any vulnerability after doing some vulnerability search on this dork, you can always browse the dork list I've mentioned above and use any of them until you find any website vulnerable to SQL injection



Extra Notes: Hunting for specific websites with specific domains

Ever want to hack a government website, or an organization website?

It's simple. All you have to do is improvise your dorks.

First off, here are some common domains

.gov = Government websites

.edu = Educational websites

.org = Organizational websites

.com = Commercial websites

.info = Informative websites

.net = Networking websites ( similar to .com)

Alright now you know some specific domains, lets add them to our dork shall we?

Follow this formula-like dork


Code:


"inurl:."domain"/"dorks" "

So you would normally understand it like this:

"inurl" = input URL

"domain" = your desired domain ex. .gov

"dorks" = your dork of your choice

Now for an example, lets say you want to hack government websites

Here's how it'll look

"inurl:.gov/index.php?id="

Once you search that up, you'll find a lot of government websites on your results




Changing "inurl" and using another one

Yes, you can change that too.

Google has a lot of functions you can come up with

Some of them are below where you can change "inurl" and make another dork

=======================================================================

intitle:
intext:
define:
site:
info:
link:
=======================================================================


Choose any of the and make another.

Example: "intext:.edu/gallery?id="


End of Chapter 1

0 comments:

Post a Comment