Login Register
The stories and information posted here are artistic works of fiction and falsehood. Only a fool would take anything posted here as fact.


How To Stop SQL Injection On Your Website filter_list
Author
Message
How To Stop SQL Injection On Your Website #1
Website Hacking always hot topic between Hacker,some days before i am tell you how to hack a website by SQL Injection with picture.

For watch old Post Click Here

Spoiler:
[Image: sql_injection.gif]


Today post about How to Safe your site against SQL Injection Attack because security of website too important for save your Data Base by access unauthorised person.

If your site SQL vulnerable then a hacker go to site login page and type tha administrator username and in the password field type or paste like this..

x' or '1'='1

If the site vulnerable then it login and you change all settings but how this code work.If you are able to log in then the code on side ...

$sql=
"SELECT*FROM users
"WHERE username="" . $username .
" AND password="" . $password ."";

then your code work as...

SELECT *FROM users WHERE username='admin' and PASSWORD='HrDe' or '1'='1

Here x' or '1'='1 has injected an extra phrase into the WHERE clause that means WHERE is always true,and this query will return a row contain the user's details.

If single user defined in the DB,then user's details will always returned else multiple users then one of those user will be returned at random.

Spoiler:
[Image: hacked.PNG]




How to safe website by Deface ?

How to fix vulnerable hole on your website,it's not difficult.Many ways to do it.If you work with MySQL then simply you fix it by using the
mysql_escape_string()
or
mysql_real_escape_string() function for example....

$userid=mysql_real_escape_string($userid);
$password=mysq;_real_escape_string($password);
$sql=
"SELECT*FROM users
"WHERE username="" . $username .
" AND password="" . $password ."";

This work as...

SELECT*FROM users WHERE username='admin' and PASSWORD='x\' or \'a\' =\'a

It backslashes(\) make the DB treat query like a normal character rather than as a delimiter,by it DB no interprets the SQL an OR in the WHERE clause.


http://hackarde.blogspot.com/2011/09/how...-your.html



1010011001111010010010101
0110G10H10O101S010T10101
1010100010100100101001001



Reply

RE: How To Stop SQL Injection On Your Website #2
Very nice post,some hacker post about hack but never any one post on how to secure by hack.Thank

Reply

RE: How To Stop SQL Injection On Your Website #3
nice share! finally some secure by hacks Biggrin
Nothing's impossible

Reply

RE: How To Stop SQL Injection On Your Website #4
(09-26-2011, 08:13 PM)Carlduke Wrote: nice share! finally some secure by hacks Biggrin
Thanx bro

1010011001111010010010101
0110G10H10O101S010T10101
1010100010100100101001001



Reply

RE: How To Stop SQL Injection On Your Website #5
This was a nice post. Thanx bro..

Reply

RE: How To Stop SQL Injection On Your Website #6
yo good approach.....but why u sharing anti hack arrangements in a hacker board lol

Reply

RE: How To Stop SQL Injection On Your Website #7
(09-26-2011, 07:37 PM)Coppa Wrote: Very nice post,some hacker post about hack but never any one post on how to secure by hack.Thank

Welcome bro :yes: u like my thread, thanks for it.

1010011001111010010010101
0110G10H10O101S010T10101
1010100010100100101001001



Reply

RE: How To Stop SQL Injection On Your Website #8
This is the Cool Share as my view defnitly ,
I guess also adding Extra ,'"+ +"' , Same to the This
as Sage said about XSS ,
i never thought about XSS :o :o :o ,
Thanks for the Sharing
[Image: Wfxdx.png]

Reply

RE: How To Stop SQL Injection On Your Website #9
Nice tutorial, very cool share.
Thanks Bro

Reply

RE: How To Stop SQL Injection On Your Website #10
(10-26-2011, 11:06 AM)The Alchemist Wrote: This was a nice post. Thanx bro..

Always welcome uBiggrinBiggrinBiggrinBiggrin

1010011001111010010010101
0110G10H10O101S010T10101
1010100010100100101001001



Reply







Users browsing this thread: 1 Guest(s)