APPZXOR
Hello and welcome to APPZXOR,

We would appreciate if you register so you can enjoy
the full benefits of browsing, viewing and using our forum.
Here are some features:

• Create threads;
• Reply to threads;
• View links & images;
• Leave positive or negative feedback to a member.

What are you waiting for? Go ahead and register!
It's free, quick and easy!


Where Applications Become AppZ. Join Us Now!
 
HomePortalFAQSearchMemberlistRegisterLog in
Search
 
 

Display results as :
 
Rechercher Advanced Search
Latest topics
» [COC] Clash of Clans
by D'ShadowZRay Thu Jan 28, 2016 12:10 am

» iam new
by D'ShadowZRay Thu Jan 28, 2016 12:06 am

» Guess who's back!
by D'ShadowZRay Thu Jan 28, 2016 12:03 am

» I need some help
by akumasan_01 Fri May 01, 2015 1:25 pm

» HELLO GUYS! :))
by Appz-RhastaSix Fri Sep 19, 2014 9:14 am

» Visual C# Programming Basics
by Appz-RhastaSix Wed Sep 10, 2014 9:03 am

» Old Game!
by iRegen Tue May 13, 2014 12:28 am

» Hai guys gud to be back again!
by janklaw Tue Apr 01, 2014 6:26 am

» Happy to be Back
by janklaw Tue Apr 01, 2014 6:24 am


Top posters
[Detheroc_93]
 
MrStar
 
kurosakinaruto
 
GreyPhantom
 
ShadowSonic
 
Appzwesley29
 
z_f
 
MasterGandeo
 
[νєχ338]
 
wafumon
 

Share | 
 

 SQL Injection [Injecting Website, Basic Injection]

View previous topic View next topic Go down 
AuthorMessage
uRBAN dAMAGE
Moderator
Moderator

avatar

Posts : 111
Join date : 2011-10-30
Age : 26
Location : HackLand

PostSubject: SQL Injection [Injecting Website, Basic Injection]   Tue Nov 15, 2011 3:36 pm

Basic SQL Injection Tutorial

By reading this tutorial you agree that:

The author is not responsible in anyway for you actions done by the use of this tutorial.
The tutorial is for educational purposes only and for no site harm.
If posting this tutorial somewhere else give credits to the author uRBAN dAMAGE.


Step №1
Finding a vulnerable site

There are many ways to find a vulnerable website. I will show you a fast method and a slow manually done method, just so you know what actually is done by doing the fast method. Both methods are accurate.


Method №1

This is the slow manual method. For here you will need a list of dorks and Google.
Here is a list of dorks: Link
Once you have it downloaded choose one dork from the list and continue reading.
I will be using the dork "show.php?id=". Once you chose yours go on google and type it in and hit Enter.



Method №2


My favorite way.
Go to This website.
Type your dork in the textbox, choose "Bing", not "Google"!!!
Make sure you check "Depth scan ( slow but sure )".
Hit enter and the sites which you see with a @ id at the end of the URL are vulnerable.
Also they become whiter then the others.


Method №3
Download KORRUPT scanner from here: Link
Just click on the EXE picture. I guarantee that it is not infected.
How to use:
1. Enter the path to your dorklist, E.g. "C:\dorks.txt".
2. Enter a domain to search, for example ".co.uk", ".nl", ".gov", ".edu", etc. (blank if any).
3. Enter a keyword for example "shop", "paypal", "xbox", etc. (blank if any).
4. Set the timeout to something reasonable, ~5000 (= 5 seconds) is efficient, something too low will be fast however will not bring back good results.
5. The yellow writing appearing are the crawled links.
6. Red writing showing as scanning are the invulnerable links, green are vulnerable.
7. All vulnerable links are stored in the Application Path.
Credits for the program and "How to use" go to kript0x


==

Step №2
Finding if website is vulnerable or not manually.

