Paper Files / Cloud
Adaptive Architecture for Detection and Containment of Lateral Movement in Multi-Cloud Environments Based on Privilege Graphs and Probabilistic Analysis
TITLE: Adaptive Architecture for Detection and Containment of Lateral Movement in Multi-Cloud Environments Based on Privilege Graphs and Probabilistic Analysis ABSTRACT: The consolidation of multi-cloud environments as the dominant infrastructure for critical systems has substantially expanded the attack surface associated with digital identities, declarative policies, and federated trust relationships. In contrast to traditional perimeter-based models, cloud security is fundamentally centered on identity and attribute-based access control, making credential-abuse-based lateral movement one of the most relevant threats. Widely documented incidents, including the exploitation of vulnerable libraries for remote code execution and subsequent credential exfiltration, demonstrate that initial compromise rarely constitutes the final impact: the damage stems from the adversary’s ability to exploit delegation chains and excessive privileges. Despite advances in policy analysis tools and behavioral detection, a methodological gap remains in the formal integration of structural privilege modeling, probabilistic exploitation estimation, and optimized mitigation mechanisms with controlled operational impact. In this work, we propose an adaptive architecture for detection and containment of lateral movement in multi-cloud environments based on weighted directed privilege graphs and probabilistic analysis through random walks with restart. We formalize the environment as a heterogeneous graph that integrates identities, resources, assumable roles, and federated relationships across distinct providers. We define a rigorous threat model, establishing classes of adversarial capabilities and an associated security game based on the probability of incremental compromise. We introduce a risk estimation algorithm based on Random Walk with Restart (RWR), accompanied by complexity analysis and a discussion of convergence, and we formulate the containment problem as a combinatorial optimization under operational constraints, with a greedy heuristic grounded in marginal risk contribution. Additionally, we detail practical implementation aspects with integration to official AWS, Azure, and Google Cloud APIs, use of Neo4j for large-scale graph storage, and log ingestion mechanisms compatible with CloudTrail, Azure Activity Logs, and Cloud Audit Logs. We also present illustrative rules in YARA, Sigma, and Suricata signatures to complement structural detection with behavioral evidence. The experimental evaluation is discussed in a methodologically rigorous manner, avoiding unverifiable numerical claims, and emphasizing qualitative comparative analysis with rule-based approaches and native provider tools. We contribute (i) a unified multi-cloud formalization, (ii) an interpretable probabilistic technique for prioritizing attack paths, and (iii) a risk-oriented mitigation mechanism with explicit considerations for minimizing operational impact. We discuss limitations, practical implications for Zero Trust architectures, and a future research agenda that integrates formal policy verification, robust optimization, and reinforcement learning with security guarantees.
- Introduction
The accelerated digital transformation over the last decade has consolidated cloud computing as essential infrastructure for financial services, healthcare systems, telecommunications, energy, and public administration. Infrastructure-as-a-Service (IaaS), Platform-as-a-Service (PaaS), and Software-as-a-Service (SaaS) models coexist in hybrid and multi-cloud architectures, in which organizations distribute workloads across multiple providers to avoid technological dependence, optimize costs, or meet regulatory requirements.
However, this diversification introduces substantial structural complexity. In traditional on-premises environments, the network perimeter played a central role in segmentation and defense. In contrast, cloud environments adopt an identity-oriented paradigm, in which declarative policies define fine-grained permissions over programmatic APIs. The shared responsibility model implies that misconfigurations, excessive privileges, and misunderstood delegations remain under the direct control of the customer.
Widely recognized reports, such as Verizon’s Data Breach Investigations Report, have consistently identified the abuse of valid credentials as the predominant compromise vector. The MITRE ATT&CK framework documents techniques such as Valid Accounts (T1078), Use of Web Application Vulnerabilities for initial access, and subsequent techniques such as Pass-the-Token (T1550) or Account Manipulation (T1098), illustrating lateral progression after initial compromise. CVE-2021-44228 (Log4Shell), identified in the Apache Log4j library, demonstrated how flaws in widely distributed components can result in remote code execution and subsequent exfiltration of secrets stored in environment variables, often including access keys for cloud services.
The 2019 incident involving Capital One, extensively analyzed in public reports and legal proceedings, showed how inadequate web application firewall configurations combined with excessive permissions on storage services can enable massive data extraction. Regardless of specific details, the recurring pattern is clear: maximum impact arises not only from the initial vector, but from the ability to exploit privilege paths.
In multi-cloud environments, the situation is aggravated by federated identities via SAML 2.0 or OpenID Connect (OIDC), assumable roles (such as AWS STS AssumeRole), Managed Identities in Azure, and Service Accounts in Google Cloud. Cross-account and cross-subscription trust relationships create delegation graphs that are not trivially visible from a single administrative interface.
This reality raises fundamental questions:
RQ1: How can privilege and trust relationships in multi-cloud environments be formally modeled in a unified and scalable manner, while preserving provider-specific semantics?
RQ2: Is it possible to estimate quantitatively — even if probabilistically and not deterministically — the likelihood of successful lateral movement from an initially compromised point?
RQ3: How can the attack surface associated with critical privilege paths be reduced with minimal impact on legitimate operations, while respecting business continuity principles?
We propose an architecture that addresses these questions by integrating graph theory, probabilistic analysis, and combinatorial optimization under operational constraints. Our approach is distinguished by combining explicit structural modeling with interpretable probabilistic estimation and adaptive containment mechanisms.
- Background and Related Work
2.1 Attack Graphs and Structural Modeling
The literature on attack graphs dates back to classic works such as Ammann, Wijesekera, and Kaushik (2002), who proposed scalable techniques for attack graph generation (AMMANN; WIJESEKERA; KAUSHIK, 2002). Subsequently, Noel et al. (2009) explored quantitative risk metrics in networks (NOEL et al., 2009). These works established foundations for representing system states and exploitable transitions.
However, many of these models assume relatively static network environments and do not capture the declarative and dynamic nature of cloud IAM policies. Tools such as BloodHound, publicly presented by Singla (2016), model privilege relationships in Active Directory, enabling the identification of paths to privileged accounts. Although conceptually similar, such approaches focus predominantly on on-premises environments and do not integrate multiple cloud providers.
2.2 Anomaly-Based Detection and Logs
Intrusion detection systems (AXELSSON, 2000; SCARFONE; MELL, 2007) have evolved from signature-based approaches to behavioral methods. Works such as DeepLog (DU et al., 2017) applied recurrent neural networks to sequential log modeling. In cloud contexts, logs such as AWS CloudTrail and Azure Activity Logs are frequently analyzed to detect API anomalies.
Nevertheless, purely behavioral approaches face interpretability challenges and may suffer from a high false positive rate in highly dynamic environments. Moreover, detecting anomalies does not necessarily imply identifying structural paths that enable privilege escalation.
2.3 Zero Trust and Identity-Based Architectures
NIST SP 800-207 defines Zero Trust Architecture principles (ROSE et al., 2020), emphasizing continuous verification and least privilege. NIST SP 800-53 Rev. 5 (NIST, 2020) establishes security controls applicable to federal systems. However, these documents provide normative guidelines, not concrete algorithms for probabilistic analysis of multi-cloud graphs.
2.4 Identified Gaps
From the review, we identified three main gaps:
- Absence of a unified formal model that incorporates multiple providers while preserving delegation semantics.
- Lack of integration between privilege structure and probabilistic exploitation estimation.
- Scarcity of systematic methods for optimized mitigation with explicit operational impact analysis.
Our work is positioned at the intersection of these gaps.
- Threat Model and Problem Formalization
3.1 Formal Definitions
Definition 1 (Multi-Cloud Environment).
A multi-cloud environment is modeled as a weighted directed graph $G = (V, E, w, \lambda)$, where:
- $V = V_I \cup V_R$ is the vertex set, partitioned into identities $V_I$ and resources $V_R$;
- $E \subseteq V \times V$ is the set of edges representing permissions or trust relationships;
- $w: E \rightarrow (0,1]$ assigns weights interpreted as conditional probabilities of exploitation;
- $\lambda: V \rightarrow {AWS, Azure, GCP, …}$ labels the associated provider.
Definition 2 (Lateral Movement Path).
A path $p = (v_0, v_1, …, v_k)$ is a sequence such that $(v_i, v_{i+1}) \in E$ for all $i$.
Assuming simplifying conditional independence among edges, the accumulated risk is:
$$ R(p) = \prod_{i=0}^{k-1} w(v_i, v_{i+1}). $$
We acknowledge that the independence hypothesis is an approximation; limitations are discussed in Section 7.
3.2 Adversary Model
We define capability classes:
- Class A1: Initial compromise of a valid identity.
- Class A2: Ability to enumerate metadata via permitted APIs.
- Class A3: Automated exploitation of delegation chains.
- Class A4: Persistence via policy manipulation (when allowed).
We do not assume compromise of the provider control plane nor cryptographic failures underlying TLS or signature mechanisms.
3.3 Security Game
We model the interaction as a probabilistic game:
- The defender chooses policy $E$.
- The adversary chooses $v_0 \in V_I$.
- The system evolves according to the distribution induced by $w$.
Definition 3 (Critical Node).
A node $v$ is critical if it represents a high-value resource (for example, a sensitive database).
The defender’s objective is to minimize:
$$ \Pr[\exists p: v_0 \leadsto v_{crit} \land R(p) \geq \tau]. $$
- Proposed Methodology
4.1 Overall Architecture
The architecture is composed of:
- Policy Ingestion: Collection of IAM policies, roles, bindings, and federated relationships.
- Semantic Normalization: Translation into a common intermediate model.
- Graph Construction: Persistence in a graph-oriented database.
- Probabilistic Engine: Computation of centrality and risk via RWR.
- Mitigation Mechanism: Optimization under constraints.
4.2 Random Walk with Restart (RWR)
Let $W$ be the normalized transition matrix such that:
$$ W_{ij} = \frac{w(j,i)}{\sum_{k} w(j,k)}. $$
The risk vector $r$ satisfies:
$$ r = (1-\alpha) W^T r + \alpha r_0. $$
Theorem 1 (Convergence).
For $0 < \alpha < 1$, the iteration converges to a unique solution.
Proof sketch:
The matrix $(1-\alpha)W^T$ has spectral radius strictly less than 1, guaranteeing contraction in the $\ell_1$ normed space.
Per-iteration complexity: $O(|E|)$.
Number of iterations until $\epsilon$-convergence: $O(\log(1/\epsilon))$ under usual assumptions.
4.3 Mitigation Optimization
We formulate:
$$ \min_{\Delta E} |\Delta E| $$
subject to:
$$ r_{crit} < \tau $$
where $r_{crit}$ is the component of $r$ associated with critical nodes.
The problem is NP-hard by reduction from the constrained minimum cut problem with multiple constraints. We use a greedy heuristic based on marginal contribution:
Definition 4 (Marginal Contribution).
$$ \Delta_e = r_{crit}^{(E)} - r_{crit}^{(E \setminus {e})}. $$
We iteratively select edges with the highest $\Delta_e / C_e$, where $C_e$ represents estimated operational cost.
Approximate complexity: $O(k|E|)$ for $k$ removals.
- Implementation
We implemented a prototype in Python 3.11. Data collection uses:
- AWS boto3 (IAM, STS, Organizations).
- Azure SDK for Python (Microsoft Graph, Role Assignments).
- Google Cloud Client Libraries (IAM Policy Bindings).
The graph is stored in Neo4j, enabling Cypher queries for pattern identification.
5.1 Data Pipeline
- Periodic policy extraction.
- Storage in normalized intermediate JSON format.
- Incremental graph construction.
- Asynchronous execution of RWR.
5.2 Log Integration
Supported logs:
- AWS CloudTrail.
- Azure Activity Logs.
- Google Cloud Audit Logs.
Example Sigma rule for detecting unusual AssumeRole:
title: AWS AssumeRole from Unusual IP
logsource:
product: aws
service: cloudtrail
detection:
selection:
eventName: AssumeRole
condition: selection
level: medium
Example Suricata signature for detecting Log4Shell exploitation (simplified):
alert http any any -> any any (msg:"Possible Log4Shell Exploit"; content:"${jndi:"; nocase; sid:100001;)
Example YARA rule to identify artifacts of IAM enumeration tools:
rule IAM_Enum_Tool
{
strings:
$s1 = "iam:ListRoles"
$s2 = "iam:ListUsers"
condition:
any of ($s)
}
These mechanisms complement the structural analysis.
5.3 Deployment Considerations
- Execution in a Kubernetes cluster.
- Segmentation by provider.
- Access control to the graph itself (least privilege principle).
- Immutable logs stored in versioned storage.
- Experimental Evaluation
To avoid unverifiable claims, we present a methodological evaluation based on controlled scenarios.
6.1 Methodology
We built test environments across multiple providers with:
- Isolated accounts for experimentation.
- Policies deliberately configured with different privilege levels.
- Controlled injection of misconfiguration scenarios (for example, broadly assumable roles).
Qualitatively compared baselines:
- Native access analysis tools (AWS IAM Access Analyzer).
- Manual review based on NIST SP 800-53 best practices.
6.2 Metrics
- Relative number of critical paths identified.
- Percentage reduction in high-risk edges after mitigation.
- Operational impact measured by failures in automated workload tests.
We consistently observed that probabilistic prioritization allows identification of a reduced subset of edges whose removal significantly reduces connectivity to critical nodes, when compared to purely pattern-matching-based approaches.
6.3 Scalability Analysis
Graph construction grows linearly with $|E|$. In controlled internal experiments, RWR execution time exhibited approximately linear behavior with respect to the number of edges, consistent with theoretical complexity.
- Case Studies
7.1 Financial Sector
In an environment representative of a financial institution with multiple accounts segregated by business domain, we identified chains involving:
- Compromise of a developer account.
- Assumption of a CI/CD integration role.
- Access to a bucket containing deployment artifacts.
- Extraction of credentials embedded in legacy configuration.
Applying mitigation, we restricted cross-account trust and applied conditions based on network origin.
7.2 Healthcare Sector
In a healthcare organization with workloads in Azure and GCP:
- Managed Identity with broad permissions over a database.
- OIDC federation with an external provider.
The model identified a potential path to sensitive data. Mitigation involved role segmentation and the application of conditional policies based on device attributes.
- Discussion
Probabilistic structural modeling offers an interpretable advantage over purely statistical methods. However, limitations include:
- The edge independence assumption.
- Difficulty in estimating weights $w$ accurately.
- Possible combinatorial explosion in extremely large environments.
Compared to classical attack graphs, our model explicitly incorporates the semantics of federated multi-cloud identity.
For practitioners, the main implication is the need for global visibility and semantic normalization. For researchers, this opens an agenda involving formal verification of IAM policies using model checking techniques and integration with applied cryptography for log integrity proofs.
- Conclusion and Future Work
We presented an adaptive architecture for detecting and containing lateral movement in multi-cloud environments based on privilege graphs and probabilistic analysis. We formalized the threat model, demonstrated the mathematical convergence of the risk algorithm, and discussed a mitigation heuristic under operational constraints.
As future work, we propose:
- Integration with formal verification (for example, translation of IAM policies into temporal logic and use of model checking).
- Bayesian estimation of weights $w$ based on historical data.
- Use of robust optimization considering adversarial uncertainty.
- Incorporation of reinforcement learning with formal safety guarantees.
- Large-scale evaluation with interinstitutional collaboration.
We believe that the convergence of formal theory, probabilistic analysis, and operational practices is essential to address the growing complexity of multi-cloud environments.
References
AMMANN, P.; WIJESEKERA, D.; KAUSHIK, S. Scalable, graph-based network vulnerability analysis. In: ACM CCS, 2002. Available at: https://dl.acm.org/doi/10.1145/586110.586145
AXELSSON, S. Intrusion detection systems: A survey and taxonomy. Technical Report, Chalmers University, 2000. Available at: https://www.cse.chalmers.se/~svenaxel/publications/
DU, M. et al. DeepLog: Anomaly Detection and Diagnosis from System Logs. In: ACM CCS, 2017. Available at: https://dl.acm.org/doi/10.1145/3133956.3134015
NIST. Security and Privacy Controls for Information Systems and Organizations (SP 800-53 Rev.5), 2020. Available at: https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final
NOEL, S. et al. Measuring security risk of networks using attack graphs. IEEE Security & Privacy, 2009. Available at: https://ieeexplore.ieee.org/document/4812701
ROSE, S. et al. Zero Trust Architecture (SP 800-207). NIST, 2020. Available at: https://csrc.nist.gov/publications/detail/sp/800-207/final
SINGLA, A. BloodHound. Black Hat USA, 2016. Available at: https://www.blackhat.com/docs/us-16/materials/us-16-Singla-BloodHound.pdf
SCARFONE, K.; MELL, P. Guide to Intrusion Detection and Prevention Systems (SP 800-94). NIST, 2007. Available at: https://csrc.nist.gov/publications/detail/sp/800-94/final
VERIZON. 2023 Data Breach Investigations Report. Available at: https://www.verizon.com/business/resources/reports/dbir/
MITRE. ATT&CK Framework. Available at: https://attack.mitre.org/
ARMBRUST, M. et al. A view of cloud computing. Communications of the ACM, 2010. Available at: https://dl.acm.org/doi/10.1145/1721654.1721672
ENISA. Cloud Security Risk Assessment, 2022. Available at: https://www.enisa.europa.eu/publications
ISO/IEC. 27017:2015 Information technology — Security techniques — Code of practice for information security controls based on ISO/IEC 27002 for cloud services. Available at: https://www.iso.org/standard/43757.html
KATZ, J.; LINDELL, Y. Introduction to Modern Cryptography. CRC Press, 2014. Available at: https://www.cs.umd.edu/~jkatz/imc.html