Computer Hacking Forensic Investigator (CHFI v10) — Question 82
What will the following command produce on a website login page? SELECT email, passwd, login_id, full_name FROM members WHERE email =
'[email protected]'; DROP TABLE members; --'
Answer options
- A. Deletes the entire members table
- B. Inserts the Error! Reference source not found.email address into the members table
- C. Retrieves the password for the first user in the members table
- D. This command will not produce anything since the syntax is incorrect
Correct answer: A
Explanation
The correct answer is A because the command includes a SQL injection that effectively executes a drop table command, leading to the deletion of the entire members table. Options B and C are incorrect as they do not represent the effect of the command, and option D is wrong since the syntax is actually valid despite being malicious.