privilege escalation
Gaining the rights of a more powerful account, such as root, either deliberately through a tool like sudo or illegitimately through a flaw.
Anyone who can escalate on a host can change anything on it, so escalation rights must be granted narrowly.
In more detail
The deliberate kind is normal practice: log in as an ordinary account and escalate only for the tasks that need it, which leaves an audit trail and limits the damage of a mistake. The illegitimate kind is an attack, which is why escalation rights themselves must be tightly controlled.
Examples
Ansible's become keyword performs deliberate privilege escalation, through sudo by default.The course shows it in an identity policy that can attach a policy to itself, in Kubernetes escalate and bind verbs, in a role taken from the request body, and in mass assignment of a role field.Related terms
- become — The Ansible keyword that switches on privilege escalation, so a task or a whole play runs as another account, root by default.
- sudo — A command that runs another command with administrator (root) rights after checking you are allowed to.
- root user — The all-powerful administrator account on Linux, with user ID 0, which can read or change anything.
- least privilege — Giving every program and person only the access they need, and nothing more.
- audit trail — A record of who did what and when, kept so actions can be reviewed and investigated later.
- pull_request_target — A pull request event that runs the base repository's workflow with its secrets and a write-capable token, even for pull requests from forks.
- iam:PassRole — The IAM permission needed to hand a role to an AWS service, such as an EC2 instance or a Lambda function, so it runs with that role.
- permissions boundary — A policy that sets the maximum permissions a user or role can ever have, whatever its other policies allow.
- allowPrivilegeEscalation — A securityContext setting that, when false, sets no_new_privs so a process cannot gain privileges through setuid programs or file capabilities.
- STRIDE — A threat-modelling checklist of six threat types: Spoofing, Tampering, Repudiation, Information disclosure, Denial of service and Elevation of privilege.
- mass assignment — A bug where a handler copies every field of a request body into a data model, so a caller can set fields such as role or balance that were never meant to be writable.
Taught in
- Connections And Privilege Escalation — Ansible Configuration Management at Scale
- Triggers and the Event Model — Continuous Integration & Continuous Delivery Pipelines
- SecurityContexts And Capabilities — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Cloud IAM Architecture & Permission Boundaries — Cloud Security & DevSecOps Engineering
- Least Privilege Enforcement & CIEM Architecture — Cloud Security & DevSecOps Engineering
- Container Hardening: Distroless & Rootless — Cloud Security & DevSecOps Engineering
- Kubernetes Pod Security Standards: Baseline & Restricted — Cloud Security & DevSecOps Engineering
- securityContext: Nonroot, Capabilities And Seccomp — Kubernetes: Production-Grade Container Orchestration
- Pod Security Admission And Pod Security Standards — Kubernetes: Production-Grade Container Orchestration
- Troubleshooting: A Timed Service Recovery Drill — Kubernetes: Production-Grade Container Orchestration
- The Threat Model Habit — Application Security & Threat Modeling for Engineers
- Authentication Versus Authorisation — Application Security & Threat Modeling for Engineers
- Least Privilege In IAM And RBAC — Application Security & Threat Modeling for Engineers
- Mass Assignment — Application Security & Threat Modeling for Engineers
- Exam Strategy: The First Fifteen Minutes And ansible-doc — RHCE in Ansible (EX294): Automate Red Hat Systems
- ansible.cfg: Which File Wins, And The Settings That Matter — RHCE in Ansible (EX294): Automate Red Hat Systems
- Privilege Escalation: sudo Rules And become — RHCE in Ansible (EX294): Automate Red Hat Systems
References
- Understanding privilege escalation: become
- MITRE ATT&CK: privilege escalation
- GitHub Security Lab: Preventing pwn requests
- OWASP Top 10 CI/CD Security Risks
- Kubernetes: RBAC good practices (privilege escalation risks)