Question: Use SQL injection to login as the first user of the database without that users username and password . If your attack is successful, you

Use SQL injection to login as the first user of the database without that users username and password. If your attack is successful, you should login as LeBron Jame

Knowing that LeBron James is the first user in the database, use SQL injection to login as the second user of the database without that users username and password. If your attack is successful, you should login as Steph Curry

Use SQL injection to update the password of Steph Curry to a password of your choice. Give here the values you provide for the Username and Password fields in this attack.

Use SQL injection to insert a new user into the table users. Give here the values you provide for the Username and Password fields in this attack.

Modify the code login.php so that a prepared statement is used for the query that searches and authenticates the user. Verify that using the prepared statement prevents each of the above attacks. Save your modified code as login_prep.php.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!