Podcast
Questions and Answers
Which security feature is integrated into Android to ensure the integrity of the operating system?
Which security feature is integrated into Android to ensure the integrity of the operating system?
- Seccomp
- SELinux
- eBPF
- Verified Boot (correct)
Linux requires automated sandboxing for all applications.
Linux requires automated sandboxing for all applications.
False (B)
What is the primary difference between Linux and Android in terms of sandboxing?
What is the primary difference between Linux and Android in terms of sandboxing?
Linux requires manual configuration while Android has automated sandboxing built into the ecosystem.
Android uses __________ to enforce mandatory app confinement.
Android uses __________ to enforce mandatory app confinement.
Match the following Linux security features with their descriptions:
Match the following Linux security features with their descriptions:
What is the primary advantage of using virtual machines?
What is the primary advantage of using virtual machines?
Containers contain their own operating systems, just like virtual machines.
Containers contain their own operating systems, just like virtual machines.
What is a hypervisor?
What is a hypervisor?
Containers require a ______ to run, which is an environment specific to its content.
Containers require a ______ to run, which is an environment specific to its content.
Match the following technologies with their characteristics:
Match the following technologies with their characteristics:
Which of the following is NOT a disadvantage of virtual machines?
Which of the following is NOT a disadvantage of virtual machines?
Both virtual machines and containers can run on any operating system without restrictions.
Both virtual machines and containers can run on any operating system without restrictions.
List one advantage of using containers over virtual machines.
List one advantage of using containers over virtual machines.
A ______ is responsible for unpacking container files and passing them to the operating system kernel.
A ______ is responsible for unpacking container files and passing them to the operating system kernel.
Match the file permission commands with their functions:
Match the file permission commands with their functions:
What does the 'D' in the file permission string (e.g., drwxr-xr-x) indicate?
What does the 'D' in the file permission string (e.g., drwxr-xr-x) indicate?
When a server's underlying operating system crashes, only the virtual machines on that server go down.
When a server's underlying operating system crashes, only the virtual machines on that server go down.
What does 'rwx' signify in the permissions of a directory?
What does 'rwx' signify in the permissions of a directory?
The sum of read (4), write (2), and execute (1) permissions gives a value of ______.
The sum of read (4), write (2), and execute (1) permissions gives a value of ______.
What problem does virtual memory primarily solve?
What problem does virtual memory primarily solve?
Each program shares the same memory space in a virtual memory system.
Each program shares the same memory space in a virtual memory system.
What is the term for the additional memory that can be accessed when RAM is insufficient?
What is the term for the additional memory that can be accessed when RAM is insufficient?
When a program tries to access data that is not currently in RAM, this situation is known as a __________.
When a program tries to access data that is not currently in RAM, this situation is known as a __________.
Match the following key concepts with their definitions:
Match the following key concepts with their definitions:
What does a page table entry map?
What does a page table entry map?
The offset in virtual and physical addresses is always identical.
The offset in virtual and physical addresses is always identical.
What is the purpose of a Translation Lookaside Buffer (TLB)?
What is the purpose of a Translation Lookaside Buffer (TLB)?
Programs can corrupt each other's data if they access the same __________ in a shared memory space.
Programs can corrupt each other's data if they access the same __________ in a shared memory space.
What happens during a page fault?
What happens during a page fault?
Having more RAM generally improves the performance of a computer during memory swapping.
Having more RAM generally improves the performance of a computer during memory swapping.
What is memory fragmentation?
What is memory fragmentation?
A __________ is used to classify and manage memory for each program efficiently.
A __________ is used to classify and manage memory for each program efficiently.
Match the following terms with their corresponding definitions:
Match the following terms with their corresponding definitions:
What command is used to add execute privileges for the owner and group in Linux?
What command is used to add execute privileges for the owner and group in Linux?
The default permissions for a key pair on AWS EC2 instances is set to 644.
The default permissions for a key pair on AWS EC2 instances is set to 644.
Which mechanism is used in Android for inter-process communication?
Which mechanism is used in Android for inter-process communication?
In a typical directory, the baseline permission can be set to _____ for the owner, group, and others.
In a typical directory, the baseline permission can be set to _____ for the owner, group, and others.
Match the Linux commands with their respective functions:
Match the Linux commands with their respective functions:
Which of the following best describes a key difference between Linux and Android sandboxing?
Which of the following best describes a key difference between Linux and Android sandboxing?
Linux uses a mandatory permission model for applications.
Linux uses a mandatory permission model for applications.
What is the primary purpose of cgroups in Linux sandboxing?
What is the primary purpose of cgroups in Linux sandboxing?
In Linux, the permission mode _____ lets the owner read and write, while the group can read only.
In Linux, the permission mode _____ lets the owner read and write, while the group can read only.
Match the following sandboxing features to their purposes:
Match the following sandboxing features to their purposes:
What does the 'chmod 664' command do?
What does the 'chmod 664' command do?
Android's permission model allows users to revoke permissions at runtime.
Android's permission model allows users to revoke permissions at runtime.
What is the base permission level for files in Linux commonly used for regular files?
What is the base permission level for files in Linux commonly used for regular files?
Applications in Android have their own unique _____ assigned at install time for sandboxing.
Applications in Android have their own unique _____ assigned at install time for sandboxing.
Which security feature in Android helps prevent privilege escalation attacks?
Which security feature in Android helps prevent privilege escalation attacks?
Network isolation in Linux can be achieved through network namespaces.
Network isolation in Linux can be achieved through network namespaces.
Flashcards
SELinux/AppArmor
SELinux/AppArmor
SELinux and AppArmor are security tools that enforce strict access control policies, limiting what programs and users can do within the system.
Seccomp
Seccomp
Seccomp is a mechanism that allows you to restrict the system calls a program can make, preventing it from doing harmful operations.
eBPF
eBPF
eBPF allows you to monitor and filter network traffic in real-time, enabling you to identify and block suspicious activity.
Verified Boot
Verified Boot
Signup and view all the flashcards
Google Play Protect
Google Play Protect
Signup and view all the flashcards
What is a virtual machine?
What is a virtual machine?
Signup and view all the flashcards
What is a hypervisor?
What is a hypervisor?
Signup and view all the flashcards
What is a container?
What is a container?
Signup and view all the flashcards
What is Docker?
What is Docker?
Signup and view all the flashcards
What is a container engine?
What is a container engine?
Signup and view all the flashcards
What are file permissions in Linux?
What are file permissions in Linux?
Signup and view all the flashcards
What is the chown
command in Linux?
What is the chown
command in Linux?
Signup and view all the flashcards
What is the chmod
command in Linux?
What is the chmod
command in Linux?
Signup and view all the flashcards
What are owner permissions in Linux?
What are owner permissions in Linux?
Signup and view all the flashcards
What are group permissions in Linux?
What are group permissions in Linux?
Signup and view all the flashcards
What are others permissions in Linux?
What are others permissions in Linux?
Signup and view all the flashcards
What is read permission in Linux?
What is read permission in Linux?
Signup and view all the flashcards
What is write permission in Linux?
What is write permission in Linux?
Signup and view all the flashcards
What is execute permission in Linux?
What is execute permission in Linux?
Signup and view all the flashcards
What is the key difference in operating system sharing between containers and VMs?
What is the key difference in operating system sharing between containers and VMs?
Signup and view all the flashcards
Linux Sandboxing
Linux Sandboxing
Signup and view all the flashcards
Android Sandboxing
Android Sandboxing
Signup and view all the flashcards
Namespaces in Linux Sandboxing
Namespaces in Linux Sandboxing
Signup and view all the flashcards
cgroups in Linux Sandboxing
cgroups in Linux Sandboxing
Signup and view all the flashcards
App Isolation in Android
App Isolation in Android
Signup and view all the flashcards
File Access Restrictions in Android
File Access Restrictions in Android
Signup and view all the flashcards
IPC Mechanisms in Android
IPC Mechanisms in Android
Signup and view all the flashcards
Permissions in Linux Sandboxing
Permissions in Linux Sandboxing
Signup and view all the flashcards
Permission Systems in Android
Permission Systems in Android
Signup and view all the flashcards
Network Isolation in Linux
Network Isolation in Linux
Signup and view all the flashcards
Network Isolation in Android
Network Isolation in Android
Signup and view all the flashcards
Inter-Process Communication (IPC) in Linux
Inter-Process Communication (IPC) in Linux
Signup and view all the flashcards
Inter-Process Communication (IPC) in Android
Inter-Process Communication (IPC) in Android
Signup and view all the flashcards
Security Goals of Linux Sandboxing
Security Goals of Linux Sandboxing
Signup and view all the flashcards
Security Goals of Android Sandboxing
Security Goals of Android Sandboxing
Signup and view all the flashcards
Virtual Memory
Virtual Memory
Signup and view all the flashcards
Physical Memory
Physical Memory
Signup and view all the flashcards
Address Translation
Address Translation
Signup and view all the flashcards
Page Table
Page Table
Signup and view all the flashcards
Page
Page
Signup and view all the flashcards
Offset
Offset
Signup and view all the flashcards
Page Number
Page Number
Signup and view all the flashcards
Page Fault
Page Fault
Signup and view all the flashcards
Translation Lookaside Buffer (TLB)
Translation Lookaside Buffer (TLB)
Signup and view all the flashcards
Memory Management Unit (MMU)
Memory Management Unit (MMU)
Signup and view all the flashcards
Multi-level TLBs
Multi-level TLBs
Signup and view all the flashcards
Multi-level Page Tables
Multi-level Page Tables
Signup and view all the flashcards
Swapping
Swapping
Signup and view all the flashcards
Swap Space
Swap Space
Signup and view all the flashcards
Study Notes
Virtual Machines vs. Containers
- Traditional server application setup involved one application per server, often underutilizing server power.
- Virtual machines (VMs) simulate multiple servers on a single physical machine using a hypervisor allocating hardware resources.
- Hypervisors include VMware ESXi, Citrix Zen Server, and Microsoft Hyper-V.
- VMs have drawbacks: large disk space usage due to dedicated OSes, high RAM and CPU consumption, slow startup times, and OS licensing costs.
- Containers package application code with all needed files, configurations, and dependencies.
- This allows easy distribution and runs without extra software/configurations.
- Docker is primarily used to manage containers.
- Containers share the server's underlying OS, making them lightweight, fast, and portable.
- Container images must be compatible with the server's OS.
- Container failure will affect all containers sharing the OS, whereas VM failure affects only the single VM.
Linux File Permissions
- All Linux files/directories have owner, group, and others permission levels.
- Each level has read (r), write (w), and execute (x) permissions.
- The "l" flag in the
ls
command shows detailed permissions:- "d" indicates a directory.
- "rwx" permissions for owner, group, and others.
- Dashes represent missing permissions.
chown
command changes file/directory owners and groups (e.g.,sudo chown <new_owner>:<new_group> <filename>
).chmod
command changes file/directory permissions using a numerical system (e.g.,chmod <number> <filename>
).- Example:
chmod 774 <filename>
(owner: rwx, group: rwx, others: r-x)
- Example:
Linux Sandboxing and Android Sandboxing
- Both mechanisms isolate and protect applications.
- Linux sandboxing uses namespaces, cgroups, SELinux, AppArmor to isolate processes.
- Android leverages Linux features, adding layers of abstraction for mobile app security and efficiency.
- Android's app isolation uses unique UIDs/GIDs, file access restrictions, and IPC mechanisms.
- Android's declarative permission model requires user consent and runtime permission management.
- Key Security Differences: Linux sandboxing customization is manual, while Android is automated and integrated into the platform.
- Android focuses on user privacy and malware prevention utilizing SELinux, Google Play Protect, etc.
Virtual Memory
- Virtual memory solves problems with insufficient RAM, memory fragmentation, and data security.
- Older computers often had limited RAM and the presence of multiple applications frequently causing issues.
- Memory fragmentation occurs when free memory is not contiguous.
- Security issues exist if programs have access to the same memory space.
- Virtual memory gives each program a unique address space, preventing overlaps and crashes.
- It maps virtual addresses (program's view) to physical addresses (RAM).
- Paging divides memory into fixed-size pages, making memory use efficient.
- The OS uses a page table for virtual-to-physical address translation.
- A translation lookaside buffer (TLB) is a cache to speed up translations.
- Page faults occur when a page is not in memory (RAM), and the OS moves a page from RAM to disk or vice-versa.
- Memory management units (MMUs) handle address translations and page faults.
- Multi-level page tables address the challenge of running many programs simultaneously, by keeping the first-level table in RAM, and potentially swapping the second level tables to disk to preserve space.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Explore the differences between virtual machines and containers in server application setups. This quiz covers topics such as hypervisors, resource allocation, and the benefits of using Docker for container management. Understand the technical aspects that make containers lightweight and portable compared to traditional VMs.