alaios
05-18-2005, 06:27 PM
Hi.. i am trying to create some sql queries susceptible to injection attacks in order to realize all the aspects for this hot issue.. the problem is that i am not able to create such a query
For example one classical login sql script is the below one
sql='select * from Users where username="' . $_POST["username"] . '" and password_2="' .$_POST["password"] . '"' ;
I am trying to change it a little in order to take access on the systemm..
the query has this format select... from .. where username='username' and password='password'
If i can alter it to select... from .. where username='username' and password='password' or 1=1
so i can easily gain access in the sytem..
The problem is that when i enter some quotes the php automatically put a \ so i cannot modify it at all. So i have started wondering if mysql injection attack can really work or not.
Thx a lot
For example one classical login sql script is the below one
sql='select * from Users where username="' . $_POST["username"] . '" and password_2="' .$_POST["password"] . '"' ;
I am trying to change it a little in order to take access on the systemm..
the query has this format select... from .. where username='username' and password='password'
If i can alter it to select... from .. where username='username' and password='password' or 1=1
so i can easily gain access in the sytem..
The problem is that when i enter some quotes the php automatically put a \ so i cannot modify it at all. So i have started wondering if mysql injection attack can really work or not.
Thx a lot