The editor holds the query that a login form builds. The app pastes the username box between the first pair of quotes and the password box between the second pair. You play the attacker first: change only the text between the quotes.
- Run the query. How many rows come back for the password
guess? - Replace only
guesswith an input that returns every user. - Put
guessback. Replace onlyavawith an input that logs you in asadmin, and no one else. The password staysguess. - Now fix the app. Create a prepared statement named
loginwith twotextparameters: the same query, with$1for the username and$2for the password. - Log in as
avawith the passwordkraken123throughlogin. - Send the attack of task 2 through
loginas ava's password. How many rows come back?