Let's say you got your website from the first method I explained above and you want to check if it is vulnerable or not.
What you have to do is put a simple " ' " in front of the sites url.
E.g: [You must be registered and logged in to see this link.]
If it shows some kind of error somewhere in the site like this one "


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 ''1''' at line 1", then the site you chose is vulnerable. This is also how the automatic scanner from method number 2 works.
Remember the error will not be the same always it can be different everytime!


==

Step №3
Injecting...

From here on you will start learning about the codes which you need to successfully inject a website and get the admin login details and admin page of the targeted site.

How sites work: Site->Database->Tables->Columns->Data


Code №1
Finding Columns

Now once you know that your targeted site is vulnerable to SQL Injection, you have to find the number of columns the Database has.
The code we will be using to find out this will be this:

Code:
http://www.yoursite.com/show.php?id=12 order by 10

Now let me explain this bit of code.
Errors might look like this one: "Unknown column '123985' in 'order clause'" It might be different aswell!
Simply the order by command counts the numbers of columns in the sites database.
The number in front of "orderby" is the number of the columns in the database. This means that if you write a number higher then the columns in the sites database then it will show you an error. The hint is to find the number before which you get an error. So now I type "order by 10" and I don't get an error, that means I have to go higher. I type "order by 11" and I get an error, that means that we have 10 columns in the database since we got an error on the 11th and not on the 10th.

Now we go to -->

Code №2
Finding Vulnerable Columns

Now we know how to find the number of the columns, but we don't know how to find which ones of them are vulnerable. Let me show you the code and then explain.

Code:
http://www.yoursite.com/show.php?id=-12 union all select 1,2,3,4,5,6,7,8,9,10--


Do not forget the " - " in front of the number of the site in this case 12. Remember the number might be always different then the one in the tutorial.
From our example above we have 10 columns in the sites database, that is why we write every single one of them separated with commas.
The command "union all select" select all of the columns and shows which are the vulnerable in the site.
When you type that command you will see some bits of the page disappear and you will see some random numbers from 1 to 11 in its place.
It will look like this:

Spoiler:
 
So the vulnerable columns will be showed like that and in our case it is 1. You can inject using this vulnerable column.
Now we go to-->

Code №3
Finding SQL Version

Now to find the SQL version you need to type in this code.

Code:
http://www.yoursite.com/show.php?id=-12 union all select @@version,2,3,4,5,6,7,8,9,10--

Now simply the "@@version" string which replaced the vulnerable column 1 will give you the version of the SQL on the number 1's place.
If your targeted site is a version lower then 5 then just go on it's hard to inject sites like that it's not for beginners.

Now we go to-->

Code №4
Finding Database Names

A site can have from 1 database to more then you can count. But they're usually counted only on your fingers.
You will need those database names if you can't find the admin data, tables and columns in the default database which every SQL Injection vulnerable site has except the ones which are lower from version 5.
The code:


Code:
http://www.yoursite.com/show.php?id=-12 union all select group_concat(schema_name),2,3,4,5,6,7,8,9,10 from information_schema.schemata--

This code means that it will take all the database names from the site.
Now if you can't find the admin table and columns with the default SQL "information_schema" database then you have to type this in front of all the other code

Code:
where table_schema=database(0xHEX)

This code. It means that it will extract the wanted data from the database specified. =The "(0xHEX)" is the name of the database on the place of "HEX" you have to put the hex value of the database name. You can convert that in here: [You must be registered and logged in to see this link.]
The "0x" means "Execute". Extract data from that database...


Now we go to-->

Code №5
Finding Table Names

Now you will need to code for finding the table names. You need the table names to find the table in which are the admin data columns. This means that you need to find the table with E.g name "admin_table" and this table will contain the column names E.g "admin_user" & "admin_pass", from which you will retrieve the same info.
The code is:


Code:
http://www.yoursite.com/show.php?id=-12 union all select group_concat(table_name),2,3,4,5,6,7,8,9,10 from information_schema.tables--

Now to explain this bit of code. "group_concat(table_name)" in the place of the vulnerable column number 1 means that it will take all of the table names and list them in the vulnerable column number 1 space.
Next bit of code "from information_schema.tables" means that it will take the table names from the database named "information_schema".
The whole one will mean

[You must be registered and logged in to see this link.] union all list_all_table_names,2,3,4,5,6,7,8,9,10 from database_named_"information_schema".location_tables--
Now lets say we found the table name "admin_tbl".

Now we go to-->

Code №6
Finding Column Names

Now to find the column names for the admin data which are in the table we found earlier.
Code:


Code:
http://www.yoursite.com/show.php?id=-12 union all select group_concat(column_name),2,3,4,5,6,7,8,9,10 from information_schema.columns--

This bit of code is absolutely the same as the one above just the difference is that you will have to change "table" with "column".
It is explained the same way, get column names from database inf_schema.loc_columns...
Sometimes you have to put this in the end of the code "where table_schema=database()" if you can't find the columns name. This bit of code actually means that it will look only in the database you gave it to look into.
Now lets say we found the names of the columns we found are "admin_user" & "admin_pass".

Now we go to-->

Code №7
Finding Admin Login Details

Now to find the data or admin login details, you have to use this code.

Code:
http://www.yoursite.com/show.php?id=-12 union all select group_concat(admin_user,0x3a,admin_pass),2,3,4,5,6,7,8,9,10 from admin_tbl--

To explain this code.
So the group_concat(admin_user,0x3a,admin_pass) from admin_tbl means "Get the information from admin_user and admin_pass column" from the admin_data_table_"admin_tbl"".
Now the "0x3a" between the two columns is a comma in ascii characters. Simply this code gets the admin acc and pass and separates them with a comma on the vulnerable column number 1.


Code №8
Finding Admin Login Page

Actually this here is not a code but just a site which will help you find the admin pages.

[You must be registered and logged in to see this link.]

Go here post your vulnerable site without the dork at the end not like that: [You must be registered and logged in to see this link.]
but
[You must be registered and logged in to see this link.]

F.A.Q

Spoiler:
 





I am selling Battle Pirates Private Hacks. If You Are Interesting Add Me : Click Here

[You must be registered and logged in to see this image.]


Visit My CS 1.6 Servers
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]
Back to top Go down
kurosakinaruto
Contributor
Contributor

avatar

Posts : 3242
Join date : 2011-08-18

PostSubject: Re: SQL Injection [Injecting Website, Basic Injection]   Tue Nov 15, 2011 3:40 pm

dude i wud suggest u to remove dis post
we dont want black hat hackers growing from our forum!!!
i hope u understand my concern!!




i never hate any1 who gives me ++++++++ if i helped
xD

My frst editing {pretty basic i know} i m jst starting
LMAO
[You must be registered and logged in to see this image.]


[You must be registered and logged in to see this image.]
only fr hot girls !!! xD
Spoiler:
 


For latest tech news and exploits, click the spoiler to see the links (I would ask you to visit my blog and click on the ads integrated in text (doubly underlined) to support me. Thanks!)
Spoiler:
 

WANT FREE SOFTWARE, GAMES AND MUCH MORE?
Spoiler:
 
Back to top Go down
http://www.techwrldinfo.blogspot.com
criszrt
Super Member

avatar

Posts : 158
Join date : 2011-08-28
Age : 22
Location : FroM uR hearT

PostSubject: Re: SQL Injection [Injecting Website, Basic Injection]   Tue Nov 15, 2011 3:52 pm

kurosakinaruto wrote:
dude i wud suggest u to remove dis post
we dont want black hat hackers growing from our forum!!!
i hope u understand my concern!!

yUp i agree with u bro...!
Back to top Go down
http://www.facebook.com/rilex04
[νєχ338]
Administrator
Administrator

avatar

Posts : 1437
Join date : 2011-04-11
Location : Glasgow, Scotland

PostSubject: Re: SQL Injection [Injecting Website, Basic Injection]   Tue Nov 15, 2011 5:03 pm

One Thing i Must Point Out... i'm a rainbow hacker...

In other words i hack ALOT of things... thats ho i got my job in microsoft... i'm the one that Exploits Loopholes in the back of windows 7.

Last Night I Took Over A company and now hey want to know how i did it when they have 4 of glasgows top hackers to Encode everything... yet i managed to destroy there entire Server/webpage/computers within 45 minutes.




Follow me on twitter:  http://adf.ly/JN6Ty
Stalk My Facebook :  http://adf.ly/JN6cL
Subscribe To My Channel : [You must be registered and logged in to see this link.]

[You must be registered and logged in to see this image.]

#Rig1
AMD FX9590 O.C 5.1 Ghz (8Core)
32Gb Ram


#Rig2
IntelQ6600 O.C 3.35Ghz( 4Core)
8Gb Ram
Back to top Go down
X-Master97
Super Member

avatar

Posts : 202
Join date : 2011-01-05
Age : 21

PostSubject: Re: SQL Injection [Injecting Website, Basic Injection]   Wed Nov 16, 2011 12:36 pm

kurosakinaruto wrote:
dude i wud suggest u to remove dis post
we dont want black hat hackers growing from our forum!!!
i hope u understand my concern!!
I agree what you post in your comment
Back to top Go down
http://Suhailxmaster-cns.blogspot.com
Rh4dzkillah
Addicted Member

avatar

Posts : 60
Join date : 2011-12-27
Location : CYB3RG3N3S1S

PostSubject: Re: SQL Injection [Injecting Website, Basic Injection]   Tue Dec 27, 2011 3:10 am

Smile) Aspir4nts ..
Back to top Go down
http://www.hexpc.tk, www.lsu-cebu.tk
MrStar
Royal Member

avatar

Posts : 4006
Join date : 2011-08-23
Age : 27
Location : Guess?

PostSubject: Re: SQL Injection [Injecting Website, Basic Injection]   Tue Dec 27, 2011 5:10 am

Well, i'm a white hat.
Spoiler:
 
Back to top Go down
http://starcraft0333.weebly.com
Rh4dzkillah
Addicted Member

avatar

Posts : 60
Join date : 2011-12-27
Location : CYB3RG3N3S1S

PostSubject: Re: SQL Injection [Injecting Website, Basic Injection]   Tue Dec 27, 2011 12:03 pm

@Starcraft

sshh Smile . bump*
Back to top Go down
http://www.hexpc.tk, www.lsu-cebu.tk
renzten
Super Member



Posts : 123
Join date : 2011-08-11
Location : before my pc

PostSubject: Re: SQL Injection [Injecting Website, Basic Injection]   Tue Dec 27, 2011 1:04 pm

I like Black Hats beacuse yjey do good than white hat
Back to top Go down
MrSoftwareSyndicate
Ultra Member

avatar

Posts : 602
Join date : 2010-11-29

PostSubject: Re: SQL Injection [Injecting Website, Basic Injection]   Tue Dec 27, 2011 1:32 pm

i gonna try this./.



Our Facebook Page

Don't Say Thanks, Just Hit [ + ] Button Above if i Help You



Visit Our Website For More Hacks At Software-Syndicate



[You must be registered and logged in to see this image.]



[You must be registered and logged in to see this image.]



[You must be registered and logged in to see this image.]
Back to top Go down
http://software-syndicate.blogspot.com/
Appzwesley29
Contributor
Contributor

avatar

Posts : 1777
Join date : 2010-12-01
Age : 22
Location : Taguig City,Philippines ILoveTaguig

PostSubject: Re: SQL Injection [Injecting Website, Basic Injection]   Tue Dec 27, 2011 1:41 pm

Im a Black hat hacker .. sometimes i use it in good times for a mission ..


i know this since im grade 3




Hit + and Thanks Button if i help [You must be registered and logged in to see this image.]
Visit My Page And like it

Appzwesley
Visit my Site for more Hacks
Here


[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this image.]



[You must be registered and logged in to see this image.]
Back to top Go down
http://appzwesley.blogspot.com/
MrStar
Royal Member

avatar

Posts : 4006
Join date : 2011-08-23
Age : 27
Location : Guess?

PostSubject: Re: SQL Injection [Injecting Website, Basic Injection]   Wed Dec 28, 2011 1:18 am

Rh4dzkillah wrote:
@Starcraft

sshh Smile . bump*

xD LOL!
Back to top Go down
http://starcraft0333.weebly.com
Sponsored content





PostSubject: Re: SQL Injection [Injecting Website, Basic Injection]   

Back to top Go down
 

SQL Injection [Injecting Website, Basic Injection]

View previous topic View next topic Back to top 

 Similar topics

-
» Learning how to do an I.M. injection
» How do I give myself an injection of Toradol
» Need a new injection site
» What are the basic requirements for using Selenium IDE?
» Strange side effect?
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
APPZXOR :: Discussions :: Tricks & Tutorials-
Make a forum | © phpBB | Free forum support | Contact | Report an abuse | Free forum