I'm trying to get around the DVWA high security SQL injection challenge, I've tried a bunch of automated scanning tools with no luck, read a bunch of articles saying it's impossible now i've turned to the source code:
You can submit a number (id) to select some details from within the database. I'm trying to pull all rows out:
$id = stripslashes($id);
$id = mysql_real_escapse_string($id);
if (is_numeric($id))
{
SELECT first_name, last_name FROM users WHERE user_id = '$id';
}
I've tried putting hex numbers and commands and things through it, it gets past the checks but doesn't work. Now i'm not 100% sure about the backend, but is there anyway to reconstruct the strings from hex once i'm past the is_numeric()
check?
Dvwa uses mysql_query, not mysqli or prepared statements if that's any help
Any pointers would be much appreciated!