Virtualization Flashcards

Important chapter of OSS

1
Q

Which of the following is a primary function of an operating system in enforcing security?

A. Providing user-friendly interfaces

B. Managing hardware resources

C. ​Enforcing protection boundaries between processes

D. Facilitating application development

A

Answer: C

Explanation:
The OS enforces protection boundaries to prevent processes from interfering with each other, ensuring system stability and security.

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

In the context of virtualization, what is the role of a hypervisor?

A. It acts as an antivirus program.

B. It manages user authentication.

C. ​It enables multiple operating systems to share a single hardware host.

D. It encrypts data for secure transmission.

A

Answer: C

Explanation:
A hypervisor allows multiple operating systems to run concurrently on a single physical machine by managing and allocating resources to each OS.

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

Which of the following best describes a system call?

A. A user-level function that performs calculations.

B. ​A mechanism for user applications to request services from the kernel.

C. A method for inter-process communication.

D. A type of malware attack.

A

Answer: B

Explanation:
System calls provide a controlled interface through which user applications can request services from the operating system’s kernel.​

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

What is the primary purpose of implementing user and kernel modes in an operating system?

A. To enhance graphical performance.

B. ​To protect system resources and ensure security.

C. To facilitate multitasking.

D. To manage user accounts.

A

Answer: B

Explanation:
User and kernel modes separate user processes from critical system operations, preventing unauthorized access and enhancing security.​

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

Which of the following is a characteristic of a virtual machine (VM)?

A. It cannot run different operating systems.

B. ​It emulates hardware to run multiple OS instances on a single physical machine.

C. It requires separate physical hardware for each OS.

D. It is limited to running only Linux-based systems.

A

Answer: B

Explanation:
VMs emulate hardware, allowing multiple operating systems to run on a single physical host, each in its isolated environment.

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

Which type of virtualization allows multiple secure virtual servers to run on the same operating system kernel?

A. Full virtualization

B. Paravirtualization

C. ​OS-level virtualization

D. Application-level virtualization

A

Answer: C

Explanation:
OS-level virtualization allows multiple isolated user-space instances, sharing the same OS kernel, to run on a single host.​

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

What is the function of the ‘user’ namespace in Linux containers?

A. It manages network interfaces.

B. ​It isolates user and group ID mappings between the host and containers.

C. It handles inter-process communication.

D. It controls file system mounts.

A

Answer: B

Explanation:
The ‘user’ namespace allows containers to have different user and group IDs than the host, enhancing security by isolating user privileges.​

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

Which of the following is a benefit of using containers over traditional virtual machines?

A. Containers require more system resources.

B. ​Containers have faster startup times and lower overhead.

C. Containers provide stronger isolation than VMs.

D. Containers can run different operating systems on the same host.

A

Answer: B

Explanation:
Containers share the host OS kernel, leading to faster startup times and reduced resource usage compared to full VMs.

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

In the context of operating system security, what is ‘context switching’?

A. Switching between different user interfaces.

B. ​The process of storing and restoring the state of a CPU so that multiple processes can share a single CPU resource.

C. Changing the system’s security context.

D. Updating the OS to a new version.

A

Answer: B

Explanation:
Context switching allows the CPU to switch between processes, ensuring multitasking while maintaining process isolation.

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

Which of the following is a potential vulnerability associated with virtual machines?

A. They cannot be infected by malware.

B. VM escape, where a malicious program breaks out of the VM to interact with the host system.

C. They provide complete immunity to network attacks.

D. They eliminate the need for operating system updates.

A

Answer: B

Explanation:
VM escape is a security risk where an attacker exploits vulnerabilities to move from the VM to the host system.

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

Which of the following best describes the principle of least privilege?

A. Users should have administrator access at all times.

B. Processes should run with maximum permissions.

C. Users and processes should operate with the minimum permissions necessary to perform their tasks.

D. All users should have equal access rights.

A

Answer: C

Explanation:
The principle of least privilege ensures that users and processes operate with only the permissions they need, reducing the risk of accidental or malicious damage.

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

What is a buffer overflow attack?

A. An attack that floods a network with excessive traffic.

B. An attack where more data is written to a buffer than it can hold, potentially allowing code execution.

C. An attack that intercepts data in transit.

D. An attack that disrupts service availability.

A

Answer: B

Explanation:
Buffer overflow attacks exploit vulnerabilities by overwriting memory, which can lead to arbitrary code execution or system crashes.

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

