SQL Injection Website Hacking Tutorial [Exclusive] [2014]
SQL Injection Website Hacking Tutorial [Exclusive] [2014] SQL Injection 1) SQL Injection? SQL Injection is type of web attack. Att...
https://94frb.blogspot.com/2014/09/sql-injection-website-hacking-tutorial.html
SQL Injection Website Hacking Tutorial [Exclusive] [2014]
SQL Injection
1) SQL Injection?
SQL Injection is type of web attack. Attacker use hole in script to take all data from database. Vulnerable sites are in format:
Code
2) Finding vulnerable sites:
Best way to find vulnerable site is by using Google. We use these dorks to find sites but if you have your own may than go ahead :
Code
There are 2 ways to check if site is vulnerable so here are the ways.
1st way, we got link:
Code
Code
Code
Code
4) Finding number of columns
We can do it by using function order by, on link :
Code
Code
Code
Code
Code
5) Finding vulnerable columns
Finding vulnerable columns is done with function union select all on link (in this case) we are going to add+union+select+all+1,2,3,4,5,6,7–
Code
6) Finding database version
As I said we are gonna take data from second column. Instead of number 2 we are going to put version() or @@version
Code
If database version is 4 we have to guess name of table and column, but if database version is 5 we have to guess database version.
We have version 5.0.51a-24+lenny5 which means that we don’t have to guess name of table and column.
7) Finding table names
If database version is 4 you wont be able to find name of table and column, you have to guess their names. If database version is skip this step.
Names of some possible tables:
Code
Code
So we get this link:
Code
8) Finding column name
We found table name that we want and now from that we want to take columns. Instead ofgroup_concat(table_name) we are going to put group_concat(column_name) and instead of+from+information_schema.tables+where+table_schema=database()– we are going to put+from+information_schema.columns+where+table_name=hex– instead of hex we have to encrypt in hex name of table.
Go to:
Code
Code
We got: id, name, surname, username, password, level.
We need only username and password.
Instead of group_concat(column_name) we put group_concat(username,0x3a,password) 0x3a stands for to make space between user and pw. Instead of from+information_schema.columns+where+table_name=0x7573657273– we put +from+users–
and we have link:
Code
Code
10) Filter bypassing
In case when you write union+select+all says “not accessible” then change it to UnIoN+sElEcT+aLl
On some sites space is restricted so you can put + or /**/ (/* start of comment in php and finish */)
On some sites there is also restricted database version so you can use unhex(hex(version()))
11) Site protection from SQL Injection
Just put this code in your script:
Code