
Model Extraction Attacks: Detection and Prevention Guide
September 22, 2026
Cloud Privilege Escalation: Common Attack Paths
September 22, 2026A single misconfigured IAM role in an AWS environment cost Capital One $80 million in regulatory fines and exposed the personal data of over 100 million customers. The attacker didn’t break encryption, didn’t exploit a zero-day vulnerability, and didn’t need months of reconnaissance. They found an overprivileged EC2 instance role, queried the metadata service, and walked out with credentials that unlocked S3 buckets full of sensitive financial records. The breach took minutes. The cleanup took years.
Cloud Identity and Access Management misconfiguration has quietly become the single most exploited attack surface in enterprise infrastructure. According to Gartner’s 2025 Cloud Security Report, nearly 65% of cloud security incidents traced back to misconfigured IAM policies rather than vulnerabilities in cloud provider infrastructure. The cloud providers are largely doing their job. The misconfiguration problem belongs to the organizations deploying workloads — and it’s getting worse as cloud environments grow more complex.
This post dissects the specific IAM misconfigurations that consistently lead to real-world breaches: the structural patterns attackers actively hunt for, the exact policy decisions that create dangerous exposure, and the architectural controls that actually close those gaps. If you manage cloud infrastructure at any scale, these are the failure modes that should keep you up at night — and the mitigations that let you sleep again.
Overly Permissive IAM Policies: The Wildcard Problem
The fastest path from “misconfigured IAM” to “full account compromise” runs through wildcard permissions. Policies that grant Action: “*” or Resource: “*” effectively hand an attacker the keys to an entire cloud estate the moment they compromise a single credential. Yet these configurations appear in production environments with alarming regularity, often because they were used during development for convenience and never tightened before deployment.
The 2024 Datadog State of Cloud Security report found that 18% of AWS IAM roles across audited environments had wildcard permissions on sensitive actions, including S3 bucket access, IAM role creation, and Lambda function invocation. In Azure, the equivalent finding was Contributor-level role assignments applied to entire subscriptions rather than scoped resource groups.
The Privilege Escalation Chain Hidden in Permissive Policies
Overpermissive policies aren’t just dangerous in isolation — they create privilege escalation chains that allow an attacker starting with low-privilege access to climb to administrative control. A common pattern: a developer’s compromised API key has iam:CreatePolicy and iam:AttachRolePolicy permissions. Those two actions together allow creating an administrator policy and attaching it to any role, including the attacker’s current session. Researchers at Rhino Security Labs have documented over 20 distinct privilege escalation paths through AWS IAM that require only a handful of permissions — none of which look obviously dangerous in isolation.
The mitigation here is strict enforcement of least-privilege principles operationalized through tools like AWS IAM Access Analyzer, Azure Policy, or HashiCorp Sentinel. Access Analyzer specifically generates least-privilege policies based on CloudTrail activity logs, replacing the guesswork of manual policy authoring with empirical data about what permissions are actually used. Roles that haven’t used a permission in 90 days should have it removed — automated, not human-reviewed.
Overly Trusted Cross-Account and Federated Access
Multi-cloud and multi-account architectures create a second category of IAM misconfiguration that’s structurally different from permissive policies: mismanaged trust relationships. When an IAM role’s trust policy is too broad, it doesn’t matter how tightly the role’s permission policy is written — the wrong principals can assume it.
The 2022 breach of Uber’s internal systems demonstrated this pattern. The attacker, after social-engineering an employee’s MFA approval, moved laterally through internal systems partly by exploiting broadly-trusted service account credentials. While Uber’s breach involved multiple failure layers, the IAM trust relationship component — service accounts trusted by large swaths of infrastructure — amplified the blast radius significantly.
The Confused Deputy Problem in Cross-Account Roles
In AWS environments specifically, the “confused deputy” vulnerability arises when a role’s trust policy allows any principal in a trusted account to assume it, without requiring an ExternalId condition. Attackers who compromise any identity in the trusted account can then assume the role, even if that identity was never intended to have cross-account access. AWS’s own documentation warns about this pattern, yet it persists in enterprise configurations because adding the ExternalId condition requires coordinating with external partners — a friction point that gets deferred indefinitely.
Federated identity through SAML or OIDC introduces its own risks. Misconfigured audience (aud) or subject (sub) claims in OIDC token validation mean that tokens issued for one workload can be accepted by another. A GitHub Actions workflow intended to deploy to a staging environment that’s misconfigured to accept any token from the repository can be exploited by any contributor — including a compromised contributor account — to assume production deployment roles.
Trust policy auditing should be a mandatory component of every cloud security review cycle. Every role should answer three questions clearly: who can assume it, under what conditions, and from where. Anything that can’t be answered precisely is a misconfiguration waiting to be exploited.
Public S3 Buckets and Storage Misconfiguration: Still Killing Organizations
It sounds almost embarrassing to include publicly accessible cloud storage in a 2026 technical analysis. And yet, UpGuard’s ongoing cloud exposure research identified over 2,200 misconfigured S3 buckets containing sensitive enterprise data in a single 2024 sweep — including healthcare records, financial documents, and authentication credentials. The problem isn’t that security teams don’t know public buckets are dangerous. The problem is that IAM policies governing bucket access are complex enough that misconfigurations slip through code review, especially in organizations relying on infrastructure-as-code without automated policy validation.
Bucket Policies vs. ACLs: The Confusion That Opens Doors
The interaction between S3 bucket policies, bucket ACLs, and IAM identity policies creates a permission model where the effective access is the union of multiple overlapping controls — any one of which can inadvertently grant public access. A bucket policy that denies public access can be overridden by an ACL grant that predates it. AWS’s S3 Block Public Access feature exists precisely to override both, but it’s applied at account, bucket, or access point levels independently, meaning a developer who enables it at the bucket level but not the account level leaves a structural gap for newly created buckets.
The technical control that actually works here is AWS Organizations Service Control Policies (SCPs) that deny s3:PutBucketAcl and s3:PutObjectAcl with conditions that allow public ACLs, applied at the organizational unit level. This makes it structurally impossible for any team within the organization to create a public-access ACL regardless of their IAM permissions — enforcing the guardrail at the governance layer rather than relying on individual developers to configure each bucket correctly.
Credential Sprawl and Long-Lived Access Keys
Human identity governance gets most of the attention in IAM security discussions, but machine identity — service accounts, API keys, application credentials — represents the larger attack surface in modern cloud environments. Ermetic’s 2024 Cloud Infrastructure Security Report found that the average enterprise cloud environment contains 3.5x more machine identities than human ones, and that 90% of those machine identities are granted permissions they have never used.
Long-lived static credentials are the specific failure mode that makes this dangerous. Unlike short-lived tokens issued through role assumption or OIDC federation, static access keys don’t expire. A developer’s AWS access key checked into a GitHub repository three years ago is still valid today unless explicitly rotated. Automated secret scanning tools like TruffleHog, GitGuardian, or GitHub’s native secret scanning find these exposed credentials constantly — but so do attackers, who routinely scan public repositories for cloud credentials using the same tooling.
The Metadata Service Attack Vector
For credentials that aren’t exposed through code repositories, the EC2 Instance Metadata Service (IMDS) presents a secondary attack path. The Capital One breach specifically exploited IMDSv1’s lack of authentication — an SSRF vulnerability in the victim’s application allowed the attacker to query the metadata endpoint and retrieve the instance role’s temporary credentials without authentication. AWS released IMDSv2, which requires a session-oriented PUT request before credential retrieval, specifically to close this attack path.
Despite IMDSv2 being available since 2019, a 2024 Wiz Research scan of AWS environments found that 40% of EC2 instances still had IMDSv1 enabled, largely because migrating applications to use the session-oriented flow requires application-level changes, not just infrastructure reconfiguration. The practical defense is an SCP that denies ec2:ModifyInstanceMetadataOptions unless the HttpTokens parameter is set to “required” — forcing IMDSv2 at the governance layer and preventing teams from spinning up vulnerable instances.
Insufficient Logging, Monitoring, and Alerting on IAM Events
Misconfigured IAM policies create the vulnerability. Insufficient monitoring ensures the attack goes undetected long enough to cause catastrophic damage. The average time to detect a cloud breach in 2025, according to IBM’s Cost of a Data Breach Report, was 194 days — with the largest contributing factor being inadequate cloud activity logging and alerting on anomalous IAM behavior.
The specific logging gaps that extend breach dwell time include: CloudTrail not enabled in all regions (allowing attackers to operate in non-monitored regions after establishing a foothold), management events not captured for read-only operations (masking reconnaissance), and S3 data events disabled (preventing detection of large-scale exfiltration).
Behavioral Analytics and Impossible Travel for Non-Human Identities
Detecting IAM-based attacks requires behavioral baselines, not just signature detection. Service accounts have predictable access patterns — a Lambda execution role that consistently calls three specific DynamoDB tables should generate an alert the first time it calls S3 or IAM. This type of behavioral detection is the foundation of tools like AWS GuardDuty’s threat intelligence and anomaly detection, which specifically flags CredentialAccess:IAMUser/AnomalousBehavior and PrivilegeEscalation:IAMUser/AdministrativePermissions finding types.
For organizations running SIEM platforms, mapping cloud IAM events to MITRE ATT&CK’s Cloud Matrix — specifically the Initial Access, Privilege Escalation, and Persistence tactics — provides a structured framework for alert development. A role that creates a new IAM user outside of a provisioning workflow, or attaches administrator policies to an existing user at 3 AM, maps directly to documented attacker techniques and should trigger immediate automated response, not a next-business-day review.
Infrastructure-as-Code Drift and the Misconfiguration Pipeline
The final failure pattern is systemic rather than tactical: the gap between declared IAM configuration in Terraform, CloudFormation, or Pulumi and the actual running state of cloud environments. IaC provides repeatability and auditability, but only if changes made outside the IaC pipeline — through the console, CLI, or API — are detected and remediated. Organizations that deploy IAM configuration through IaC but allow out-of-band changes end up with “configuration drift” where the actual permissions differ materially from what the code declares.
A 2025 Snyk survey found that 72% of organizations detected IaC security misconfigurations before deployment, but only 31% had controls to detect or remediate drift in running environments. The other 69% had configurations that were secure at deployment and increasingly insecure over time as ad-hoc changes accumulated.
Shift-Left Security and Policy-as-Code for IAM
The architectural response to IaC drift is a combination of pre-deployment policy validation and continuous post-deployment compliance checking. Tools like Checkov, tfsec, or Snyk IaC scan Terraform and CloudFormation templates before deployment, flagging wildcard permissions, missing MFA conditions, and overly-broad trust policies at the PR stage. AWS Config with conformance packs and Azure Policy in deny mode provide the post-deployment enforcement layer, automatically remediating detected drift or blocking non-compliant resource creation.
The cultural component matters equally. IAM policy changes should require the same review rigor as application code changes — peer review, security team sign-off on high-risk changes, and automated testing that validates the declared permissions match least-privilege requirements. Teams that treat IAM configuration as infrastructure plumbing rather than security-critical code will continue producing the misconfigurations that attackers exploit.
Key Takeaways
- Wildcard IAM permissions are almost never justified in production environments — enforce least privilege using Access Analyzer’s auto-generated policies based on actual usage data, and treat Action: “*” as an immediate finding in any policy review.
- Trust policies are permissions too. Who can assume a role is as important as what that role can do — audit trust relationships for overly-broad principal specifications, missing ExternalId conditions, and OIDC claim validation gaps at every security review cycle.
- Static credentials are a structural liability. Migrate workloads to short-lived role-based credentials and OIDC federation wherever possible. Enforce IMDSv2 via SCP to close the metadata service attack path that enabled Capital One-style breaches.
- IAM logging gaps are as dangerous as IAM policy gaps. Full CloudTrail coverage across all regions, with S3 data events and behavioral anomaly detection through GuardDuty or equivalent, cuts breach dwell time from months to hours.
- IaC security doesn’t end at deployment. Pre-deployment policy scanning catches misconfigurations before they reach production; continuous compliance monitoring through AWS Config or Azure Policy catches the drift that accumulates afterward.
Conclusion: Closing the Gap Between Configuration and Security
Cloud IAM security failures share a common architecture: complexity creates ambiguity, ambiguity creates permissive defaults, and permissive defaults create attack surfaces. The organizations that avoid breach aren’t those with larger security teams or bigger budgets — they’re the ones that have operationalized IAM governance: automated policy generation, SCP-enforced guardrails, behavioral detection baselines, and IaC pipelines that treat permission changes as security-critical code.
The technical controls described in this post — Access Analyzer least-privilege policies, IMDSv2 enforcement, S3 Block Public Access at the organizational level, GuardDuty behavioral analytics, and pre-deployment IaC scanning — aren’t experimental. They’re available today, largely at no additional cost beyond existing cloud provider contracts.
Start with an IAM audit this week. Run AWS IAM Access Analyzer across every account in your organization, export the findings, and prioritize any role with unused permissions older than 60 days and any trust policy with a wildcard principal. Schedule a cross-account trust relationship review with your architecture team within the next two weeks. If you don’t have GuardDuty or its equivalent enabled in every region, enable it before that review happens. The Capital One breach cost $80 million and 100 million customers’ data. The controls that would have prevented it cost a fraction of a single day of that incident response. The math is not complicated.
💡 Enjoyed this article?
Subscribe for more expert insights delivered to your inbox.
Follow us or subscribe below xe2x80x94 free, no spam.





