LESSON8-WEBSECURITY Flashcards

1
Q

is a crucial aspect of web development.

A

Web security

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

Ensuring the security of web applications protects sensitive data, maintains user trust, and prevents malicious activities.

A

Web security

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

vital for protecting sensitive user data, maintaining the integrity of web applications, and preventing unauthorized access.

A

Web security

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

can lead to data theft, financial loss, legal consequences, and damage to a website’s reputation.

A

Security breaches

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

are processes used to ensure that user inputs are safe and meet expected formats.

A

Validation and sanitization

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

checks if the input meets specific criteria

A

Validation
filter_input(INPUT_POST, ‘email’, FILTER_VALIDATE_EMAIL);

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

cleans the input to remove any harmful characters.

A

sanitization
filter_input(INPUT_POST, ‘username’, FILTER_SANITIZE_STRING);

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

is a technique used by attackers to manipulate SQL queries by injecting malicious code.

A

SQL injection

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

Preventing SQL injection involves using _____ and ______.

A

prepared statements ; parameterized queries

$stmt = $mysqli->prepare(“SELECT * FROM users WHERE username = ? AND password = ?”);
$stmt->bind_param(“ss”, $username, $password);
$username = $_POST[‘username’];
$password = $_POST[‘password’];
$stmt->execute();
$result = $stmt->get_result();

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

attacks inject malicious scripts into web pages viewed by other users.

A

Cross-Site Scripting (XSS)

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

Preventing XSS involves ______ before displaying them on the page.

A

escaping user inputs
htmlspecialchars()

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

allows attackers to execute arbitrary code on a server. Preventing this involves validating and sanitizing file uploads and commands.

A

Remote code execution

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

involves stealing a user’s session ID to impersonate them.

A

Session hijacking

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

Preventing session hijacking includes ________ and using ______.

A

regenerating session IDs ; secure cookies

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

Essential for protecting data and maintaining trust.

A
  • Importance of Security
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Ensures inputs are safe and meet expected formats.

A
  • Validation and Sanitization
17
Q

Uses prepared statements to secure database queries.

A
  • Preventing SQL Injection
18
Q

Escapes user inputs before displaying them.

A
  • Preventing XSS
19
Q

Validates and sanitizes file uploads.

A
  • Preventing Remote Code Execution
20
Q

Regenerates session IDs and uses secure cookies.

A
  • Preventing Session Hijacking