SQLi Flashcards

1
Q

In band Sqli (Classic SQLi)

A

In-band SQL Injection occurs when an attacker is able to use the same communication channel to both launch the attack and gather results. The two most common types of in-band SQL Injection are Error-based SQLi and Union-based SQLi.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Error based SQLI (classic)

A

Error-based SQLi is an in-band SQL Injection technique that relies on error messages thrown by the database server to obtain information about the structure of the database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Union-based SQLi (classic)

A

Union-based SQLi is an in-band SQL injection technique that leverages the UNION SQL operator to combine the results of two or more SELECT statements into a single result which is then returned as part of the HTTP response.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

SQLI Types

A

In-band SQLi, Inferential SQLi and Out-of-band SQLi.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Inferential SQLi (Blind SQLi)

A

In an inferential SQLi attack, no data is actually transferred via the web application and the attacker would not be able to see the result of an attack in-band (which is why such attacks are commonly referred to as “blind SQL Injection attacks”). Instead, an attacker is able to reconstruct the database structure by sending payloads, observing the web application’s response and the resulting behavior of the database server. The two types of inferential SQL Injection are Blind-boolean-based SQLi and Blind-time-based SQLi.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Boolean-based (content-based) Blind SQLi

A

Boolean-based SQL Injection is an inferential SQL Injection technique that relies on sending an SQL query to the database which forces the application to return a different result depending on whether the query returns a TRUE or FALSE result.

Depending on the result, the content within the HTTP response will change, or remain the same. This allows an attacker to infer if the payload used returned true or false, even though no data from the database is returned. This attack is typically slow (especially on large databases) since an attacker would need to enumerate a database, character by character.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Time-based Blind SQLi

A

ime-based SQL Injection is an inferential SQL Injection technique that relies on sending an SQL query to the database which forces the database to wait for a specified amount of time (in seconds) before responding. The response time will indicate to the attacker whether the result of the query is TRUE or FALSE.

Depending on the result, an HTTP response will be returned with a delay, or returned immediately. This allows an attacker to infer if the payload used returned true or false, even though no data from the database is returned. This attack is typically slow (especially on large databases) since an attacker would need to enumerate a database character by character.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Out-of-band SQLi

A

Out-of-band SQL Injection occurs when an attacker is unable to use the same channel to launch the attack and gather results.
Out-of-band SQLi techniques would rely on the database server’s ability to make DNS or HTTP requests to deliver data to an attacker. Such is the case with Microsoft SQL Server’s xp_dirtree command, which can be used to make DNS requests to a server an attacker controls; as well as Oracle Database’s UTL_HTTP package, which can be used to send HTTP requests from SQL and PL/SQL to a server an attacker controls.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly