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?
Linux requires automated sandboxing for all applications.
Linux requires automated sandboxing for all applications.
False
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.
Signup and view all the answers
Match the following Linux security features with their descriptions:
Match the following Linux security features with their descriptions:
Signup and view all the answers
What is the primary advantage of using virtual machines?
What is the primary advantage of using virtual machines?
Signup and view all the answers
Containers contain their own operating systems, just like virtual machines.
Containers contain their own operating systems, just like virtual machines.
Signup and view all the answers
What is a hypervisor?
What is a hypervisor?
Signup and view all the answers
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.
Signup and view all the answers
Match the following technologies with their characteristics:
Match the following technologies with their characteristics:
Signup and view all the answers
Which of the following is NOT a disadvantage of virtual machines?
Which of the following is NOT a disadvantage of virtual machines?
Signup and view all the answers
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.
Signup and view all the answers
List one advantage of using containers over virtual machines.
List one advantage of using containers over virtual machines.
Signup and view all the answers
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.
Signup and view all the answers
Match the file permission commands with their functions:
Match the file permission commands with their functions:
Signup and view all the answers
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?
Signup and view all the answers
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.
Signup and view all the answers
What does 'rwx' signify in the permissions of a directory?
What does 'rwx' signify in the permissions of a directory?
Signup and view all the answers
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 ______.
Signup and view all the answers
What problem does virtual memory primarily solve?
What problem does virtual memory primarily solve?
Signup and view all the answers
Each program shares the same memory space in a virtual memory system.
Each program shares the same memory space in a virtual memory system.
Signup and view all the answers
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?
Signup and view all the answers
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 __________.
Signup and view all the answers
Match the following key concepts with their definitions:
Match the following key concepts with their definitions:
Signup and view all the answers
What does a page table entry map?
What does a page table entry map?
Signup and view all the answers
The offset in virtual and physical addresses is always identical.
The offset in virtual and physical addresses is always identical.
Signup and view all the answers
What is the purpose of a Translation Lookaside Buffer (TLB)?
What is the purpose of a Translation Lookaside Buffer (TLB)?
Signup and view all the answers
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.
Signup and view all the answers
What happens during a page fault?
What happens during a page fault?
Signup and view all the answers
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.
Signup and view all the answers
What is memory fragmentation?
What is memory fragmentation?
Signup and view all the answers
A __________ is used to classify and manage memory for each program efficiently.
A __________ is used to classify and manage memory for each program efficiently.
Signup and view all the answers
Match the following terms with their corresponding definitions:
Match the following terms with their corresponding definitions:
Signup and view all the answers
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?
Signup and view all the answers
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.
Signup and view all the answers
Which mechanism is used in Android for inter-process communication?
Which mechanism is used in Android for inter-process communication?
Signup and view all the answers
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.
Signup and view all the answers
Match the Linux commands with their respective functions:
Match the Linux commands with their respective functions:
Signup and view all the answers
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?
Signup and view all the answers
Linux uses a mandatory permission model for applications.
Linux uses a mandatory permission model for applications.
Signup and view all the answers
What is the primary purpose of cgroups in Linux sandboxing?
What is the primary purpose of cgroups in Linux sandboxing?
Signup and view all the answers
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.
Signup and view all the answers
Match the following sandboxing features to their purposes:
Match the following sandboxing features to their purposes:
Signup and view all the answers
What does the 'chmod 664' command do?
What does the 'chmod 664' command do?
Signup and view all the answers
Android's permission model allows users to revoke permissions at runtime.
Android's permission model allows users to revoke permissions at runtime.
Signup and view all the answers
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?
Signup and view all the answers
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.
Signup and view all the answers
Which security feature in Android helps prevent privilege escalation attacks?
Which security feature in Android helps prevent privilege escalation attacks?
Signup and view all the answers
Network isolation in Linux can be achieved through network namespaces.
Network isolation in Linux can be achieved through network namespaces.
Signup and view all the answers
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.