Least Privilege
Cheat sheet · https://pcornel.dk/topic.php?topic=4419
Answer
Least privilege starts with tasks and resources, derives precise entitlements, separates normal and privileged identities, uses just-in-time elevation where possible, constrains sessions and reviews effective use and removal.
Remember
- Least privilege ≠ no privilege.
- Assigned role ≠ effective privilege after nesting, inheritance and token claims.
- Temporary elevation ≠ safe elevation without approval, scope and expiry.
- Read-only ≠ harmless when data is sensitive or can enable further access.
First checks
sudo -l -U <user>— sudo rightsGet-LocalGroupMember Administrators— local adminsGet-ADGroupMember 'Domain Admins'— privileged groups
Verify in this order
task → minimum permissions → granted/time-bound
Where it usually breaks
First mismatch in asset/subject identity → trust/authentication → authorization/policy → enforcement/control → telemetry/detection → protected outcome/response; preserve identity/policy/pre-state before mutation.
Security Fundamentals → Least Privilege proof map
| Evidence boundary | What to establish | What it does not establish |
|---|---|---|
| Scope and context | Asset, owner, subject, action, data flow, time and expected security outcome | Does not prove the inventory, threat model or business assumptions are complete |
| Design and effective state | Intended policy/control plus the identity, configuration, coverage and dependencies actually in force | Configuration presence does not prove consistent enforcement or operating effectiveness |
| Outcome evidence | Allowed, denied, failure and recovery tests correlated with telemetry | One successful test does not prove every path, time or attacker condition |
| Acceptance | Gap, residual risk, owner, review trigger and retest result are recorded | Acceptance does not remove the risk or make it permanent |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4419