Security (Week 6, part #1) Flashcards

1
Q

What does OWASP stand for?

A

Open Web Application Security Project

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

What is OWASP used for?

A

Tracking web development issues around security

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

What are the top 10 security problems?

A
  1. Injection
  2. Broken Authentication
  3. Sensitive Data Exposure
  4. XML External Entities (XXE)
  5. Broken Access Control
  6. Security Misconfiguration
  7. Cross-site Scripting (XSS)
  8. Insecure Deserialization
  9. Using Components with Known Vulnerabilities
  10. Insufficient Logging and Monitoring
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the security problem ‘Injection’?

A

Any time sending untrusted data and received by interpreter –> could trick and send malicious code

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

What is the security problem ‘Broken Authentication’?

A

Authentication and session management broken

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

What is the security problem ‘Sensitive Data Exposure’?

A

Occurs when an application, company, or other entity inadvertently exposes personal data.

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

What is the security problem ‘XML Eternal Entities (XXE)’?

A

XML external entities are a type of custom XML entity whose defined values are loaded from outside of the DTD (document type definition) in which they are declared.

External entities are particularly interesting from a security perspective because they allow an entity to be defined based on the contents of a file path or URL

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

What is the security problem ‘Broken Access Control’?

Note what access control enforces and what failures lead to.

A

Access control enforces policy such that users cannot act outside of their intended permissions.

Failures typically lead to unauthorized information disclosure, modification or destruction of all data, or performing a business function outside of the limits of the user.

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

What is the security problem ‘Security Misconfiguration’?

A

Security misconfigurations are security controls that are inaccurately configured or left insecure, putting your systems and data at risk.

Basically, any poorly documented configuration changes, default settings, or a technical issue across any component in your endpoints could lead to a misconfiguration

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

What is the security problem ‘Cross-Site Scripting (XXS)?

A

Found in websites and/or web applications that accept user input.

Cybercriminals exploit this vulnerability by inputting strings of executable malicious code into these functions.

This injects the malicious code into the targeted website’s content, making it a part of the website and thus allowing it to affect victims who may visit or view that website.

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

What is the security problem ‘Insecure Deserialization’?

A

Vulnerability in which an untrusted or unknown data is used to either inflict a denial of service attack (DoS attack), execute code, bypass authentication or further abuse the logic behind an application.

Serialized objects can be structured in text such as JSON, XML or YAML.

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

What is the security problem ‘Using Components with Known Vulnerabilities’?

A

occurs when the components such as libraries and frameworks used within the app almost always execute with full privileges.

If a vulnerable component is exploited, it makes the hacker’s job easier to cause a serious data loss or server takeover.

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

What is the security problem ‘Insufficient Logging and Monitoring’?

A

occur when the security-critical event is not logged off properly, and the system is not monitored.

Lack of such functionalities can make malicious activities harder to detect and in turn affects the incident handling process.

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

When is there a danger of introducing an injection vulnerability?

A

Any time an application uses an interpreter of any type

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

When must information be scrubbed?

A

When a web application passes information from an HTTP request through as part of an external request

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

What is SQL injection?

A

Web security vulnerability that allows an attacker to interfere with the queries that an application makes to its database. It generally allows an attacker to view data that they are not normally able to retrieve.

A particularly widespread and dangerous form of injection

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

What is command injection?

A

cyber attack that involves executing arbitrary commands on a host operating system (OS).

Typically, the threat actor injects the commands by exploiting an application vulnerability, such as insufficient input validation

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

What are the three basics of all injections?

A
  1. All injection flaws are input-validation errors. •i.e. you’re not checking the input properly
  2. Input is not just text fields
  3. All external input is a source of a threat. -> The input contains the data with the threat
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What are the different types of input that can be used for injection attacks? (10)

A
text fields, 
list boxes, 
radio buttons, 
check boxes, 
cookies, 
HTTP header data, 
HTTP post data, 
hidden fields, 
parameter names,
parameter values
20
Q

Where should you validate data? Why?

A

Both client and backend/server sides.

Cannot assume that client has sufficient validation.

21
Q

Define authentication

A

establish claimed identify –> establish someone has the identity they claim to have e.g. have correct password

22
Q

Define authorisation

A

establish permission to act –> the person has the ROLE to access the e.g. file

23
Q

Does authentication proceed authorisation? ( proceed = before )

A

YES

24
Q

Why should we authenticate?

A

1) control access

