Week 7 - Web Security Threats Flashcards

1
Q

What is Cross Site Scripting (XSS)

A

XSS is when the attacker embeds malicious client-side scripts into a legitimate website

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

Where does XSS happen?

A

when a website does not sanitize user input.

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

what are the two XSS categories?

A

Stored XSS attack and
Reflected XSS attack

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

what is Stored XSS attack?

A

attacker injects malicious script into a webpage, then stores it into it’s database.

victim requests data from the database but receives the compromised data

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

How does a stored XSS attack work on vulnerable websites?

A

the website must have an area of user input that is stored in a database and can be retrieved by the victim without being processed.

e.g a comment section

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

What are potential consequences of a stored XSS attack?

A

the attacker can redirect the victim to another website where malicious actions like:

phishing, malware downloads, accessing session cookies, or redirecting users to harmful websites.

<script>
window.open(‘http://unsafewebsite.html’)
</script>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a reflected XSS attack?

A

Malicious script is stored in the URL and the server reflects this back to the user’s browser.

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

How can an attacker deliver a reflected XSS payload to the victim?

A

an attacker might send a malicious URL via email or via forums, using URL shorteners to disguise the script

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

How to mitigate XSS attacks?

A
  1. don’t allow untrusted data to be inserted into sensitive areas
  2. use proper encoding (HTML encoding) for all user input to ensure it cannot be executed as script.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is broken Authentication?

A

when an attacker is able to compromise passwords, session keys or user account information to assume the user’s identity

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

How does Broken Authentication happen?

A

when people choose their own password or session management. it is risky because it makes the system prone to vulnerabilities

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

What is Sensitive Data Exposure?

A

when sensitive information (passwords, credit card details etc) are exposed or compromised due to security flaws (poor encryption or lack of access control)

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

How does Sensitive Data Exposure happen?

A

through SQL injection attacks or compromises of databases or other services

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

How can you mitigate sensitive data exposure?

A
  • do not store unnecessary sensitive information
  • use appropriate access and authentication controls
  • encrypt sensitive data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are XML External Entities (XXE) vulnerabilites?

A

when XML processes in a website are provided with malicious external data. This data could be a virus or a form of malware

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

How can you mitigate XML External Entities (XXE) vulnerabilities?

A
  • use JSON rather than XML
  • update older XML processors to the recent version
  • disabling external entities processing on web applications
17
Q

What is Security Misconfiguration?

A

when a system is not securely configured, often involving issues like weak passwords or outdated software/patches

18
Q

How can you mitigate security misconfigurations?

A
  • avoiding default configurations for usernames and passwords
  • keeping systems up-to-date with patches
  • regularly scanning for vulnerabilities.
19
Q

What is Broken Access Control?

A

when a system allows unauthorised users to access or perform actions on resources they should not have access to

20
Q

example of Broken Access Control - Direct Object?

A

when a user changes parameters in the URL to access data or resources they are not authorised to

21
Q

How can you fix direct object references?

A

ensure that the system checks if the authenticated user has permission to access the resource before executing any action or serving data.

22
Q

What is Missing Function Level Access Control?

A

Occurs when requests for functionality are fulfilled without checking the
user has authorisation

23
Q

How can you mitigate Missing Function Level Access Control?

A
  • Don’t show the user functions which they shouldn’t be
    able to access
  • Check access to functionality before providing it
  • Authorisation should be implemented for all functionality
24
Q

What is Serialisation

A

takes an object and turns into a data format that can be restored at another time (deserialisation)

25
Q

What is insecure deserialization?

A

when data that has been serialised has been manipulated by an attacker before it is deserialised. leading to unathorised access to a system

26
Q

How does insecure deserialization pose a security risk?

A

if user’s data is not properly validated before deserialisation, attackers can modify the serialised data to gain unauthorised access

27
Q
A