GCIH Exam QuestionsBrowse all questions from this exam

GCIH Exam - Question 86


An attacker has determined a web application is running the SQL command shown below. What could she enter for VALUE to get a list of all email addresses in the employee table and avoid syntax errors? select email from employee where name = `˜[VALUE]';

Show Answer
Correct Answer: AD

To obtain all email addresses from the employee table while avoiding syntax errors, VALUE should be set to `' or 1=1;--`, which effectively terminates the original query and appends a condition that is always true, followed by SQL comment syntax to ignore the remaining part of the query. This way, the attacker can bypass the intended condition and retrieve the desired data.

Discussion

2 comments
Sign in to comment
XBalOption: A
Mar 15, 2023

Should be "A"

847ch0n3Option: A
Mar 3, 2024

should be A.