Which security model is based on a lattice structure with multiple security levels?

A. Clark-Wilson model

B. Biba model

C. Bell-LaPadula model

D. Brewer-Nash model

A

Answer: C

Explanation:
The Bell-LaPadula model uses a lattice structure to enforce access controls based on security levels, focusing on data confidentiality.

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

What is the main purpose of Address Space Layout Randomization (ASLR)?

A. To defragment the system memory.

B. To randomize memory addresses used by system and application processes, making exploitation more difficult.

C. To allocate more memory to critical processes.

D. To monitor memory usage patterns.

A

Answer: B

Explanation:
ASLR randomizes the memory locations of key data areas, making it harder for attackers to predict target addresses during exploitation.

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

Which of the following is an example of a Type 1 hypervisor?

A. VMware Workstation

B. Oracle VirtualBox

C. Microsoft Hyper-V

D. Parallels Desktop

A

Answer: C

Explanation:
Type 1 hypervisors, like Microsoft Hyper-V, run directly on the host’s hardware to control the hardware and manage guest operating systems.

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

What is the function of a Trusted Platform Module (TPM)?

A. To manage network traffic.

B. To securely store cryptographic keys and perform cryptographic operations.

C. To monitor system performance.

D. To enforce software licensing.

A

Answer: B

Explanation:
A TPM is a hardware component used to securely store cryptographic keys, certificates, and passwords, enhancing system security.

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

Which of the following best describes a ‘rootkit’?

A. A user with root privileges.

B. Malicious software designed to gain unauthorized root or administrative access to a computer.

C. A toolkit for root users to manage system settings.

D. A security patch for root vulnerabilities.

A

Answer: B

Explanation:
Rootkits are malicious programs that provide privileged access to a computer while concealing their presence.

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

What is the primary goal of Mandatory Access Control (MAC)?

A. To allow users to set their own access permissions.

B. To enforce access policies determined by a central authority based on classifications.

C. To provide flexible access controls for users.

D. To simplify permission management.

A

Answer: B

Explanation:
MAC restricts access based on information clearance and classification, with policies set by a central authority, not individual users.

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

Which of the following is a characteristic of the Biba Integrity Model?

A. No write-up; no read-down.

B. No read-up; no write-down.

C. Separation of duties.

D. Role-based access control.

A

Answer: A

Explanation:
The Biba model focuses on data integrity, enforcing rules that prevent data from being modified by lower integrity levels.

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

What is the purpose of a honeypot in network security?

A. To trap and analyze malware.

B. To distract attackers from legitimate targets.

C. To gather intelligence on attack methods.

D. All of the above.

A

Answer: D

Explanation:
Honeypots serve multiple purposes, including trapping malware, diverting attackers, and collecting data on attack techniques.

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

Define ‘sandboxing’ in the context of operating system security.

A

Answer:
Sandboxing is a security mechanism that isolates applications or processes in a restricted environment to limit their access to system resources and prevent potential harm to the host system.

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

What is a hypervisor and how does it function in virtualization?

A

Answer:
A hypervisor is software that enables the creation and management of virtual machines (VMs) by abstracting physical hardware.

It allocates resources such as CPU, memory, and storage to each VM and ensures isolation between them.

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

Distinguish between Type 1 and Type 2 hypervisors.

A

Answer:
Type 1 hypervisors run directly on the host hardware (bare metal), while Type 2 hypervisors run on top of an existing operating system.

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

What is the purpose of control groups (cgroups) in Linux containers?

A

Answer:
Cgroups are used to limit, account for, and isolate the resource usage (CPU, memory, disk I/O, etc.) of collections of processes.

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

Explain the concept of a VM escape.

A

Answer:
VM escape is a security vulnerability that allows a program running inside a VM to break out and execute code on the host system or another VM.

26
Q

How do Linux namespaces contribute to container security?

A

Answer:
Namespaces isolate system resources (like process IDs, hostnames, user IDs, file systems, and network access) so containers can’t interfere with each other or the host.

27
Q

What is a system call and why is it important in OS security?

A

Answer:
A system call is an interface for user applications to request services from the OS kernel.

It’s a critical control point for enforcing security policies.

28
Q

Describe Address Space Layout Randomization (ASLR).

A

Answer:
ASLR randomly positions key data areas of a process (stack, heap, libraries) in memory, making it harder for attackers to predict the location of specific functions or buffers.

29
Q

