All lessons Leer en español

Security in depth · Unit 22

Privilege escalation

Understand how process identity, permissions, and trusted dependencies determine effective authority.

10 minready

ATT&CK TA0004 Privilege Escalation

Helpful before thisAuthentication

After this lesson you can

  • compare effective authority without relying on an account name or terminal prompt
  • identify the permissions and dependencies that protect privileged work
  • distinguish local, container, directory, and cloud authority

Lessons in this unit

Browse 44 lessons in this topic
  1. Linux privilege escalationUnderstand who can do what: identities, permissions, delegation, and the dependencies that make Linux privilege boundaries work.8 min
    Explore this topic21 lessons
    1. Linux process identityUse a process credential snapshot to explain a file-access decision.4 min
    2. Owner, group, and otherChoose the applicable class before evaluating a requested operation.3 min
    3. Directories control names and traversalSeparate listing a directory from resolving a file within it.3 min
    4. ACLs add named permissionsCalculate effective named-user rights from an entry and its mask.3 min
    5. Special bits need a purposeSeparate directory sticky-bit protection from file content permissions.4 min
    6. Capabilities split privileged authorityDistinguish a capability boundary setting from authority currently held.4 min
    7. Delegation is more than a command nameReview the task, target identity, and trusted inputs behind a delegation rule.4 min
    8. Give services their own identityCheck whether separate service identities actually have separate data access.4 min
    9. Scheduled work inherits a trust chainSeparate a timer firing from a successful job and a verified output.4 min
    10. Search paths are trust decisionsExplain what an explicit dependency location proves and what it leaves unresolved.4 min
    11. Loaded libraries share process authorityReview a native plugin separately from the trusted program that loads it.4 min
    12. Local secrets need a lifecycleSeparate deleting a local secret from ending the access it grants.3 min
    13. Container isolation has dimensionsJudge a container by its actual resource grants, not its isolation label.3 min
    14. Mandatory policy adds another boundaryCheck whether mandatory policy actually constrains the process in your record.3 min
    15. Kernel updates need completion evidenceConnect a vendor correction to the kernel code actually running.3 min
    16. Review a Linux boundary as a wholeRead a hardening score alongside the checks and identities it actually covers.3 min
    17. New files begin with a permission decisionWork out a new file’s permissions and identify what a default change leaves untouched.3 min
    18. A local socket is still an access boundarySeparate permission to contact a local service from permission to change its policy.3 min
    19. A management group can carry broad powerTreat management-group membership as delegated authority, including existing sessions.3 min
    20. Mount options have specific jobsMatch mount restrictions to the exact path and operation being reviewed.4 min
    21. Case: review an archive's Linux permissionsRead an ACL, separate old files from new defaults, and propose the smallest justified correction.10 min
  2. Windows privilege escalationUnderstand tokens, access checks, and service authority through small decisions.11 min
    Explore this topic21 lessons
    1. Windows access tokensRead group attributes in the token used for a particular access check.3 min
    2. SIDs identify security principalsRead an account-lifecycle record without confusing a reused name with an existing identity.3 min
    3. DACLs describe permitted accessDistinguish a present empty DACL from an absent discretionary restriction.3 min
    4. Inherited access needs a reviewCompare inherited access with the actual confidentiality requirement.3 min
    5. UAC and administrative contextEvaluate an unexpected elevation request using the approved task, publisher, and execution context.3 min
    6. Integrity levels are another inputExplain different results for two same-user processes using a supplied integrity policy.3 min
    7. Service identities have different reachCompare service-account candidates against a supplied local and network resource requirement.3 min
    8. Service configuration is authoritySeparate viewing service status, controlling execution, and changing configuration.3 min
    9. Scheduled tasks need complete boundariesReview a monthly task using its principal, approved duties, and definition-management permissions.3 min
    10. DLL loading extends the trust boundaryAssess a supplied dependency inventory without treating an approved executable as approval for every loaded library.4 min
    11. Impersonation is scoped responsibilityRead a supplied request trace and distinguish client context from the service process identity.4 min
    12. User rights differ from file permissionsEvaluate a system privilege separately from folder access and its present token state.3 min
    13. Protect local credential copiesFollow a fictional credential copy from protected disk to a diagnostic bundle with broader readers.4 min
    14. Local administrator passwords need ownershipSeparate a successful managed-password rotation from retrieval rights and local administrator membership.3 min
    15. Credential isolation has a defined scopeRead a fleet snapshot without equating a requested Credential Guard policy with active, universal protection.4 min
    16. Patch state includes restarts and recoveryClassify three fictional update records using applicability, restart state, and observed service behavior.4 min
    17. Registry settings have their own permissionsCompare a configuration key's effective permissions with the distinct duties of support and release roles.3 min
    18. A network share adds another access checkCompare local and SMB access to the same file using supplied effective permissions.4 min
    19. Service SIDs make permissions more specificExplain why adding a service-specific grant does not remove a broader shared-account grant.3 min
    20. Boot integrity and disk secrecy differReview startup trust, encryption state, active protection, and recovery access as distinct travel-readiness requirements.4 min
    21. Case study: review a Windows service boundaryCompare a fictional service’s approved duties with supplied permissions, then write a correction and verification decision.9 min

An account name is only part of the answer to “what can this process do?” Groups, roles, capabilities, tokens, resource permissions, and execution context all contribute. The same account can have different authority in two sessions.

Privilege escalation means an increase in effective authority. Authorized administrative elevation is ordinary operation. A security weakness exists when the intended boundary can be exceeded through an unintended permission, trust relationship, or software defect.

Compare effective authorityCompare real rights before and after a boundary governed by policy, dependencies, and code. The account name may remain unchanged.Starting contextIdentity + current rightsAuthority boundaryPolicy / dependencies / codeResulting contextVerify effective rights
Compare security contexts, then explain the permission or control that changes effective authority. The account name may stay the same.

