2.3 Understanding Code and SQL Injection Attacks Flashcards

(19 cards)

1
Q

What is a Code Injection Attack?

A

An attacker inserts their own malicious code into an application’s input

Prevention involves implementing checks to prevent unwanted data injection. Examples include HTML, SQL, and XML injections.

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

What is a SQL Injection (SQLi)?

A

A specific type of code injection where an attacker inserts their own SQL requests into queries made to a database

Exploits applications lacking proper input validation.

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

How does SQL Injection exploit a vulnerability?

A

It allows the attacker to manipulate database interactions by inserting malicious SQL code into input fields

Often not difficult to exploit and can be done directly through browser input fields.

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

What is Structured Query Language (SQL)?

A

The most common language for applications to interact with databases

Used for retrieving or modifying data in a database.

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

What happens when an attacker injects ‘OR 1=1’ into a SQL query?

A

The database returns all records, effectively bypassing the intended filter

Since 1=1 is always true.

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

Why is SQL injection considered easy to exploit?

A

It often requires no special software or user interaction; just adding code to input fields

Attackers can simply manipulate input without complex setups.

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

List three actions an attacker can perform with complete control over a database gained through SQL injection.

A
  • Viewing all data
  • Deleting all data
  • Making changes to data
  • Bringing the database down (Denial of Service)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What would be the normal SQL query sent to the database if a user inputs ‘Professor’?

A

SELECT * FROM users WHERE name = ‘Professor’

This is the standard query constructed by the application.

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

What is the purpose of the ‘Webgoat’ application?

A

It is specifically written to be vulnerable to attacks like SQL injection

Designed for learning and demonstrating security vulnerabilities.

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

Is additional software or user interaction typically required for a SQL injection?

A

No

Attackers can simply add their malicious code into existing input fields.

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

Define Code Injection Attack.

A

A type of application attack where an attacker inserts their own malicious code into the information provided as input to an application.

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

What does SQL stand for?

A

Structured Query Language.

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

What is the main function of SQL?

A

To serve as the most popular way for an application to interact with a database.

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

What are input fields?

A

Interactive controls in an application where users can enter data.

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

What is a vulnerability?

A

A weakness or flaw in a system or application that can be exploited by an attacker.

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

What does the term ‘circumventing security’ mean?

A

Bypassing or getting around established security measures or controls.

17
Q

What is an example of a SQL query?

A

SELECT * FROM users WHERE name = ‘Professor’.

18
Q

Fill in the blank: SQL Injection is a specific type of code injection attack where an attacker inserts malicious _______ into an application’s queries to a database.

A

SQL requests.

19
Q

True or False: SQL injection requires complex user interaction to exploit.