Unmasking Cloud Identities: From Behavioral Clustering to Automated Detection

CN
CyberNew Threat Research Desk
• Original Reporting: Unit 42
CyberNew Threat Intel Assessment
Assessed Severity: INFORMATIONAL
Impacted Surface
Cloud & Distributed Infrastructure
Intelligence Sector
Defensive Security & Blue Team

Analyst Takeaway

"Executive Summary As cloud environments expand to include human, machine and autonomous agent identities, mapping the functional roles of these identities has become a significant security challenge. To address this challenge, we designed a behavioral clustering model that extracts activity patterns from cloud audit logs. By adopting a clustering-based approach to identity mapping, organizations..."

Recommended Defense & Mitigation

  • Threat Monitoring: Ingest published IOCs into SIEM/EDR detection rules for continuous telemetry monitoring.
  • Security Awareness: Alert staff and maintain baseline endpoint hardening across endpoints.
Curated & Verified by CyberNew Threat Intelligence Desk Standard Defense Framework (NIST / MITRE ATT&CK)

Executive Summary

As cloud environments expand to include human, machine and autonomous agent identities, mapping the functional roles of these identities has become a significant security challenge. To address this challenge, we designed a behavioral clustering model that extracts activity patterns from cloud audit logs. By adopting a clustering-based approach to identity mapping, organizations can gain greater visibility into cloud activity and integrate these behavioral patterns into automated threat detection mechanisms.

To create our behavioral clustering model, we examined the behavior of over 40,000 identities from 125 cloud environments over a two-month period, mapping these identities to functional roles. These roles include administrators, backup services, security tooling and development and operations (DevOps).

Identifying these functional roles is rarely straightforward because resource naming conventions or assigned identity and access management (IAM) policies do not always reveal an identity’s true behavior. Attackers routinely use masquerading techniques like pre-existing permission profiles and benign labels to make malicious activity harder to detect.

To illustrate the practical application of our model, we provide an in-depth analysis of the dataset's largest cluster: administrator console users in Amazon Web Services (AWS). We also show how an identity’s behavioral patterns provide richer context for cloud threat detection.

Additionally, we demonstrate how lightweight heuristic logic can be extracted directly from the clustering map, which can be implemented in standard SQL. This allows organizations to classify functional identity roles at scale, delivering continuous operational visibility without the need to continuously run a resource-intensive machine learning pipeline.

The methodology applied in our behavioral clustering model uses unsupervised machine learning algorithms, specifically Uniform Manifold Approximation and Projection (UMAP) and Hierarchical Density-Based Spatial Clustering of Applications with Noise (HDBSCAN), to construct a reliable behavioral map. This approach automatically categorizes a vast collection of cloud identities into distinct, clustered groups.

While our research specifically focuses on AWS CloudTrail data, the methodology can be easily extended to audit logs from other cloud providers, software as a service (SaaS), Kubernetes and other environments.

Palo Alto Networks customers are better protected from the threats discussed above through the following products and services:

Unit 42 Cloud Security Assessment is an evaluation service that reviews cloud infrastructure to identify misconfigurations and security gaps.

If you think you might have been compromised or have an urgent matter, contact the Unit 42 Incident Response team.

Related Unit 42 Topics Cloud, Identity, Detection

The Identity Challenge

When it comes to accurately detecting malicious activity within cloud environments, context is key. Consider a scenario where a cloud identity enumerates all resources within your environment. Is this a security tool that frequently scans resources as part of its normal routine? Or is it a service identity that usually serves a limited purpose, such as a backup service that only interacts with a single cloud storage bucket? One of these scenarios represents normal operational activity, the other indicates a potential security breach.

This reality forces us to draw a distinction between capabilities and active behavior:

  • What an identity can do: Identity permissions dictate the operations that a role is permitted to perform. Although the industry-standard recommendation is to enforce the principle of least privilege, the reality is that many identities remain heavily over-privileged. This typically happens due to misconfigurations, a lack of visibility or simply a desire to reduce technical friction during rapid development. Attackers can exploit over-privileged identities to execute malicious operations that should have been blocked by tighter access controls. At the same time, many over-privileged identities exist in production for years without ever causing an issue. Security teams use cloud security posture management (CSPM) to audit assigned cloud permissions – but this is only part of the identity puzzle.
  • What an identity actually does: This lies within the domain of cloud detection and response (CDR). Analyzing the practical evidence of operations invoked by different identities is the main focus of this article. To do this we inspect observed API activity such as authentication (ConsoleLogin, GetSigninToken) and discovery (ListBuckets, ListRoles). To interact with the 240 services offered by AWS, there are more than 15,000 possible operations an identity can invoke.

Given that thousands of identities are operating across complex cloud environments, we are left with the following questions:

  • Are there common behavioral patterns that identities naturally follow?
  • How can we reliably differentiate between the footprints of various functional roles such as administrators, DevOps, backup services and security tools?

Mapping the Landscape: Functional Identity Roles

Analyzing the specific cloud operations an identity invokes, as captured in AWS CloudTrail, provides a clear picture of its day-to-day behavior and role. When observing a large enough collection of identities across multiple organizations, a macro-level picture begins to emerge.

A behavioral map visualizes each identity as a distinct data point, where its invoked operations dictate its coordinates. The scatter plot in Video 1 projects a vast array of AWS identities into a two-dimensional space based on their executed operations.

Video 1. AWS identity behavioral map.

In this simplified visualization, each dot represents a unique cloud identity, projected into a two-dimensional space where proximity reflects behavioral similarity and colors reflect behavioral clusters.

Alert Name Alert Source MITRE ATT&CK Technique
AWS SSM send command attempt XDR Analytics BIOC, Cloud Detection & Response Module (CDR) Cloud Administration Command (T1651)
AWS Password Policy Discovery XDR Analytics BIOC, Cloud Detection & Response Module (CDR) Password Policy Discovery (T1201)
AWS resource discovery XDR Analytics BIOC, Cloud Detection & Response Module (CDR) Account Discovery: Cloud Account (T1087.004)
AWS web ACL deletion XDR Analytics BIOC, Cloud Detection & Response Module (CDR) Impair Defenses (T1562)
Compute activity in dormant cloud region XDR Analytics BIOC, Cloud Detection & Response Module (CDR) Unused/Unsupported Cloud Regions (T1535)
AWS Backup vault was deleted XDR Analytics BIOC, Cloud Detection & Response Module (CDR) Inhibit System Recovery (T1490)
Cloud instance creation attempt XDR Analytics BIOC, Cloud Detection & Response Module (CDR) Modify Cloud Compute Infrastructure: Create Cloud Instance (T1578.002)
AWS Lambda Cross-Account sensitive permissions configured XDR Analytics BIOC, Cloud Detection & Response Module (CDR) Account Manipulation: Additional Cloud Roles (T1098.003)
AWS IAM Role's Trusted Policy Modification Allows Cross-Account Access XDR Analytics BIOC, Cloud Detection & Response Module (CDR) Account Manipulation: Additional Cloud Roles (T1098.003)
AWS IAM Role Created with Cross-Account Access XDR Analytics BIOC, Cloud Detection & Response Module (CDR) Account Manipulation: Additional Cloud Roles (T1098.003)
AWS S3 bucket exposure via ACL / policy modification XDR Analytics BIOC, Cloud Detection & Response Module (CDR) Account Manipulation: Additional Cloud Roles (T1098.003)

Source Verification & Original Intelligence

This threat report was reviewed by CyberNew analysts and cross-referenced with primary security disclosures from Unit 42.

Primary Advisory →