SQL INJECTION

Any problem with PHP can be disscused here
Totaled_Eclipse
Posts: 10
Joined: Thu Jun 23, 2005 4:25 am

SQL INJECTION

Post by Totaled_Eclipse »

ive heard of ppl using MYSQL INJECTIONS to hack ppl chats. is there anyway to keep that from happening?


serkon
Posts: 4
Joined: Sun Jul 03, 2005 10:41 am

Post by serkon »

in sql server you can use ' or ''=' each field of username and pass
korsaan
Posts: 596
Joined: Sat Apr 09, 2005 2:55 pm
Contact:

Post by korsaan »

You can use hard password
And when you log to your file manager and see your files
You couldn't find that path /phpMyAdmin
So its absolutoly for any body to hack on your SQL
And they can hack on your SQL if you are uploading aprogramme concloude a patch
You should take care of the files that you are uploading to you host
With my best wishes:



KoRsAaN:D
Mrlinux
Posts: 15
Joined: Wed Jul 06, 2005 7:29 pm

Post by Mrlinux »

You can read more about them on: http://www.exploitx.com
Max
Posts: 44
Joined: Tue Jul 12, 2005 9:12 am

Post by Max »

You should also escape you querries.
Image
Lixas
Posts: 750
Joined: Wed Feb 16, 2005 4:21 pm

Post by Lixas »

so, with escape it is safer to do mysql queries?? i'm a ltl confuzed about that :-/
Image
Max
Posts: 44
Joined: Tue Jul 12, 2005 9:12 am

Post by Max »

Stupid example to understand the need to escape

Suppose you have a table with the fields : id, user and is_admin
You write a simple query to change the user :
'UPDATE table SET user=\''.$user.'\' WHERE id='.$id
But if you don't espace the $user variable, a cracker could use the value : foo ' ,is_admin='true
And your querry will set its is_admin flag to true.
Lixas
Posts: 750
Joined: Wed Feb 16, 2005 4:21 pm

Post by Lixas »

so, using parameters in url adress, or somewhere else cracker can crack my db ??
if yes, than mhmmm, bad, so i will have to rewrite all my home made CMS (content managenment system) script. But, better more job on security side, then cracked page :)
Image
UNDERCOVER
Posts: 115
Joined: Tue Apr 05, 2005 1:02 pm

Post by UNDERCOVER »

hey Totaled_Eclipse bad news for u them chat scripts u have nanyo fixed them so the can be hacked and in less u reeidt them u cant stop it its crunk thats hacking them he worked on the files so just better off geting new ones
toychoq
Posts: 108
Joined: Fri Apr 15, 2005 9:11 am

Post by toychoq »

what
how should we avoid it?
Locked