Question: Task 3 : SQL Injection Attack on UPDATE Statement If a SQL injection vulnerability happens to an UPDATE statement, the damage will be more severe,
Task : SQL Injection Attack on UPDATE Statement
If a SQL injection vulnerability happens to an UPDATE statement, the damage will be more severe, because attackers can use the vulnerability to modify databases. In our Employee Management application, there is an Edit Profile page Figure that allows employees to update their profile information, including nickname, email, address, phone number, and password. To go to this page, employees need to login first.
When employees update their information through the Edit Profile page, the following SQL UPDATE query will be executed. The PHP code implemented in unsafeedit.php file is used to update employees profile information. The PHP file is located in the varwwwseedlabsqlinjectioncompublichtml directory.
$conn getDB;
$sql "UPDATE credential SET nickname$nickname', email$email',
address$address', phonenumber$phonenumber', Password$pwd
WHERE id$inputid;
$connquery$sql
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
