Created by Claudiu Tabac - © 2026
This material is open for educational and research use. Commercial use without explicit permission from the author is not allowed.
AG-002 Machine Identity Chain → Long-Term Persistence
A comprehensive technical analysis of how attackers exploit machine identities to establish persistent access across cloud environments. This attack graph demonstrates the progression from initial credential exposure through full cloud identity control.
Attack Flow Overview: The 10-Stage Chain
This identity attack graph maps the complete lifecycle of a machine identity compromise, from initial exposure through persistent backdoor establishment. Each stage builds on previous access, creating cascading control across cloud infrastructure.
01
Machine Identity Credential Exposure
Service Principal secrets leaked from repositories, pipelines, VMs, or containers
02
Attacker Authentication as SP
Bypassing MFA and Conditional Access controls entirely
03
Machine-Level Privilege Enumeration
Review roles, app permissions, and vault access mappings
04
Lateral API Calls Using Machine Identity
Access storage accounts, key vaults, and automation systems
05
Token Issuance & Persistence Expansion
Collection of OAuth and refresh tokens with extended lifetimes
Mid-Stage Attack Progression
Workload Pivot (CI/CD → Cloud → SaaS)
Service Principal leveraged to interact with pipelines, deployment agents, and cloud resource APIs across multiple environments
Secret Store Dump
Retrieve additional SP secrets, API keys, and certificates from misconfigured vaults and secrets managers
Create New Malicious Machine Identity
Register new Service Principal with elevated privileges and long-lived credentials
Persistence Achieved
Backdoor SP survives password resets, user offboarding, and CA policy updates
Cloud-Wide Identity Takeover
Complete control over roles, app permissions, Conditional Access, and logging configuration
Critical Attack Stages Explained
Stage 1: Secret Exposure → Initial Access
Machine identity compromises typically originate from secrets leaked in source code repositories, CI/CD pipelines, deployment agents, or container image layers. These credentials provide direct authentication without human interaction.
Stage 2: SP Authentication → Bypassing Controls
Service Principals authenticate without MFA or Conditional Access policies. Traditional human-centric security controls don't apply to machine identities, creating a significant blind spot.
Stages 3-5: Discovery → Token Persistence
Attackers enumerate privileges, make lateral API calls, and collect long-lived tokens. Machine identity tokens persist far longer than typical user sessions, remaining invisible to standard monitoring.
Stage 6: Workload Pivot Operations
Compromised credentials enable pivoting between CI/CD systems, cloud infrastructure, and SaaS platforms through automation agents. This creates multi-environment attack paths.
Advanced Persistence Techniques
Vault Dump → Keys Explosion
A single compromised machine identity often provides access to dozens of additional secrets stored in key vaults and secrets managers. This exponentially increases attacker capabilities and access scope across the entire cloud environment.
Backdoor Machine Creation
Attackers establish new Service Principals with elevated privileges as permanent backdoors. These malicious identities include long-lived secrets or certificates that are difficult to detect through standard security monitoring.
Full Cloud Identity Control
Once machine identity persistence is achieved, identity governance frameworks collapse. Attackers can modify cloud roles, app permissions, Conditional Access policies, and logging configurations to maintain access indefinitely.
Identity Attack Chain (IAC) Stage Mappings
This attack graph spans multiple stages of the Identity Attack Chain framework, demonstrating how machine identity compromise enables complete attack lifecycle execution.
1
Stage 3: Credential Acquisition
Initial SP secret exposure from code repositories and pipelines
2
Stage 4: Authentication Abuse
Bypassing MFA and Conditional Access using machine identity
3
Stage 5: Privilege Escalation
Enumerating and exploiting over-scoped Service Principal roles
4
Stage 6: Token Tampering
Collection and abuse of long-lived OAuth and refresh tokens
5
Stage 7: Identity Lateral Movement
Pivoting across CI/CD, cloud, and SaaS environments
6
Stage 8: Persistence via Identity
Creating backdoor Service Principals with extended privileges
7
Stage 9: Objectives (Cloud/Admin)
Achieving full cloud identity control and governance collapse
Identity Misconfigurations Exploited
This attack chain exploits six critical identity misconfigurations across development, cloud, and session management domains. Each misconfiguration enables specific attack stages.
MC-DEV-01: Secrets in Repositories
Service Principal credentials committed to source code repositories, enabling initial access through credential exposure
MC-CLOUD-01: Overprivileged Service Principal
Excessive permissions assigned to machine identities without proper scoping or justification
MC-SESSION-01: Long Token Lifetime
Extended token validity periods enabling persistent access without re-authentication
MC-DEV-03: Overprivileged CI/CD Agents
Deployment pipeline identities with excessive cloud resource permissions
MC-CLOUD-06: Vault Access Misconfiguration
Improper key vault and secrets manager access controls enabling secret enumeration
MC-PIM-06: No Approval on SP Creation
Missing privileged identity management controls for Service Principal registration
Related Breach Patterns
This attack graph aligns with five documented breach patterns from real-world identity compromise incidents. Understanding these patterns helps security teams recognize and respond to similar attack indicators.
BP-027
Refresh Token Theft
Long-lived refresh tokens stolen and used to maintain persistent access across sessions
BP-033
CI/CD Pivot
Compromised deployment pipeline identities used to access production cloud resources
BP 034
Machine Identity Privilege Drift
Service Principal permissions expanding over time without review or governance
BP-035
API Key → Multi-SaaS Pivot
API credentials enabling lateral movement across multiple SaaS platforms
BP-049
Vault Identity Exposure
Secrets manager compromise leading to mass credential disclosure
Threat Actor Attribution
Three primary threat actor categories actively exploit machine identity chains for persistent cloud access. These actors demonstrate sophisticated understanding of cloud identity architecture.
ICTAM-001
APT29 (Cloud Persistence Specialists)
Nation-state actors demonstrating advanced cloud identity exploitation techniques. Known for establishing long-term persistent access through machine identity compromise and sophisticated privilege escalation chains.
ICTAM-020
Ransomware Affiliates
Financially motivated threat actors leveraging machine identities to move laterally across cloud environments and disable backup systems. Increasingly targeting CI/CD pipelines for initial access.
ICTAM-040
Supply Chain Attackers
Actors compromising development and deployment infrastructure to inject malicious code or establish persistent backdoors. Target Service Principal credentials in build and release pipelines.
Detection & Mitigation Strategies
Detection Approaches
  • Monitor Service Principal authentication patterns for anomalies
  • Track token issuance and refresh token usage
  • Alert on new Service Principal creation with high privileges
  • Audit vault and secrets manager access logs
  • Detect unusual API call patterns from machine identities
  • Monitor for privilege escalation in Service Principal roles
Mitigation Controls
  • Implement short token lifetimes for machine identities
  • Require approval workflows for SP creation and modification
  • Apply least privilege principles to all Service Principals
  • Rotate secrets regularly using automated systems
  • Enable workload identity federation where possible
  • Implement comprehensive logging for all machine identities
About
Created by Claudiu Tabac — © 2026
This framework is open for educational and research use. Commercial use without explicit permission from the author is not allowed.
Navigation