By NHI Mgmt Group Editorial TeamDomain: Workload IdentitySource: WazuhPublished September 3, 2026

TL;DR: AWS access keys can be abused as valid IAM identities, and Wazuh shows how CloudTrail and GuardDuty telemetry can reconstruct validation, enumeration, persistence, and exfiltration stages to flag compromise before account takeover, according to Wazuh. The key issue is that long-lived credentials create a theft-to-abuse window that only tight monitoring and short-lived access can shrink.


At a glance

What this is: This is a Wazuh walkthrough of detecting AWS access key compromise with native AWS telemetry, and its central finding is that correlated CloudTrail and GuardDuty data can reconstruct attacker behaviour across multiple stages.

Why it matters: It matters because IAM teams still rely on long-lived AWS keys in places where stolen credentials can behave like legitimate API traffic, which makes detection and blast-radius control central to both NHI and broader identity governance.

👉 Read Wazuh's analysis of AWS access key compromise detection with native telemetry


Context

AWS access key compromise is an identity problem because a stolen key does not merely open a session, it inherits the permissions of the IAM identity behind it. That means the defensive question is not only whether a key was exposed, but whether the organisation can see and correlate the API activity that follows.

The article frames a practical gap in NHI governance: long-term credentials are hard to distinguish from normal automation once they are compromised. Native telemetry such as CloudTrail and GuardDuty can reveal the pattern, but only if logs are collected, retained, and correlated in a way that preserves the attack sequence rather than isolated events.


Key questions

Q: What breaks when AWS configuration files expose access keys?

A: When AWS configuration files expose access keys, the attacker inherits the workload’s identity and can often authenticate without triggering traditional login controls. If the credential is over-privileged, the incident quickly moves from exposure to escalation, lateral movement, and data theft. Treat the file as an identity-bearing object, not just a configuration artifact.

Q: Why do long-lived AWS credentials create more risk than task-scoped access?

A: Long-lived credentials expand the time available for misuse, copying, and lateral movement, especially when they exist in laptops, pipelines, or shared systems. Task-scoped access reduces the window in which compromise matters and makes the resulting actions easier to attribute. The key gain is not speed, but shrinking reusable privilege.

Q: How do security teams tell compromised API use from normal automation?

A: They correlate API sequences, source IP behaviour, and identity actions across CloudTrail and GuardDuty rather than treating each event separately. A burst of discovery calls, repeated AccessDenied responses, or new key creation from an unfamiliar location is far more meaningful than a single call in isolation.

Q: When should organisations prioritise key rotation over monitoring?

A: They should do both, but rotation comes first when the key is long-lived, broadly scoped, or exposed outside approved systems. Monitoring is still essential because it exposes misuse that may already be underway, but it does not remove the credential from circulation.


Technical breakdown

How AWS access keys become valid attacker identities

An AWS access key pair is an authentication mechanism, not a container for business logic. When exposed, the access key ID and secret key let an attacker authenticate as the attached IAM identity and inherit its permissions. Because API calls look operational rather than interactive, abuse often blends into normal cloud activity unless the surrounding telemetry shows where the calls came from, what sequence they followed, and which identities they used. That is why the compromise problem is as much about identity provenance as it is about credential secrecy.

Practical implication: Treat exposed access keys as identity compromises, not isolated secret leaks, and track their API use as a governed identity event.

Why CloudTrail and GuardDuty provide complementary detection signals

CloudTrail provides the who, what, and when of AWS API activity, so it can show validation calls, enumeration bursts, and privilege-manipulation attempts. GuardDuty adds behavioural analysis on top of that raw telemetry and can raise findings such as anomalous access or exfiltration patterns. Together they cover different parts of the same control problem: CloudTrail records the evidence, while GuardDuty interprets risk. Neither is enough alone if log ingestion is incomplete or if the detection logic cannot correlate related activity across time.

Practical implication: Correlate native cloud logs before alerting so a stolen key is seen as a sequence, not as disconnected noise.

