Defensive Coding Flashcards

1
Q

Defensive Coding Requirements

A

1.) Code must follow the secure architecture
2.) Code must be free of internal weaknesses

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

Complexity

A

Enemy of Security

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

Types of input validation

A

Deny list
Allow list

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

Deny list

A

Drawback: infinite, easy to get around
Benefit: react quickly (often no re-compilation), straightforward

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

Allow list

A

Drawbacks:
Sometimes not possible to block certain characters
Often requires re-compilation and patches

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

Sanitizing Input

A

Convert input to something that won’t be interpreted as code
Drawback: need to know everything to escape

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

Concurrency Risks

A
  • Race conditions -> Denial of Service
  • Shared memory -> Potential Leakage
  • Weird circumstances -> Potential Tampering
How well did you know this?
1
Not at all
2
3
4
5
Perfectly