Lecture3 XSS Flashcards

1
Q

XSS flaws occur when …

A

user supplied data included in page sent to browser without properly validating or escaping that content

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

A page that is vulnerable to Stored XSS will ….

A

execute the injected script every time the page is loaded by the browser (persistent XSS)
examples: blog posts, comments, registration, edit profile

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

Stored XSS: Inspecting the source code shows ….

A

where the data has landed

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

Stored XSS attacks make use of ….

A

the improper treatment of dynamic content coming
from a backend data store.
The attacker abuses an editable field by inserting some JavaScript code, which is evaluated in the browser when another user visits that page

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

Lack of data sanitisation/ filters reflects untrusted data and opens the door to ….

A

1) Script Injection
2) iFrame phishing
3) Redirection
4) Cookie stealing
5) Identity theft
6) DoS - website vandalism
7) Financial fraud

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

XSS protection 1

A

1) Blacklisting (poor protection)
2) Whitelisting
3) html encoding

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

XSS protection 2

A

1) Whitelist values drop-down list
2) Content Security Policy
3) Sanitise HTML: use HTML sanitization library to stop script injection
4) HTTP-only cookies: cookies will be received, stored, sent by the browser but cannot be modified by JS

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

Content Security Policy

A

the script that’s running on a web page must be stored on a specific web server

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