SQL Injection Flashcards
Which of the following system table does MS SQL Server database use to store metadata? Hackers can use this system table to acquire database schema information to further compromise the database.
sysobjects
sysrows
sysdbs
syscells
sysobjects
Which of the following is the most effective technique in identifying vulnerabilities or flaws in the web page code?
Traffic analysis
Code analysis
Data analysis
Packet analysis
Code analysis
Identify the reason why Web Applications are vulnerable to SQL injection attacks.
Tests the content of string variables and accepts only expected values.
Reject entries that contain binary data, escape sequences, and comment characters.
Error messages reveal important information
Avoid constructing dynamic SQL with concatenated input values.
Error messages reveal important information
In which of the following attacks does an attacker pose a true or false question to an database to determine whether an application is vulnerable to SQL injection?
Union SQL injection
Error-based SQL injection
Blind SQL injection
In-band SQL injection
Blind SQL Injection
What is a piggybacked query?
A piggybacked query is when an attacker injects an additional malicious query into an original query to make the DBMS execute multiple SQL queries
What is a tautology?
In a tautology-based SQL injection attack, an attacker uses a conditional OR clause such that the condition of the WHERE clause will always be true. Such an attack can be used to bypass user authentication
What is an illegal/logically incorrect query?
An illegal or logically incorrect query is one an attacker uses to glean information from the error message the server provides in response to the query.
What is a UNION SQL injection?
A union sql injection injects a union clause to a sql statement, along with a select null statement (starting with 1 null, and incrementing from there). This can be used to determine the table’s column count.
Alternatively, you can inject ORDER BY 1 to sort by the first column, 2 for the second, etc. to determine column count.
How do you delay for a given amount of time in MySQL?
sleep()
What’s the wildcard character in most SQL dialects?
%
What function do you use in MySQL to obscure characters instead of using a string literal?
CHAR(int)
What is the concatenation operator in SQLite?
||
What is the concatenation operator in Oracle?
||
What is the concatenation operator in Access?
&
What is the concatenation operator in PostgreSQL
||