L12 - Lightweight sandboxes Flashcards
Containers vs VMs
containers:
- use Linux primitives
- share linux kernel
- fast starts, minimal overhead
- flexible isolation
VMs:
- virtualize hardware components
- use separate kernels
- slower starts, must boot kernel and set-up hardware
What is CRI?
Container Runtime Interface
- Kubernetes API
- defines the way that Kubernetes interacts with different container runtimes
container runtime
software components that can run containers on a host operating system
OCI
Open Container Initiative specifications for container images and running containers.
runc
runc is an OCI-compliant tool for spawning and running containers. Implements the OCI specifications.
What is Containerd
- container runtime
- manages complete container lifecycle of its host system (image transfer and storage)
What is a shim?
- piece of software that resides between containerd and a low-level container runtime (runc)
- abstracts low-level runtimes
- lives as long as the container process
internet:
- By providing compatibility between different components, shims make it easier to use different container runtimes with a variety of container images.
Why is there need for more isolation?
Prevention of kernel bugs.
What are three types of exploits concerning the kernel?
- System API (bugs within the kernel can be exploited via the API)
- System Application Binary Interface (ABI) (Hardware and software exploits targeting the execution path in response to events)
- Side Channels (exploit indirect effects of the system)
Sandbox
internet:
A sandbox is a secure, isolated environment that enables the execution of untrusted or potentially malicious code without affecting the host system. In computer security, a sandbox acts as a protective barrier between an application and the host system, limiting the application’s access to system resources and preventing it from making harmful changes to the system. Sandboxes are used for various purposes, including software testing, application isolation, and security.
gVisor
- secure-container runtime writting in Go
- minimizes the system API attack vectors
internet:
gVisor is an open-source project that provides a secure sandbox for containers. It acts as a lightweight runtime, isolating containers from the host system and potentially untrusted applications, while still providing access to the host system’s resources. gVisor enhances the security of containers by limiting the system calls a container can make and by providing additional security features such as process isolation and file system protection.
drawbacks of gVisor
- not well suited for syscall heavy workload
- not all syscalls are implemented
KVM
Kernel-based Virtual Machine (KVM) is a virtualization module in the Linux kernel that allows the kernel to function as a hypervisor.
kernel
The kernel is a computer program at the core of a computer’s operating system and generally has complete control over everything in the system.
VMM
Virtual Machine Manager (VMM): Also called a “hypervisor,”