Establish the starting context

A Security context includes identity and other attributes used in access decisions. A useful description names the workload, host or container, account, relevant groups or privileges, and resources already accessible. It should distinguish observed access from assumptions.

The Linux and Windows lessons explain different mechanisms. Domain permissions belong to Active Directory; resource roles belong to cloud identity. Administrative authority in one scope does not automatically establish authority in another.

Configuration and software both matter

Permission design, exposed credentials, trusted dependencies, and software defects can all weaken authority boundaries. There is no mandatory order in which they occur, and a version number alone does not prove exploitability. Defensive review combines configuration evidence with supported software, vendor advisories, and operational priorities.

Automated assessment tools can collect useful evidence, but their labels require interpretation. A permission may be necessary, overly broad, or limited by another control. A sensitive group name does not by itself demonstrate every action the group could potentially support.

On Linux, Set-user-ID affects effective identity for supported execution, subject to restrictions; it does not mean every program or script unconditionally runs as its owner. Windows access tokens carry different security attributes. The child lessons explain the mechanics and their limits.

Privileged work depends on less visible objects

A scheduled task or service needs an execution identity, configuration, program files, dependencies, and output locations. Administrative scheduling is not inherently a vulnerability. Review whether each actor’s ability to modify those objects matches the intended workflow.

Staff can edit a backup service's description. Is that the same as controlling its work?

No. The specific editable field, how the service uses it, and applicable permissions matter. A cosmetic label and trusted execution configuration have different effects. Evidence should identify the actual authority granted.

Least privilege applies to both the running workload and people who maintain it. Separating routine operation from software or policy changes can reduce accidental and unauthorized changes. Password prompts alone do not define the full safety of an administrative rule; scope, permitted behavior, and dependencies matter too.

Impact can exist before elevation

A service account that can access confidential records may already pose serious risk if misused. Severity depends on the data, operations, exposure, and business context; it is not automatically “high” because a database is involved. Becoming an administrator is not required for every important security impact.

Conversely, a more privileged label does not prove access to every protected resource. Record the specific change in effective authority and the affected scope. Confidentiality, integrity, and availability should each be considered where relevant.

Containers and isolation

Containers commonly share a kernel while separating views and resources through configurable controls. User mappings, capabilities, mounts, management access, and mandatory policies affect Isolation. An option name alone does not demonstrate a host escape.

A workload identity may independently have directory or cloud permissions. Access to a management endpoint still requires examining its authentication and authorization. Neither a container indicator nor a network connection proves control over the management service.

Explain a correction an owner can assess

A useful finding connects the starting context, affected object, specific permission or defect, resulting authority, and appropriate correction. It separates verified effects from plausible but unverified consequences. Permission reduction, dependency protection, credential lifecycle changes, or a supported software update may address different causes.

After a correction, verify that the intended administrative work still succeeds and unintended authority is removed. Review scheduled task trust and the platform overviews for smaller examples of these decisions.

Worked review: the museum backup service

Consider these fictional, owner-supplied records. The permission summary describes effective access for this exercise, including applicable groups and restrictions. It is not a history of actions.

B1, approved duties: Operators may start the established backup job and read its status. Maintainers alone may change its backup-selection configuration.

B2, current authority: Operators can start the job, read status, and modify that configuration. They cannot modify its program files. The service reads the configuration when each job begins.

B3, impact context: The service can read the museum archive and write its backup store. No directory or cloud permissions are documented. There is no record of an unauthorized change.

PredictDoes protecting the program file resolve the permission mismatch?

No. B2 establishes a separate route for changing the job’s inputs. Protecting software is valuable, but it does not remove the configuration permission that conflicts with B1. The finding is an overbroad modification grant. These records do not establish that someone used it, copied archive data, or acquired directory authority.

The narrow proposal is to remove Operators’ configuration modification permission while retaining start and status access. The owner should confirm which maintenance group retains it and how approved changes are recorded. Disabling the whole service would reduce availability without specifically repairing the permission design.

Acceptance has two sides: Operators can start the unchanged approved job and see its result; Operators cannot alter backup selection. Record the tested identity and object because a test performed as a maintainer would answer a different question. Recheck required archive coverage after the change. That operational result complements permission evidence; neither alone proves the entire backup and recovery system is sound.

Terms you met

Privilege escalationSecurity contextLeast privilegeSet-user-IDIsolation

Check yourself

No timer. No penalties. Read the explanation and try again whenever you like.

  1. Two processes have the same account name, but one can modify backup configuration and the other cannot. What comparison is needed?

    Show the answer

    Correct answer: Compare their actual security contexts and the policies for that modification. The identity label can stay constant while token attributes, restrictions, or resource policy change the access decision.

  2. What does B2 establish when compared with B1?

    Show the answer

    Correct answer: Operators have a modification permission beyond their approved duties. B1 reserves that change for maintainers, while B2 explicitly grants it to Operators. This is a supported permission mismatch.

  3. Which correction best matches the museum records?

    Show the answer

    Correct answer: Remove Operators’ configuration modification and verify start/status still work. This targets the B1/B2 mismatch and includes both denied excess access and continued required operation.

  4. B3 documents archive and backup-store access. Which wider conclusion is justified?

    Show the answer

    Correct answer: Directory and cloud authority remain unestablished by these records. Authority must be supported within each scope; local service access does not supply missing directory or cloud evidence.

Try it

  • WriteUsing B1-B3, write a four-row authority review: actor, object, permitted operation, and owner-approved need. Recommend one change, cite the record that supports it, and specify one required operation that must still succeed and one excess operation that must be denied. End with a consequence the records do not establish.
References