Chapter 18 Flashcards

(33 cards)

1
Q

What programming practices help prevent buffer overflows?

A

Use bounds-checking functions (strncpy vs strcpy). Validate input lengths before copying. Use safe languages with automatic bounds checking. Avoid gets() use fgets() instead

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

Where should canary word checks occur in buffer overflow protection?

A

Check canary words before function returns. Verify canaries before critical operations. Check during exception handling. Immediate detection prevents exploitation

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

How does executable bit in page table prevent buffer overflow attacks?

A

Prevents execution of injected code in data pages. Stack and heap marked non-executable. Code injection becomes ineffective. Requires hardware support (NX bit)

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

What is purpose of salt with passwords?

A

Prevents rainbow table attacks on password hashes. Makes identical passwords have different hashes. Increases computational cost for attackers. Defends against precomputed attacks

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

Where should salt be stored and how used?

A

Store salt with password hash in database. Generate unique random salt per password. Concatenate salt with password before hashing. Salt can be stored in plaintext

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

What are two pros of watchdog programs for file security?

A

Fine-grained access control per file. Dynamic access decisions based on context. Can implement complex security policies. Real-time monitoring and logging

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

What are two cons of watchdog programs for file security?

A

Performance overhead for every file access. Complexity in programming and maintaining watchdogs. Potential single point of failure. May interfere with normal operations

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

List six security concerns for bank computer systems

A

Physical: server room access theft of equipment. Human: social engineering insider threats. OS: malware unauthorized access network intrusions data breaches

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

What makes denial-of-service attacks difficult to prevent?

A

Hard to distinguish legitimate from malicious traffic. Distributed attacks from many sources. Can overwhelm limited server resources. May use legitimate protocol features

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

What makes DOS attacks more effective and what are countermeasures?

A

More effective: botnets amplification attacks targeting bottlenecks. Countermeasures: rate limiting load balancing traffic analysis firewalls

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

What programs are prone to man-in-the-middle attacks?

A

Web browsers email clients instant messaging. Any unencrypted communication. Programs without certificate validation

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

What solutions prevent man-in-the-middle attacks?

A

Use encrypted connections (HTTPS SSL/TLS). Certificate pinning and validation. Digital signatures. Secure key exchange protocols

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

How is asymmetric encryption used for key exchange?

A

Client generates random symmetric key. Encrypts key with server’s public key. Sends encrypted key to server. Server decrypts with private key. Both use symmetric key for communication

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

What security problem occurs downloading public key from website directly?

A

Man-in-the-middle can substitute their own public key. No way to verify authenticity of received key. Attacker can decrypt and re-encrypt all traffic

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

How do certificate authorities solve the public key verification problem?

A

CA signs website’s public key with CA’s private key. Computers ship with CA’s public key pre-installed. Client verifies CA’s signature on website certificate. Establishes trust chain from CA to website

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

Why overwrite deleted sensitive data with random bits?

A

Prevents data recovery from deleted files. Physical sectors still contain data after deletion. Sensitive information could be retrieved. Random overwriting ensures data destruction

17
Q

What is relationship between capabilities at different ring levels?

A

Domain at level j has subset of capabilities of domain at level i (where j > i). Higher numbered levels have fewer privileges. Each level can only access what lower levels permit

18
Q

In process tree what is relationship between ancestor and descendant access rights?

19
Q

What protection problems arise with shared stack for parameter passing?

A

Buffer overflows can overwrite other process data. Process A can read process B’s parameters. Stack corruption affects multiple processes. Difficult to isolate security domains

20
Q

What protection structure exists when process n accesses object m only if n > m?

A

Hierarchical or lattice-based protection structure. Creates ordering of processes and objects. Prevents lower numbered processes accessing higher numbered objects

21
Q

How to implement policy allowing process to access object only n times?

A

Use access counter in capability list or access matrix. Decrement counter on each access. Revoke access when counter reaches zero. System must track usage per process-object pair

22
Q

Why is it difficult to protect system allowing user I/O?

A

Users can bypass OS security mechanisms. Direct hardware access circumvents access controls. Can potentially access other users’ data. Difficult to validate user I/O operations

23
Q

How can system ensure user cannot modify capability lists?

A

Store capabilities in protected system memory. Use cryptographic signatures on capability lists. Hardware protection for capability storage. System calls to access capabilities safely

24
Q

Is domain switching equivalent to including all privileges?

A

No - domain switching is temporary privilege escalation. Including all privileges is permanent access. Domain switching allows privilege separation. Better follows principle of least privilege

25
What is need-to-know principle?
Users should only access information necessary for their job function. Minimizes exposure of sensitive data. Reduces impact of security breaches. Implements minimal access philosophy
26
How does principle of least privilege aid protection systems?
Processes run with minimum necessary privileges. Reduces attack surface and potential damage. Makes security analysis easier. Limits scope of security failures
27
What is principle of defense in depth?
Multiple layers of security controls. If one layer fails others provide protection. Combines different security mechanisms. No single point of failure
28
How do access control lists differ from capability lists?
ACL: stored with object lists subjects with access. Capability list: stored with subject lists accessible objects. ACL good for object-centric control capability good for subject-centric
29
What is confused deputy problem?
Program with high privileges misused by low-privilege user. Deputy acts on behalf of user beyond user's authority. Classic example: compiler overwriting system files. Solved by authority-based access control
30
How does role-based access control work?
Users assigned to roles based on job function. Roles have associated permissions. Simplifies permission management. Users can activate/deactivate roles as needed
31
What is mandatory vs discretionary access control?
Mandatory: system enforces security policy users cannot change. Discretionary: users control access to their own objects. MAC provides stronger security DAC provides flexibility
32
How does information flow control work?
Tracks how information moves through system. Prevents unauthorized information disclosure. Based on security labels and classification. Implements multilevel security policies
33
What are covert channels and how are they prevented?
Hidden communication paths not intended by system design. Examples: timing channels storage channels. Prevention: eliminate shared resources audit for channels use information flow controls