Vulnerabilities Flashcards

1
Q

Cross-Site Request Forgery

A
  • Web application accepts state-modifying requests (typically GET) without any sort of user authentication
  • As a result, any web page running in the same browser can make those requests on the user’s behalf
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Cross-Site Request Forgery Mitigations

A

Modifying state only through POST requests is good practice but only makes attacks a little harder, not impossible

Better mitigations operate using tokens:

  • Embed pseudo-random token (nonce) into form or cookie
  • Check token when request is received at server
  • Problem: requires additional, often stateful logic on the server
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

SQL Injection Mitigation

A

Escaping “bad” characters

  • Used character sets might change over time
  • Restrictions can degrade strength of passwords

Use Prepared Statements

  • Separate the logic of the query from the input parameters
  • User input will not be part of the executable code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Cross-site Scripting (XSS)

A

Injecting code such that this code is executed by the clients browser as
valid HTML / JavaScript code.

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

Kinds of XSS

A

Reflective, Persistent/Stored, DOM-Based/local

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

Reflective XSS

A

Injected input is sent back to the client, e.g., using GET parameters in a URL the victim got from an attacker

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

Persistent/Stored XSS

A

Injected input is sent stored on server side and delivered in future request, e.g. guest books or user profiles

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

DOM-Based / local

A

Exploit is interpreted/executed on the client machine. No server interaction needed, but some other attack vector is needed.

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

XSS Mitigation

A

Escaping “bad” characters via built-in function

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

Log Overflow

A

DoS by PCI express backend driver by sending a large number of kernel log messages.

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

Log Overflow Mitigation

A

Limit number of requests per user
Zip backups
Restrict the resources a user can cause a system to use

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

Path Traversal

A

Read, delete or write files that are not targeted or intended

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

Path Traversal Mitigation

A

Use the security manager
Restrict file access to reading access within specified directory

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

Buffer Overflow

A

Overwrite stack

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

Buffer Overflow Mitigations

A

Stack Canaries

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

Harcoded Credentials

A

Have credentials in the code or stored in plaintext

17
Q

Hardcoded Credentials Mitigations

A

Never store credentials in plaintext, only hashes of those
Also store credentials in external file with proper permissions

18
Q

Unsalted hashes

A

Unsalted hashes are vulnerable to brute force attack, dictionary attacks and rainbow tables

19
Q

Uncontrolled Format String Mitigation

A

Set format string explicitly
Sanitize

20
Q

OS Command Injection

A

Unsanitized input is forwarded to an OS command using a pipe attack

21
Q

OS Command Injection Mitigations

A

Try restricting the OS call to a single command
Generally avoid OS calls whenever possible
Ideally restrict inputs to those command via a whitelist

22
Q

Cache Poisoning

A

Vulnerability to cause specific data to be cached that aids the attacker’s objective

23
Q

Compression Bomb

A

DoS by filling up RAM or hard disk when uncompressing a compressed file

24
Q

Compression Bomb Mitigations

A

Inspect compressed input
Keep track how many bytes have been decompressed, or limit rounds
Limit Resources for Process