Secure Software Design - Set-UID Programs Flashcards
What is the purpose of Set-UID programs?
To grant temporary superuser privileges to regular users for specific tasks.
Fill in the blank: Set-UID programs allow temporary ______ to regular users to perform specific operations.
Superuser privileges
List two common approaches to granting limited elevated privileges in Unix systems.
Daemon processes and Set-UID programs.
What does the Set-UID bit do?
Marks a program to run with the file owner’s privileges, often temporarily granting elevated rights to users.
Name the three user IDs associated with a process in Unix-based systems.
Real user ID, effective user ID, and saved user ID.
Fill in the blank: In Set-UID programs, the ______ ID controls access permissions during execution.
Effective user
Give an example of a Set-UID program commonly used in Unix.
The ‘passwd’ program, which allows non-root users to change passwords.
Why is capability leaking a security concern in Set-UID programs?
It allows residual privileges to be exploited if privileges aren’t downgraded properly.
What function should be used instead of ‘system()’ to reduce security risks in Set-UID programs?
The ‘execve()’ function, as it avoids invoking the shell.
Explain a security risk of using ‘system()’ in Set-UID programs.
Users can inject arbitrary commands if ‘system()’ is used, potentially leading to unauthorized actions.
Fill in the blank: To avoid command injection in Set-UID programs, use ______ instead of ‘system()’.
execve()
Why is it important to close file descriptors in privileged programs?
To prevent unauthorized users from accessing files with elevated permissions.
Fill in the blank: Failing to close file descriptors in Set-UID programs can lead to ______ leaks.
Capability
How do environment variables pose a security risk in Set-UID programs?
Unsanitized environment variables can be manipulated to influence program behavior, especially in privileged processes.
What environment variable is commonly manipulated to change library paths in Unix?
LD_LIBRARY_PATH or LD_PRELOAD.