CSRF, SSRF Flashcards

(14 cards)

1
Q

What is CSRF?

A

malicious website tricks a user’s browser into sending unauthorised commands to a trusted website where the user is already logged in

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

What external elements could be used in CSRF?

A

Ad
Form
Chunk of JS
iFrame

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

CSRF Scenario

A
  1. User logged into bank website
  2. While logged in, user visits malicious website
  3. Malicious website secretly sends an unwanted request e.g., send money to attacker
  4. Because browser automatically includes user’s session cookies, bank thinks user requested the transfer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

CSRF Mitigation

A

CSRF Tokens
SameSite Cookies
User Interaction
Web dev framework

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

CSRF Mitigation: CSRF Tokens

A

Random hidden tokens that all requests must send and must match server values

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

CSRF Mitigation: SameSite Cookies

A

Tell browsers not to send cookies with cross-site requests

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

CSRF Mitigation: User Interaction

A

Re-authenticate or ‘Are you sure?’ confirmations

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

CSRF Mitigation: Web Dev Framework

A

Use well-know ones with CSRF protection. Keep up-to-date and subscribe to security bulletins

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

What is SSRF?

A

App fetches remote resource without URL validation, leads to attacker gaining access to internal systems

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

How SSRF works?

A
  1. Attacker supplies/modifies URL
  2. Code running on server will read or submit data
  3. Allows attacker to read server config, e.g. AWS metadata
  4. Attacker can connect to internal services like HTTP-enabled database or perform POST requests towards internal services
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Blind SSRF

A

malicious party has limited control over actual packets sent by server and/or server return nothing to malicious party

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

Non-blind SSRF

A

server returns data to malicious party

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

How is the web server used as a tool in SSRF?

A

Acts as a proxy for malicious attacker hiding true actor. Used for unauthenticated requests, protocol smuggling and data exfiltration.

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

SSRF Mitigation

A

only allow whitelisted safe domains
Block internal IP ranges
Disable unnecessary outbound connections
Use network segmentation - stop web servers reach internal services

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