Hack Forums
Detailed Basic and Full SQL Injection Tutorial - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449)
+---- Forum: Website Hacking (https://hackforums.net/forumdisplay.php?fid=43)
+----- Forum: SQL Injection Attacks (https://hackforums.net/forumdisplay.php?fid=103)
+----- Thread: Detailed Basic and Full SQL Injection Tutorial (/showthread.php?tid=50356)

Pages: Pages 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42


* - sako - Mar 2, 2010

(Feb 14, 2010 01:35 PM)niiisiis Wrote:  Next you start learning more about the database you want access to. For example execute this:
Code
http://www.vangol.no/index.php?id=611%20union%20select%201,@@version,database%28%29,4,5,6,7,8,9,10,11,12--
You now know that this page runs 4.1.22-standard-log and database name is vangol. Good luck!

sNews v1.3
CREATE TABLE articles (
id INT PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(100) DEFAULT NULL,
text TEXT,
textlimit INT(5) NOT NULL DEFAULT '0',
date DATETIME DEFAULT NULL,
category INT(8) NOT NULL DEFAULT '0',
position CHAR(3),
displaytitle CHAR(3) NOT NULL DEFAULT 'YES',
displayinfo CHAR(3) NOT NULL DEFAULT 'YES',
commentable VARCHAR(5) NOT NULL,
image varchar(30) DEFAULT NULL
);


CREATE TABLE categories (
id int(8) PRIMARY KEY AUTO_INCREMENT,
name varchar(20) NOT NULL,
description varchar(50) NOT NULL,
published varchar(4) NOT NULL DEFAULT 'YES'
);


CREATE TABLE comments (
id INT(11) PRIMARY KEY AUTO_INCREMENT,
articleid INT(11) DEFAULT '0',
name varchar(50) DEFAULT '',
comment TEXT,
time DATETIME NOT NULL DEFAULT ''
);


* - Beloved - Mar 2, 2010

im wondering could anyone walk me thru these steps, im not as bright as others in this type of stuff lol. i like to get to the goods. pm or anything.

thanks for reading!


* - izloo - Mar 7, 2010

there is any video tutorial for sql


* - T0SH1VA - Mar 7, 2010

nice tut


txt is 2 short


* - vandan - Mar 8, 2010

I'll use SQL injection But It I can' t Understand
Any One Can Help..............?


* - MiserAble - Mar 8, 2010

yeah bro nice tutorial


* - snehal13 - Mar 14, 2010

Nice post man...but i m too much lil kid to get this if u will help me telling all this well i will be very happy bro plz i m a kid so i cant get all this..sorry


* - Arctix - Mar 17, 2010

+1 , Great job daniel ^^


* - Air - Mar 18, 2010

Very helpful tutorial, cheers.


* - treadstone - Mar 20, 2010

thank you its really help


* - Sibbir - Mar 21, 2010

'or'1'='1 its not working...


* - Walexzy3 - Mar 21, 2010

google was just saying forbidden


* - DmW307 - Mar 25, 2010

Thx for your tuto ! I have just a question :
I have found a vulnerable site, but I don't found the number of columns even if I use "order by 1/*" or "order by 2/*" , etc.
The message is always the same :
"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 '-20,20' at line 8"

Can you help me plz ?


* - hacc - Mar 28, 2010

if you "order by" a number that is higher than the number of columns will you still get an error?

For example, a site has 5 columns so I should get an error on the 6th one, right? But lets say I don't want to go by ones, so I start at like 2, and then go to like 15. Would I get an error on the 15th? And then I would know less than 15? Or does it have to be exact?

Also, if I get a white screen after I typed ' at the end, does that mean its still vulnerable.


* - YeAt - Mar 28, 2010

This guy is a boss.

Very nice tutorial, helped me out a lot!

Thank you!