How correlation turns discrete API calls into an attack chain

The article models compromise as a four-stage chain: validation, enumeration, persistence, and exfiltration. Validation confirms the key works, enumeration maps what the identity can reach, persistence creates backup credentials or policy changes, and exfiltration moves data out once the attacker trusts the foothold. This is important because individual calls can be low-signal, but their order reveals intent. Correlation rules therefore matter more than single-event thresholds when attackers operate with stolen credentials that already pass authentication.

Practical implication: Build correlation rules around attack sequence, not just event severity, so you can detect credential abuse before data theft completes.


Threat narrative

Attacker objective: The attacker wants durable, low-friction access to AWS resources that can be used for reconnaissance, persistence, and data theft under the cover of a valid IAM identity.

  1. Entry occurs when exposed AWS access keys are found in repositories, build pipelines, credential files, or compromised devices and are used to authenticate as the associated IAM identity.
  2. Escalation follows when the attacker validates the key, enumerates permissions, and creates backup credentials or alters policies to preserve access.
  3. Impact occurs when the attacker uses the inherited permissions for exfiltration or other malicious API activity that looks like legitimate cloud traffic.

Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Long-term access keys create identity persistence, not just secret exposure. Once an access key is public, the attacker can operate as the bound IAM identity until the credential is revoked or rotated. That means the real governance failure is not disclosure alone, but the existence of a durable credential that can be replayed in API workflows. Practitioners should treat every long-lived cloud key as a standing identity control problem, not a storage issue.

Correlation is the control gap that separates suspicious API calls from a confirmed compromise. A single GetCallerIdentity call or one AccessDenied event is noisy; a sequence of validation, enumeration, and key creation is evidence. Wazuh’s value in the article comes from reconstructing the chain, which is exactly where many cloud programmes still fall short. The practitioner conclusion is clear: without sequence-aware correlation, stolen keys remain visible but not intelligible.

Secret exposure and privilege management are now one problem in cloud identity. AWS access keys inherit whatever permissions the IAM identity already has, so over-privilege multiplies the damage of any exposure. That is why least privilege, short-lived credentials, and behavioural logging belong in the same governance conversation. The implication is that NHI security is no longer a separate hygiene task but a core IAM control plane concern.

Identity blast radius is the better way to think about AWS access key compromise. The article shows that the attacker’s actual advantage is not the credential itself, but the range of actions the identity can perform once the key is accepted. This frames the control objective more accurately than “protect secrets” alone. Practitioners should evaluate every AWS key by the blast radius it unlocks, not just by whether it is present in a vault.

Valid-account abuse remains one of the hardest cloud attack patterns to distinguish from normal automation. AWS API traffic generated by a compromised key can look operational, especially when the same identity is already used by scripts or tooling. That makes governance of machine identities and service credentials inseparable from detection engineering. Teams need controls that reduce trust in standing credentials and increase the quality of behavioural context.

From our research:

What this signals

The programme signal here is that detection and prevention for AWS access keys can no longer live in separate teams. When a static key is the same object that authenticates, authorises, and persists, the IAM programme has to treat observability, rotation, and least privilege as one control surface rather than three disconnected tasks.

Identity blast radius: this is the practical measure teams should adopt for cloud access keys, because the real risk is not possession alone but the scope of actions the credential can execute. If the key can create new keys, enumerate resources, or move data at scale, the control objective has already been lost.

NHI programmes should expect more attacker attention on credentials that sit behind automation and infrastructure workflows, especially where logging is incomplete or exclusion lists go stale. A better operating model is to pair short-lived access with reliable correlation and review the trust boundary every time cloud topology or egress changes.