What are “protection rings” in an OS?

A

Answer:
Protection rings are hierarchical levels of privilege in a CPU, with Ring 0 for the kernel and Ring 3 for user applications, ensuring system integrity.

30
Q

What is the purpose of a Secure Boot?

A

Answer:
Secure Boot ensures that only trusted software (signed and verified) is loaded during the system boot process to prevent rootkits or bootkits.

31
Q

How does Docker differ from traditional virtualization?

A

Answer:
Docker uses OS-level virtualization, sharing the host OS kernel with isolated user-space instances, making it lighter and faster than full VMs.

32
Q

What is a “jail” in FreeBSD?

A

Answer:
A jail is a security mechanism in FreeBSD that partitions the operating system environment to create isolated user environments similar to containers.

33
Q

Explain “Just-in-Time (JIT) spraying” as an attack method.

A

Answer:
JIT spraying is a technique that abuses the JIT compilation process to inject predictable code into memory, bypassing protections like ASLR.

34
Q

Why is Qubes OS considered secure?

A

Answer:
Qubes OS isolates each application into its own virtual machine, minimizing the impact of a breach in any single app or process.

35
Q

What is the role of the kernel in enforcing security policies?

A

Answer:
The kernel manages and enforces access control, resource allocation, process isolation, and responds to system calls securely.

36
Q

Name one open-source hypervisor and its main advantage.

A

Answer:
Xen Project—it’s lightweight, secure, and supports paravirtualization, which can improve performance for certain workloads.

37
Q

What is a disposable VM in Qubes OS and how is it used?

A

Answer:
A disposable VM is a temporary virtual machine used to open untrusted files or web links, which is destroyed after use to prevent persistent threats.

38
Q

Why is privilege separation important in OS security?

A

Answer:
It limits the potential damage of compromised components by separating processes and assigning them only the privileges they need.

39
Q

What is an emulator and how is it different from a VM?

A

Answer:
An emulator replicates both hardware and software of a different system, allowing unmodified code for one architecture to run on another.

Unlike VMs, emulators don’t rely on the host’s CPU architecture.

40
Q

How do signed applets enhance Java security?

A

Answer:
Signed applets prove the code’s origin and allow the OS to apply appropriate permissions or restrictions based on the signature.

41
Q

How does virtualization contribute to operating system security?

A

Answer:
Virtualization enhances security through isolation—each virtual machine (VM) operates in a sandboxed environment, preventing processes in one VM from affecting others.

This limits the damage caused by a compromised system.

Virtualization also enables secure testing environments, supports rapid recovery via snapshots, and facilitates strong access control via hypervisors.

42
Q

Compare and contrast containers (e.g., Docker) and traditional VMs in terms of security, efficiency, and resource isolation.

A

Answer:
Containers are more lightweight and efficient because they share the host OS kernel, leading to faster deployment and reduced overhead.

However, VMs offer stronger isolation by emulating full hardware environments.

Containers have a larger attack surface due to the shared kernel, while VMs better contain security breaches.

43
Q

Explain ring-based protection in modern processors and its implementation in operating systems.

A

Answer:
Ring-based protection refers to CPU privilege levels (e.g., Ring 0 to Ring 3), with Ring 0 for the OS kernel and Ring 3 for user apps.

Most OSs use a two-ring model: Ring 0 for kernel space and Ring 3 for user space.

This separation prevents user programs from executing privileged operations, safeguarding system integrity.

44
Q

How do system calls act as a boundary between user and kernel space, and what is their role in security?

A

Answer:
System calls are controlled entry points that allow user-mode applications to request kernel services.

They serve as a gatekeeper by validating requests, enforcing permissions, and logging actions, which helps prevent unauthorized access and abuse of system resources.

45
Q

Evaluate the security implications of allowing root access inside a container.

A

Answer:
Allowing root access within containers can be dangerous because if a vulnerability exists in the kernel or container runtime, a malicious actor could escalate privileges to the host.

Techniques like user namespaces and rootless containers help mitigate this risk by mapping container root to a non-root host user.

46
Q

Describe the architecture and security model of Qubes OS.

A

Answer:
Qubes OS uses security-by-compartmentalization, isolating applications in lightweight virtual machines (AppVMs).

It uses the Xen hypervisor to run untrusted code in separate VMs and restricts inter-VM communication via controlled services, thus limiting the impact of breaches.

47
Q

Discuss the role and security of namespaces in containerized environments.

A

