Topic 2: Web Vulnerabilities Flashcards

1
Q

What are the 2 types of XSS attacks?

A

stored: code stored on target server
reflected: code added to URL, delivered to client, executed immediately

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

how does Cross site scripting (xss) work?

A

attacker injects malicious scripts into webpage visited by victim, bypass origin policy

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

how is info exfiltrated?

A

form redirection: script nonce/hashes ensure that only valid scripts run

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

what are some xss defenses?

A

application-level firewalls, browser filters, input escaping, static code analysis

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

where do vulnerabilities come from?

A

3rd party & software supply chain

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

what is CSRF

A

attacker sends arbitrary http requests on behalf of victim

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
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
8
Q

how does CSRF work?

A

user authenticated with site A/logged on, malicious site B tricks user into submitting malicious site request to site A

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

CSRF home router example

A

CSRF against router, now attacker can add names to DNS, disable wireless authentication, disable firewalls, set new passwords

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

CSRF countermeasures

A

server-side: generate token as part of form and validates upon reception (use IDs, hashes)
client-side: cookie flag “samesite=strict” prevents the browser from attaching cookies to 3rd party requests

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

biggest issue with websecurity?

A

handling of user input as input validation cannot be done on the client

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

secure coding practices for SQL injection

A
  • developers must never allow client-supplied data to modify SQL statements
  • required SQL statements should be stored procedures in database server
  • use prepared statements
How well did you know this?
1
Not at all
2
3
4
5
Perfectly