0% found this document useful (0 votes)
27 views

Operating System Security Exam_1

The document contains exam questions and answers related to operating system security, covering concepts for designing secure systems, types of objects in an OS, the setuid bit, access matrices, principles of protection, SELinux, and file permissions. Key concepts include the principle of least privilege, the definition of protection domains, and the functionality of SELinux in enhancing Linux security. Additionally, it provides examples of user access rights based on file ownership and permissions.

Uploaded by

albsrawys686
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Operating System Security Exam_1

The document contains exam questions and answers related to operating system security, covering concepts for designing secure systems, types of objects in an OS, the setuid bit, access matrices, principles of protection, SELinux, and file permissions. Key concepts include the principle of least privilege, the definition of protection domains, and the functionality of SELinux in enhancing Linux security. Additionally, it provides examples of user access rights based on file ownership and permissions.

Uploaded by

albsrawys686
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Operating

system
security
Exam_1
Q&A From The First Four Lectures

‫من السنوات السابقة‬


]\

Sample A
Q1/ List five concepts that used for designing secure systems.

Answer:

1.​ Economy of mechanism: Keep the system as small and


simple as possible to reduce bugs and improve
understanding.
2.​ Fail-safe defaults: Default settings should prioritize security,
not insecurity.
3.​ Complete mediation: Check security policies every time an
action is taken.
4.​ Open design: Assume the attacker knows every detail of the
design. Security shouldn't rely on secrecy of the design itself.
5.​ Separation of privilege: Require separate credentials or
parties for critical actions (e.g., two-factor authentication).
6.​ Least privilege: Grant only the minimum necessary
privileges to users or processes.
7.​ Least common mechanism: Use separate data structures
and mechanisms for different users or processes.

Q2/ How many types of objects in OS? explain with example.

Answer:

1.​ Hardware objects: These are physical components of the


system. Examples include the CPU, memory segments,
printers, disks, and tape drives.
2.​ Software objects: These are logical constructs within the
system. Examples include files, programs, and semaphores.

1
]\

Q3/ what is setuid bit? and what is the benefit from it?

Answer:

●​ What it is: It's a special permission bit that can be set on an


executable file.
●​ Benefit: When a file with the setuid bit set is executed, the
process that runs it temporarily gains the privileges of the
file's owner (usually based on the owner's UID), rather than
the privileges of the user who executed the file. This allows
ordinary users to perform specific tasks that require elevated
privileges, which they wouldn't normally have.

Q4/ if you have the following domains and objects with the
following permissions, write the Access matrix for them.

{D1, D2, D3, D4, D5} , {F1, F2, F3, F4, printer 1, printer 2}

D1 → {F1, read}, {F3, read}, {F4, write}

D2 → {F2, write}, {F3, read}

D3 → {F1, read}, {F2, write}

D4 → {F4, read}, {printer 1, print}

D5 → {printer 2, print}

2
]\

Answer:

Domain F1 F2 F3 F4 printer 1 printer 2

D1 read read write

D2 write read

D3 read write

D4 read print

D5 print

3
]\

Sample B
Q1/ List the principles of protection.

Answer:

●​ The principle of least privilege: This dictates that programs,


users, and systems should be given only the minimum
privileges necessary to perform their tasks. This minimizes
the potential damage from failures or compromises.

Q2/ Explain the domain of protection, and explain the ways of


realizing a domain.

Answer:

●​ Domain of Protection: A computer system consists of


processes and objects (both hardware and software). A
protection domain specifies the resources that a process may
access. Each domain defines a set of objects and the types of
operations that can be invoked on each object. The ability to
execute an operation on an object is called an access right. A
domain, therefore, is a collection of access rights, represented
as ordered pairs: <object-name, rights-set>.

●​ Ways of Realizing a Domain:

1.​ Each user may be a domain: In this case, the accessible


objects depend on the user's identity. Domain switching
happens when users log in or out.
2.​ Each process may be a domain: The accessible objects

4
]\

depend on the process's identity. Domain switching


occurs when processes communicate (e.g., sending
messages).
3.​ Each procedure may be a domain: Accessible objects
correspond to the local variables of the procedure.
Domain switching happens during procedure calls.

Q3/ What is SELinux? and how does it provide security for


linux?

Answer:

●​ What it is: SELinux (Security-Enhanced Linux) is a mandatory


access control (MAC) mechanism integrated into the Linux
kernel.
●​ How it provides security: It adds an extra layer of security by
enforcing security policies at the kernel level. SELinux defines
rules that govern the interactions between processes and
resources. This helps prevent unauthorized access and
maintains the confidentiality of sensitive data by controlling
the actions that processes can perform. SELinux help to
protect privileged processes from executing malicious codes,
also it prevents transition to the administrator role and
domain to prevent unauthenticated users.

5
]\

Q4: Suppose a set of files have the following owners, groups,


and other mode bits as described below.

Name Owner Group Mode bits

F1 User 1 Group 3 rwxr- -r--

F2 User 2 Group 1 rw-rw-r--

F3 User 3 Group 3 rwxr- --r--

F4 User 4 Group 1 r--rw----

what can the following users operate on these resources


according to the following accesses? explain with authentication.

user1 → F3, user 1 → F2, user 2 → F4, user 2 → F1

Answer:

●​ user1 → F3:
○​ F3 Owner: User 3, Group: Group 3, Mode Bits: rwxr- --r--
○​ User 1 is not the owner (User 3).
○​ User 1 is in Group 3. The group permissions are --- (no
access).
○​ Conclusion: User 1 has no permissions on this file.

●​ user1 → F2:
○​ F2 Owner: User 2, Group: Group 1, Mode Bits: rw-rw-r--
○​ User 1 is not the owner (User 2).

6
]\

○​ User 1 is not in Group 1.


○​ "Others" permissions are r-- (read-only).
○​ Conclusion: User 1 can read F2 (as "other").

●​ user2 → F4:
○​ F4 Owner: User 4, Group: Group 1, Mode Bits: r--rw----
○​ User 2 is not the owner (User 4).
○​ User 2 is in Group 1. The group permissions are rw-
(read-write).
○​ "Others" permissions are --- (no access).
○​ Conclusion: User 2 can read and write to F4 (as a
member of Group 1).

●​ user2 → F1:
○​ F1 Owner: User 1, Group: Group 3, Mode Bits: rwxr--r--
○​ User 2 is not the owner (User 1).
○​ User 2 is not in Group 3.
○​ "Others" permissions are r-- (read-only).
○​ Conclusion: User 2 can read F1 (as "other").

Summary Table:

User File Access Granted Reason

User 1 F3 Read "Others" permissions

User 1 F2 Read "Others" permissions

7
]\

User 2 F4 Read, Write Member of F4's group


(Group 1)

User 2 F1 Read "Others" permissions

You might also like