EC-Council
412-79V10 · Question #36
Arnold is trying to gain access to a database by inserting exploited query statements with a WHERE clause. He wants to retrieve all the entries from a particular table (i.e. StudName) where…
The correct answer is C. SELECT * FROM StudName WHERE roll_number = '1' or '1'='1'. See the full explanation below for the reasoning.
Question
Arnold is trying to gain access to a database by inserting exploited query statements with a WHERE clause. He wants to retrieve all the entries from a particular table (i.e. StudName) where roll_number is equal to 1. What query does Arnold need to write to retrieve the information?
Options
- AEXTRACT * FROM StudName WHERE roll_number = 1 order by 1000
- BDUMP * FROM StudName WHERE roll_number = 1 AND '1'='1'
- CSELECT * FROM StudName WHERE roll_number = '1' or '1'='1'
- DRETRIVE * FROM StudName WHERE roll_number = '1#'
How the community answered
(19 responses)- A5% (1)
- B16% (3)
- C74% (14)
- D5% (1)
Community Discussion
No community discussion yet for this question.