Worksheet 05: OS Security and Access Control | Computer Security (Fall 2024)
Reveal ALL Solution

Worksheet 05: OS Security and Access Control

Worksheets are self-guided activities that reinforce lectures. They are not graded for accuracy, only for completion. Worksheets are due by the start of the next lecture via Blackboard link as a single PDF document. Be sure to properly label each question.

Questions

  1. Let’s do some practice with bytes, bits, octets, and hexadecimal. For each of the numbers below, write them out in the other bases not present.

    • 10110101 (binary)
    • 652 (base 8)
    • 0xa4 (base 16)

    Reveal Solution

  2. Consider a memory system with 16-bits of addressable memory as described in Figure 5.1 in the book, how many bits of storage are needed to store the base and bound values in the descriptor register?

    Reveal Solution

  3. The privilege bit must be set in order to update the descriptor register, and only the supervisor can change this bit. Consider again a 16-bit memory system with addressable memory. If 50% of the memory is reserved for the supervisor code, and that 50% is always in the lower half of the address space, what would the descriptor register be set to (in terms of its base and bound) for a new program that the supervisor was loading if that new program used the remainder of the 50% of memory? (You can write your answers in terms of powers of two.)

    Reveal Solution

  4. Still considering the system as described in Figure 5.1, explain how shared libraries are a real challenge with isolation systems with a single descriptor register?

    Reveal Solution

  5. Finally, still referring to Figure 5.1, describe another limitation of this system (not from the question above).

    Reveal Solution

  6. A more modern approach to program memory isolation leverages memory segments. For example, a program, when loaded into memory, has multiple segments that are necessary to run the program. This includes the stack, heap, code, and data. Of those, the stack and heap should be read/write, the code segment execute/read, and the data should be read-only.

    Consider the 5 bit field, RWXMF, described on page 128 of the book. What is the bit field for stack, heap, code, and data segments?

    Reveal Solution

  7. Of the segments of a program described above, which one can also have a M bit set if the program is designed to run as the supervisor? Explain why.

    Reveal Solution

  8. Is the relationship between UID and PID one-to-one, many-to-many, one-to-many, or many-to-one. Explain.

    • one-to-one: exactly one UID maps to one PID and that PID only matches to that UID
    • many-to-many: many UIDs can match to many, different PIDs and many, different PIDs can match to many PIDs
    • one-to-many: one UID can match to many, different PIDs
    • many-to-one: Many UIDs can match to the same PID

    Reveal Solution

  9. What is a security kernel and what properties should it have? How does it compare to modern OS kernels, like UNIX/Linux?

    Reveal Solution

  10. Consider access control matrices – explain how managing this doesn’t scale, and what the solution would?

    Reveal Solution

  11. Convert the following ACM to ACLs by enumerate the ACE per object.

              foo   bar   baz  bee  bop  
    -----------------------------------
    peter  |   RW   X     
    paul   |   RW   X     R          R
    mary   |                   RW    
    george |        X     RW         R  
    ringo  |   
    john   |  RWX        RWX   
    

    Reveal Solution

  12. Consider the following /etc/password entry.

    aaviv:2212:2302:Adam Aviv:/home/aaviv:/bin/bash
    

    For each item in the entry, label it’s meaning.

    Note that modern /etc/password entries do not store passwords, that’s stored in /etc/shadow

    Reveal Solution

  13. Provide an example where user groups are useful for controlling access?

    Reveal Solution

  14. What is the UID of the root user?

    Reveal Solution

  15. The file permission bit field consists of 12 bits. Provide a short description of them.

    Reveal Solution

  16. Convert the following octal permission representation to a symbolic display, or vice versa

    600
    -rw-rw---x
    drwx--xr-x
    574
    

    Reveal Solution

  17. The umask or (“unset mask”) is way to set a system wide (or user level) default file creation permission setting. What permission would newly created files have if the umask (in octal) were as follows and the initial file creation default is 666

    377
    166
    000
    

    Reveal Solution

  18. Provide a short description of the setuid and setgid protective bits and what happens when an executable has it set

    Reveal Solution

  19. What is the differences between rUID and eUID of a running process?

    Reveal Solution