2) log user activity and monitor

25
Q

What are the three factors that we can use to authenticate?

A

1) Something we know –> knowledge user has e.g. password, shared secrete
2) something we have –> physical, hard to find artifact e.g. blockchain, unique items
3) who you are –> biometric info e.g. finger print

26
Q

What security measures must be taken since HTTP is a “stateless” protocol?

A

1) means credentials have to go with every request
2) should use SSL for everything requiring authentication –> HTTP + SLL = HTTPS

=> password then auth_token

27
Q

What is SSL?

A

Secure Socket Layer

28
Q

What is the purpose of HTTPS compared to HTTP?

A

HTTPS encrypts and decrypts user page requests as well as the pages that are returned by the Web server

29
Q

How is it indicated that a web browser is using an SSL certificate?

A

displays a padlock icon but it may also display a green address bar

30
Q

What are some session management flaws?

A

1) SESSION ID used to track state since HTTP doesn’t. And it is just as good as credentials to an attacker.
2) SESSION ID is typically exposed on the network, in browser, in logs, …

31
Q

What are some side-doors for attackers?

A

Change my password, remember my password, forgot my password, secret question, logout, email address, etc…

Password hint is easy -> compromised, hijacked

32
Q

What is the typical impact of an attacker?

A

User accounts compromised or user sessions hijacked

33
Q

What are the best practices to verify your architecture? (4)

A

1) Authentication should be simple, centralized, and standardized
2) Use the standard session id provided by your container
3) Be sure SSL protects both credentials and session id at all times
4) use something like Google service to verify reliable and build web page/app that offloads user info to Google, say if user is logged in correctly then have session going on

34
Q

What are the best practices for verifying implementation? (5)

A

1) Forget automated analysis approaches
2) Check your SSL certificate
3) Examine all the authentication-related functions
4) Verify that logoff actually destroys the session
5) Use OWASP’s WebScarab to test the implementation

35
Q

Explain the process of cross-site scripting (XSS)

A

General idea: spoof user into thinking you are talking to expected web page server instead of attacker

1) Attacker sets the trap -update my profile.

Attacker enters a malicious script into a web page that stores the data on the server

2) Victim views page -sees attacker profile

Script runs inside victim’s browser with full access to the DOM and cookies

3) Script silently sends attacker Victim’s session cookie

36
Q

What is DOM-based XSS Injection?

A

allows an attacker to use the Document Object Model (DOM) to introduce hostile code into vulnerable client-side JavaScript embedded in many pages.

Browser interprets .js, HTML, the DOM etc

37
Q

How easy is it to mitigate DOM based XSS? Why?

A

Extremely difficult to mitigate against because of its large attack surface and lack of standardization across browsers

To do with interpreting data that you don’t trust.

38
Q

What measures can be taken to mitigate DOM based XSS injection? (2)

A

1) Untrusted data should only be treated as displayable text. Never treat untrusted data as code or markup within JavaScript code.
2) Always JavaScript encode and delimit untrusted data as quoted strings when entering the application (Jim Manico and Robert Hansen)

39
Q

How can we secure HTTP? (ideal approach)

A

Each request needs authenticating before authorising e.g. establish identify before serving up a resource

40
Q

What does each HTTP request contain?

A

All the information needed for the server to service that request - Remember: GET, POST, PUT, DELETE etc.

41
Q

How can we secure HTTP? (other approaches ) (5)

A

(not prioritised)

1) Hash username and password
2) Require users to change their passwords regularly
3) Use multi-factor authentication
- > Username & password
- > Code sent by phone
4) Salt the username and password -> Add additional elements to the ID information
5) Use HTTPS (HTTP + TLS)

42
Q

What is TLS?

A

Transport Layer Security

43
Q

What is HTTPS sometimes referred to as?

A

HTTP over TLS, or HTTP over SSL

44
Q

What is the difference between XSS and SQL injection?

A

XSS is a client-side vulnerability that targets other application users, while SQL injection is a server-side vulnerability that targets the application’s database.

45
Q

What is a DoS attack?

A

A Denial-of-Service (DoS) attack is an attack meant to shut down a machine or network, making it inaccessible to its intended users.