Pcornel
Security · Security Fundamentals

Least Privilege

Cheat sheet · https://pcornel.dk/topic.php?topic=4419

Back to the Topic

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 rights
  • Get-LocalGroupMember Administrators — local admins
  • Get-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 boundaryWhat to establishWhat it does not establish
Scope and contextAsset, owner, subject, action, data flow, time and expected security outcomeDoes not prove the inventory, threat model or business assumptions are complete
Design and effective stateIntended policy/control plus the identity, configuration, coverage and dependencies actually in forceConfiguration presence does not prove consistent enforcement or operating effectiveness
Outcome evidenceAllowed, denied, failure and recovery tests correlated with telemetryOne successful test does not prove every path, time or attacker condition
AcceptanceGap, residual risk, owner, review trigger and retest result are recordedAcceptance 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

Confirmation

Confirm action

Continue?