From Operating System Internals to Enterprise and Cloud Compromise
Table of Contents
- Part I: Foundations
- Part II: Linux Privilege Escalation
- Part III: Windows Privilege Escalation
- Part IV: Mobile and Application Privilege Escalation
- Part V: Container, Orchestration and Virtualization
- Part VI: Identity and Cloud Privilege Escalation
- Part VII: Defense and Synthesis
- Conclusion
- Back Matter
Introduction: The Art and Architecture of Privilege Escalation
- The Book’s Promise
- Scope and Assumptions
- How This Book Is Structured
- A Note on Technical Depth
- Ethics and Authorization
Chapter 1: Foundations of Privilege Escalation
- Defining Privilege: Users, Processes and Security Contexts
- Classifications: Vertical, Horizontal, Local, Remote, Direct, Indirect
- The Trust Boundary Model: Why Privilege Escalation Is Possible
- Historical Context: From Unix to the Cloud Era
- Privilege Escalation in the Red Team Lifecycle
Chapter 2: Systems Architecture and Trust Mechanisms
- Process Security Contexts: UID, GID, Tokens, Capabilities, ACLs
- Authentication vs Authorization: Identity Systems and Access Control Models
- Mandatory vs Discretionary Access Control: SELinux, AppArmor, Mandatory Integrity Control
- Kernel vs User Space: Ring Levels and System Calls
- The Principle of Least Privilege: Theory vs Practice
Chapter 3: Methodology: Enumeration and Discovery
- The Enumeration Mindset: What to Look For and How to Reason About Findings
- System-Level Enumeration: Users, Groups, Processes, Services and Filesystems
- Configuration and Policy Enumeration: Scheduled Tasks, Service Configs, Access Controls
- Network and Trust Enumeration: Adjacent Systems, Credentials and Lateral Vectors
- Automated vs Manual Enumeration: When to Use Each
Chapter 4: Linux Architecture and Local Privilege Escalation
- The Linux Privilege Model: User, Group, Root and the init Process
- SUID/SGID Abuse: Mechanics, Search Strategies and Abusable Binaries
- Linux Capabilities: Design, Inheritance and Abuse Patterns
- PATH Manipulation and Environment Variable Exploitation
- Writable Files, Directories and Configuration Abuse
Chapter 5: Linux: Cron, Systemd and Daemon Exploitation
- Cron Jobs: Misconfiguration Patterns and Exploitation
- Systemd Services: Unit Files, Privilege Dropping Failures and Abuse
- Logrotate and Daemon Config Abuse
- Wildcard and Globbing Exploitation in Automated Scripts
- TTY and Pseudo-Terminal Exploitation in Daemon Contexts
Chapter 6: Linux Kernel Vulnerabilities and Advanced Techniques
- Kernel Memory and Privilege: The Significance of Ring 0
- Use-After-Free and Heap Corruption in Kernel Context
- Dirty COW, Dirty Pipe and Other Notable Kernel Exploits
- Exploitation Constraints: KASLR, SMEP/SMAP and Kernel Hardening
- Namespace and Cgroup Abuse as Non-Exploit Escalation
Chapter 7: Windows Architecture and Local Privilege Escalation
- Windows Security Model: Users, Groups, Tokens and Integrity Levels
- Local Administrator vs SYSTEM: The Highest Privilege Contexts
- Writable Permissions and Path Vulnerabilities in Windows
- Weak Registry Permissions and Privilege Escalation
- DLL Hijacking and Search Order Hijacking: Mechanics and Variants
Chapter 8: Windows: Services, Scheduled Tasks and Token Abuse
- Windows Service Misconfigurations: Start Permissions and Binary Paths
- Impersonation Privileges: SeImpersonatePrivilege and Named Pipes
- Scheduled Tasks: Misconfigurations and Privilege Escalation Paths
- Token Manipulation: DuplicateToken, AdjustTokenPrivileges and Token Theft
- AlwaysInstallElevated and MSI Installation Abuse
Chapter 9: Windows: UAC Bypass and Advanced Techniques
- UAC Architecture: Why It Exists and How It Can Be Circumvented
- Classic UAC Bypass Techniques: Fodhelper, CMSTP and Eventvwr
- Token Manipulation for UAC Elevation
- Kernel Driver Exploitation: Vulnerable Drivers and Signed Binary Abuse
- Print Spooler and Named Pipe Exploitation in Modern Windows
Chapter 10: Android Architecture and Privilege Escalation
- Android Security Architecture: Linux Kernel, UID Isolation and App Sandboxing
- SELinux in Android: Enforcing Mode and Escalation Implications
- Bootloader, Boot Image and Recovery Exploitation
- Framework-Level Vulnerabilities and IPC Escalation
- Zygote Process and Native Code Escalation
Chapter 11: Web Application Privilege Escalation
- Web Application Access Control Models: RBAC, ABAC and Implementation Flaws
- IDOR and Horizontal Privilege Escalation
- Vertical Escalation: Broken Function-Level Authorization
- Mass Assignment and Parameter Tampering for Role Elevation
- Server-Side Execution Contexts and Application-to-System Escalation
Chapter 12: Database Privilege Escalation
- Database Privilege Models: Roles, Grants and Ownership Chains
- SQL Injection as a Privilege Escalation Path
- Stored Procedure and Function Escalation
- Database-Hosted Code Execution: xp_cmdshell, UDFs and Similar
- Escalation from Database to Host Operating System
Chapter 13: Container Privilege Escalation and Escape
- Container Security Model: Namespaces, cgroups and Shared Kernel
- Privileged Containers: What They Mean and How to Exploit Them
- Capabilities and Seccomp in Container Context
- Volume Mount and Host Filesystem Escape
- Container Runtime Exploitation: Docker, Containerd and CRI-O
Chapter 14: Kubernetes Privilege Escalation
- Kubernetes Security Model: RBAC, ServiceAccounts and Pod Security
- RBAC Misconfiguration: Over-Permissive Roles and ClusterRoles
- ServiceAccount Token Abuse and Workload Identity Exploitation
- Pod Escalation: Escaping to the Node and Beyond
- Admission Controllers and Their Bypass Potential
Chapter 15: Virtualization and Hypervisor Escalation
- Virtualization Architecture: Hypervisors, Guests and the Management Plane
- VM Escape: The Ultimate Privilege Escalation
- Device Emulation and VirtIO Exploitation
- Hyper-V and KVM Escape Techniques
- Escalation Through the Management Plane and APIs
Chapter 16: Active Directory: Trust, Identity and Domain Escalation
- Active Directory Architecture: Domains, Trusts and Kerberos
- Local Admin to Domain Admin: The Classic Escalation Path
- Kerberos Exploitation: Golden Tickets, Silver Tickets and DCSync
- GPO Abuse and Group Policy Privilege Escalation
- Trust Relationships: From Child Domain to Forest Compromise
Chapter 17: Advanced AD Techniques: LAPS, ADFS and Enterprise Patterns
- LAPS and Local Admin Password Management: Escalation Implications
- ADFS and Claims-Based Authentication Escalation
- Azure AD Connect and Hybrid Identity Escalation
- Group Membership Escalation and ACL Abuse
- Certificate Services and PKI Escalation Paths
Chapter 18: Cloud Foundations: IAM and Trust Models
- Cloud IAM Fundamentals: Roles, Policies and Least Privilege
- The Instance Metadata Service: Architecture and Abuse
- Cross-Account and Cross-Service Trust: How Clouds Enable Escalation
- Cloud-Native Identity: Workload Identity, Federated Identity and SPIFFE
- Common Misconfiguration Patterns Across Cloud Platforms
Chapter 19: AWS Privilege Escalation
- IAM Policy Evaluation Logic: How Permissions Are Calculated
- Role Assumption Escalation: Passing Roles and Creating Roles
- Service-Specific Escalation: EC2, S3, Lambda and IAM Actions
- Instance Metadata Service Exploitation: IMDSv1 vs IMDSv2
- Cross-Account Escalation and Organization-Level Compromise
Chapter 20: Azure and GCP Privilege Escalation
- Azure RBAC: Role Definitions, Scope and Escalation Paths
- Azure AD Privilege Escalation: Global Admin and Privileged Roles
- Azure Managed Identities and VM Access Control
- GCP IAM: Roles, Service Accounts and Escalation
- Cross-Cloud and Hybrid Infrastructure Escalation
Chapter 21: Defense, Detection and Hardening
- Detection Engineering: What Privilege Escalation Looks Like in Logs and SIEM
- Behavioral Detection: Anomalies in Process Trees, Tokens and Permission Changes
- Hardening Linux: CIS Benchmarks, Kernel Hardening and Capability Management
- Hardening Windows: Constrained Language Mode, AMSI, Attack Surface Reduction
- Cloud Hardening: IAM Policy Analysis, Least Privilege and Continuous Monitoring