Answer:
Namespaces provide process-level isolation by giving each container its own view of system resources (e.g., PID, network, filesystem).

This prevents containers from seeing or affecting each other’s processes, enhancing security.

However, namespaces alone are insufficient without cgroups and security modules.

48
Q

What are common attack vectors in virtualized environments, and how can they be mitigated?

A

Answer:
Common attacks include VM escape, side-channel attacks, and hypervisor exploitation.

Mitigation strategies include keeping hypervisors updated, using secure APIs, disabling unused services, isolating management interfaces, and employing strict access controls.

49
Q

Compare paravirtualization and full virtualization in terms of performance and security.

A

Answer:
Paravirtualization offers better performance as it allows the guest OS to interact directly with the hypervisor via APIs, reducing overhead.

However, it requires OS modification, potentially exposing it to API-level vulnerabilities.

Full virtualization provides better compatibility and stronger isolation at the cost of performance.

50
Q

Explain the concept and implementation of sandboxing in web browsers or mobile OSs.

A

Answer:
Sandboxing isolates applications so that malicious or compromised processes cannot access sensitive system components.

Browsers use sandboxing to isolate tabs and plugins.

Mobile OSs (like Android) use app sandboxing with separate UIDs and permission models to limit access to resources.

51
Q

Analyze the challenges of securing a multi-tenant cloud environment using virtualization.

A

Answer:
Challenges include ensuring tenant isolation, preventing VM escape, securing shared resources, and managing hypervisor vulnerabilities.

Solutions involve strong network segmentation, encrypted storage, tenant-aware access controls, and monitoring tools to detect abnormal behaviors.

52
Q

How does Linux implement access control, and what enhancements exist for containers?

A

Answer:
Linux uses Discretionary Access Control (DAC), Mandatory Access Control (MAC via SELinux/AppArmor), and capabilities to limit root privileges.

For containers, it adds cgroups and namespaces for resource and process isolation, and seccomp filters to restrict system calls.

53
Q

Describe the security benefits and risks of using a single kernel shared across containers.

A

Answer:
The shared kernel model allows efficient resource use but introduces risks: a vulnerability in the kernel can compromise all containers.

Benefits include reduced overhead and faster startup.

Mitigations include rootless containers, seccomp profiles, and frequent kernel updates.

54
Q

What role do control groups (cgroups) play in limiting the impact of a compromised container?

A

Answer:
Cgroups limit CPU, memory, disk I/O, and other resources available to a container, preventing resource exhaustion (DoS) from affecting the host or other containers.

They contain misbehaving or compromised containers within predefined limits.

55
Q

Discuss the design principles behind the Bell-LaPadula and Biba models and their applicability to modern OS security.

A

Answer:
Bell-LaPadula enforces confidentiality (no read up, no write down), while Biba enforces integrity (no write up, no read down).

While strict, these models are useful in military and critical systems.

Modern OSs implement more flexible models but may integrate these principles via MAC policies.

56
Q

Evaluate how hypervisors can be hardened against attack and give real-world examples.

A

Answer:
Hypervisors can be hardened through patching, reducing the attack surface, enforcing code signing, and isolating management interfaces.

Xen and VMware ESXi support these measures.

Using hardware features like VT-d (IOMMU) also prevents device-based attacks.

57
Q

What is a virtual machine-based rootkit (VMBR), and how can systems protect against them?

A

Answer:
A VMBR installs a hypervisor beneath the existing OS to intercept and manipulate all system operations.

Protection includes Secure Boot, TPMs, and BIOS-level integrity checks to detect unauthorized hypervisor layers.

58
Q

Describe the life cycle of a process in an OS and the security controls at each stage.

A

Answer:
A process goes through creation, execution, waiting, and termination.

Controls include access control at creation, privilege checks during execution, resource monitoring during waiting, and secure cleanup at termination to prevent information leakage.

59
Q

Explain how “least privilege” is implemented in modern operating systems.

A

Answer:
Modern OSs implement least privilege using user roles, capabilities (Linux), permission bits, access tokens (Windows), and sandboxing.

Apps are denied access to resources unless explicitly granted, minimizing the impact of exploits.

60
Q

Assess the trade-offs between performance and isolation in virtualization technologies.

A

Answer:
VMs provide strong isolation but with higher overhead.

Containers offer better performance and scalability but with weaker isolation due to a shared kernel.

Choosing between them depends on workload sensitivity and performance needs.