For practitioners

  • Replace long-term keys with short-lived identity patterns Use IAM roles and ephemeral credentials wherever possible so the compromise window is reduced and the credential cannot be reused indefinitely. This is especially important for automation that currently depends on static AWS keys.
  • Correlate CloudTrail with behavioural findings Ingest CloudTrail and GuardDuty together, then write rules that connect validation, enumeration, persistence, and exfiltration into a single incident narrative. A single event should not be the alert boundary.
  • Harden the log path that proves compromise Enable CloudTrail log file integrity validation, restrict the log bucket with policy, and ensure your telemetry pipeline can read the exported findings without decryption failures or missing prefixes.
  • Review and constrain the trusted IP boundary Keep trusted source IP lists and service-identity exclusions current so you do not suppress real compromise signals or generate alert noise from your own infrastructure.
  • Scan for exposed secrets before they reach AWS Check repositories, CI/CD configuration, build artefacts, and endpoint files for committed access keys, then revoke any discovered credential before it can be used from outside your expected network perimeter.

Key takeaways

  • AWS access key compromise is an identity abuse problem, not only a secret exposure problem.
  • Correlation across CloudTrail and GuardDuty is what turns isolated API calls into evidence of a real attack chain.
  • Short-lived credentials, least privilege, and log integrity are the controls that shrink the damage of exposed AWS keys.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-03 — Secrets and Credential ManagementThe article centres on exposed AWS access keys and secret handling.
Recommendation — Map exposed AWS keys to NHI-03 and enforce rotation, revocation, and inventory for every long-lived credential.
MITRE ATT&CKTA0006;TA0008 — Credential Access; Lateral MovementThe attack chain uses valid credentials, enumeration, and follow-on access.
Recommendation — Map stolen-key behaviour to TA0006 and TA0008, then hunt for validation and discovery sequences in CloudTrail.
NIST CSF 2.0PR.AC-4 — Access Permissions and AuthorisationsThe key inherits IAM permissions, so authorisation scope is central.
Recommendation — Apply PR.AC-4 to limit IAM permissions for every API credential and reduce blast radius before exposure occurs.
NIST SP 800-53 Rev 5AC-6 — Least PrivilegeLeast privilege determines how much damage a stolen access key can do.
Recommendation — Use AC-6 to constrain AWS identities so a compromised key cannot enumerate or create new access paths freely.
CIS Controls v8CIS-5 — Account ManagementThe article depends on controlling and reviewing AWS identities and keys.
Recommendation — Use CIS Control 5 to review, rotate, and remove AWS accounts and access keys that are no longer required.

Key terms

  • AWS Access Key Compromise: An AWS access key compromise occurs when an exposed or stolen key is used to authenticate as the associated IAM identity. The attacker then inherits that identity's permissions, so the incident is governed as an identity event, not just a secret-handling failure.
  • CloudTrail Correlation: CloudTrail correlation is the practice of linking related AWS API events into a sequence that reveals attacker intent. Used well, it turns isolated calls such as validation, enumeration, and policy changes into a coherent compromise narrative that supports investigation and alerting.
  • Identity Blast Radius: The amount of damage a compromised identity can cause across systems, data, and infrastructure. In NHI environments, it is shaped by permissions, network reach, and administrative capability rather than by the credential alone. Reducing blast radius is a containment strategy that limits lateral movement and data exposure.
  • Standing Credential: A standing credential is any secret that remains usable until it is manually rotated or revoked. In NHI governance, it creates durable access that can be stolen, replayed, or propagated from trusted tooling unless runtime boundaries and expiry are built in.

What's in the full article

Wazuh's full blog post covers the operational detail this post intentionally leaves for the source:

  • The exact CloudTrail and GuardDuty configuration steps used to generate the telemetry pipeline.
  • The custom Wazuh rules that map validation, enumeration, persistence, and exfiltration into correlation logic.
  • The full AWS and Wazuh emulation commands used to reproduce each stage of the compromise.
  • The dashboard workflow used to investigate the combined alert stream in Threat Hunting.

👉 The full Wazuh post covers the attack emulation, rule logic, and dashboard correlation steps in detail.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on September 11, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org