A security administrator looking through IDS logs notices the following entry: (where email = ‘firstname.lastname@example.org’ and
passwd = ‘or 1==1’)
Which of the following attacks had the administrator discovered?
The code in the question is an example of a SQL Injection attack. The code ‘1==1’ will always provide a value
of true. This can be included in statement designed to return all rows in a SQL table.
SQL injection is a code injection technique, used to attack data-driven applications, in which malicious SQL
statements are inserted into an entry field for execution (e.g. to dump the database contents to the attacker).
SQL injection must exploit a security vulnerability in an application’s software, for example, when user input is
either incorrectly filtered for string literal escape characters embedded in SQL statements or user input is not
strongly typed and unexpectedly executed. SQL injection is mostly known as an attack vector for websites but
can be used to attack any type of SQL database.