Sub topic 11
Least Privilege and Access Control Lists
This chapter assumes you know what a user account and a group are, can open a Windows command prompt or PowerShell, and understand the confidentiality, integrity and availability goals from the first chapter. The next chapter covers Windows-specific accounts, NTFS and share permissions in detail. Here the focus is the general model: what least privilege means, how access control lists express it, and how role-based access control keeps it manageable.
What Least Privilege Means
Least privilege is the rule that every user, program and device gets only the access it needs to do its job, and no more. The access should last only as long as the need lasts.
The rule limits damage from three kinds of events:
- A user makes a mistake, such as deleting a shared folder.
- An attacker steals a user's credentials and acts as that user.
- Malware runs with the rights of whoever launched it.
If a receptionist's account can only read the visitor schedule, then a stolen password for that account exposes the visitor schedule and nothing else. If the same account were a local administrator, the attacker could install software, disable security tools and reach other machines.
Least privilege supports confidentiality (people see only what they need) and integrity (people change only what they should). It also supports availability, because fewer accounts can break shared resources.
Related Principles
Exam questions often use these terms together. Keep them distinct.
| Principle | Meaning | Example |
|---|---|---|
| Least privilege | Minimum rights needed for the task | A help desk tech can reset passwords but cannot edit payroll files |
| Need to know | Access to information only if the job requires it | Only the project team can open the merger documents |
| Separation of duties | No single person controls a whole sensitive process | One person requests a payment and a different person approves it |
| Deny by default | Access is refused unless explicitly allowed | A new user has no access to any shared folder until granted |
Access Control Lists
An access control list (ACL) is a list attached to a resource that states who may do what with it. Each line in the list is an access control entry (ACE). An ACE names a subject, such as a user, group or device, and the actions allowed or denied for that subject.
ACLs appear in many places:
- File systems, where the resource is a file or folder and the actions are read, write, modify and so on.
- Network devices, where the resource is a network path and the entries allow or block traffic by address, protocol or port.
- Cloud storage and applications, where the resource is a bucket, a document or a feature.
The idea is the same in each: when a request arrives, the system checks the list and decides.
How the Decision Is Made
A typical file system check works like this:
- A user requests an action, such as opening a file for writing.
- The system gathers the user's identity and every group the user belongs to.
- It reads the ACEs on the resource that match any of those identities.
- It combines the results and allows or refuses the action.
Two behaviors matter in practice. First, an explicit deny normally overrides an allow, so a user who belongs to one group that is allowed and another group that is denied is refused. Second, if no entry matches, the answer is refuse. This is deny by default, and it is what makes an ACL a least privilege tool: you start from nothing and add only what is needed.
Viewing and Setting an ACL on Windows
Windows stores NTFS permissions as an ACL on each file and folder. The icacls command shows and changes it. The following grants the Accounting group read-only access to a folder and everything inside it, then lists the result.
icacls C:\Finance /grant "Accounting:(OI)(CI)R"
icacls C:\FinanceThe flags in parentheses are inheritance settings:
(OI)object inherit: files inside the folder receive the entry.(CI)container inherit: subfolders receive the entry.Ris the read permission.
Because the entry grants only R, members of Accounting can open and read the files but cannot change or delete them. That is least privilege applied with an NTFS permission.
Role-Based Access Control
Assigning permissions user by user does not scale. When someone changes jobs, an administrator must find and edit every entry that names them, and mistakes accumulate. Role-based access control (RBAC) solves this by granting permissions to roles and then placing users in those roles.
In Windows, security groups usually play the role. The common pattern is:
- Create a group for each job function, such as
AccountingorHelpDesk. - Grant the group the permissions that function needs.
- Add each person to the group that matches their job.
- When the person changes jobs, change their group membership.
Granting to groups instead of individuals gives you one place to review and change access. It also gives a clear audit trail: to answer "who can read Finance?" you read the group list.
Other Access Control Models
The exam may name other models. Know the basic difference between them.
| Model | Who decides access | Typical use |
|---|---|---|
| Discretionary (DAC) | The owner of the resource | Ordinary Windows file sharing, where a folder owner sets permissions |
| Mandatory (MAC) | The system, based on labels such as Secret or Public | Government and military systems |
| Role-based (RBAC) | Roles assigned by administrators | Business environments with defined job functions |
| Attribute-based (ABAC) | Rules using attributes such as department, location or time | Cloud and conditional access policies |
Applying Least Privilege in Practice
Use Standard Accounts for Daily Work
Give people a standard user account for everyday tasks. Administrators should use a separate administrative account only when a task requires it. Windows User Account Control (UAC) supports this by prompting for approval before an action that needs elevated rights. If malware runs under a standard account, it cannot easily change system files or install drivers.
Grant to Groups and Avoid Broad Entries
Avoid entries for the Everyone group on sensitive data. Avoid giving Full Control when Modify or Read is enough. Full Control also lets a user change the permissions themselves, which defeats the list.
Review Access Regularly
Privilege creep happens when a person moves between roles and keeps old access. Periodic reviews catch it. Also disable accounts promptly when employees leave, and remove temporary access when the project ends.
Limit Service and Application Rights
Programs and services also run as accounts. A backup service needs read access to data, not the right to log on interactively. Use dedicated service accounts with narrow rights, not an administrator account.
Check What You Granted
After you change permissions, test with a real account that belongs to the group. Confirm that the allowed action works and that an action outside the grant fails. A control that has not been tested is only a belief.
Common Mistakes and Edge Cases
- Conflicting group memberships. A user gets the combined allowed rights of all groups, but one explicit deny overrides them. If a user cannot open a file that a group should allow, check for a deny entry in another group.
- Inheritance surprises. A folder passes its entries to its children by default. A new file inside
C:\Financereceives the same access, which may be broader than intended. You can break inheritance on a subfolder and set separate entries there. - Moving versus copying files. In Windows, copying a file to a new folder normally gives it the destination folder's inherited permissions. Moving within the same NTFS volume normally keeps the original permissions. Moving to a different volume behaves like a copy.
- Share versus NTFS permissions. When a folder is reached over the network, share permissions and NTFS permissions both apply, and the more restrictive result wins. The next chapter covers this.
- Over-trusting the administrator role. Making a user an administrator to fix one problem leaves the extra rights in place. Remove them when the task ends.
Exam Scenarios
| Scenario | Best answer |
|---|---|
| A new employee needs to read one shared folder | Add them to a group that has Read on that folder; do not make them an administrator |
| An employee moves from sales to finance | Remove the sales group and add the finance group |
| A user can read a folder but cannot save changes | The effective permission is Read; grant Modify only if the job needs it |
| One group is allowed and another is denied, and the user is in both | The deny wins |
| A technician needs admin rights for a single install | Use a standard account and elevate through UAC for that task |
Exercise
A contractor is a member of two groups. The group Projects has Modify on a folder, and the group Temps has an explicit Deny for Write on the same folder. The contractor tries to save a change to a file in the folder. What happens, and which principle would you apply to avoid the confusion?
Show answer
The save fails, because an explicit deny overrides an allow. To avoid the confusion, apply least privilege by granting access through a single role-based group that matches the contractor's job, instead of stacking overlapping groups with conflicting entries.
Exercise
An administrator wants the Accounting group to open and read every file in C:\Finance, including files added later, but not edit them. Write the command and name the two inheritance flags it needs.
Show answer
icacls C:\Finance /grant "Accounting:(OI)(CI)R". The flags are (OI), object inherit, which passes the entry to files, and (CI), container inherit, which passes it to subfolders. The R grants read-only access.
Exercise
A company wants to stop one employee from both creating a vendor and approving payment to that vendor. Which principle does this describe, and how is it different from least privilege?
Show answer
This is separation of duties. Least privilege limits each person to the rights their job needs. Separation of duties divides a sensitive process across several people so that no single person can complete it alone.