Security Flashcards

1
Q

What does CORS stand for?

A

Cross-Origin Resource Sharing

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

What does CSRF stand for?

A

Cross-Site Request Forgery

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

What are the mitigations against CSRF attacks?

A
  • Tokens
  • Same site cookies
  • Referrer header check
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How is a CSRF attack carried out?

A

By the user loading a malicious site in their web browser, which attempts to make a request to another site in which the user is logged in. Taking advantage of their authenticated state, to trigger actions without the user’s knowledge.

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

What’s the difference between CSRF & XSS?

A

CSRF is an attack which takes advantage or a users authentication on another site to carry out state changing actions.

Whereas XSS is an exploit that allows an attacker to execute code on a users browser

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

What is SQL injection?

A

A hacking technique that’s used to execute malicious SQL statements

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

How does SQL injection work?

A

By inserting or “injecting” SQL code into a web form input or URL query string, manipulating the database behind a web application.

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

How can SQL injection attacks be prevented / guarded against?

A
  • input validation / sanitisation
  • parameterised queries
  • using an ORM
  • web application firewall
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What’s Reflected XSS?

A

The malicious script is included in a request made to the server (e.g., in a URL) and is reflected back in the server’s response, where it is executed by the client’s browser.

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

What’s stored XSS?

A

The malicious script is stored on the server (e.g., in a database) and is delivered to users when they access the affected web page.

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

What’s DOM-based XSS?

A

The attack payload is executed as a result of modifying the DOM (Document Object Model) environment in the victim’s browser, typically without needing to interact with the server.

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

What mitigations are there for XSS attacks?

A
  • Input sanitisation
  • Content security policy
  • output encoding
How well did you know this?
1
Not at all
2
3
4
5
Perfectly