Question: In this task you will use an SQL injection attack on a SELECT statement in order to log in without providing a password On the

 In this task you will use an SQL injection attack on

In this task you will use an SQL injection attack on a SELECT statement in order to log in without providing a password On the login form of the Collabtive website, there are input fields for the username and password. The PHP code handling the login looks roughly like this $user -$_POST [' username ']); $hash -SHA 1 (_POST' password ']); $query "SELECT ID, name FROM user WHERE (name = '$user, OR email ,$.user,) AND pass '$hash,". = $handlemysql_query ($query); $resultsmsqyl fetch_array ($handle); if (found one record) allow the user to login elsef reject login For your information, there are several accounts in the application, one of which has the username seed Also for your information, the database used by the web application is MySQL. Recall that comments in MySQL's version of SQL begin either with a hash character ( # ) or two dashes followed by a space (-) (the space after the two dashes is critical!) 4-1. [2 marks] Based on the source code, which field in the login form is a candidate for an SQL injection attack - username or password? Why

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!