ACLs Flashcards
(30 cards)
What is an ACL?
Access Control List, a security mechanism defining permissions for resources.
Why are good ACLs important?
Prevent unauthorized access or modification of sensitive data.
What is an example of a vulnerable ACL?
Everyone (Full Control) on a registry key.
What does Everyone (Full Control) allow?
Any user can modify or delete data in the registry key.
What is the buggy code issue in the provided example?
Assumes registry data is 64 bytes or less, risking buffer overrun.
What function is used in the buggy code?
RegQueryValueEx, which may return data larger than 64 bytes.
What is a buffer overrun in this context?
Data exceeding the 64-byte buffer, overwriting memory.
How does a weak ACL increase threat level?
Allows any user to set large data, triggering a buffer overrun.
What can an attacker do with Everyone (Full Control)?
Set a buffer larger than 64 bytes or deny app access.
How can an attacker deny app access?
Set ACL to Everyone (Deny Full Control).
Does a good ACL eliminate secure coding needs?
No, secure coding is still required.
What is the first solution to fix the code?
Dynamically allocate buffer based on registry key length.
What is the problem with dynamic allocation?
Attackers can force large allocations, causing memory exhaustion.
What is the second solution to fix the code?
Check data length and read only up to buffer’s maximum.
What is a safer ACL configuration?
Admins (Full Control), Everyone (Read).
What does Admins (Full Control) mean?
Only admins can modify data or ACLs.
What does Everyone (Read) mean?
Non-admins can only read the registry key.
What is WRITE_DAC in ACLs?
Permission to modify the ACL, included in Full Control.
Why is the threat less severe with Admins (Full Control)?
Only admins can set large data or change ACLs.
What is the risk if an attacker is an admin?
Can fully control the system, bypassing ACL protections.
What is the registry in Windows?
A database storing system and application configuration data.
What is HKEY_LOCAL_MACHINE?
A registry hive storing machine-wide settings.
What does ZeroMemory do in the code?
Initializes the buffer to zero before use.
Why is a fixed 64-byte buffer problematic?
Cannot handle larger registry data, risking overflow.