Join our Newsletter — 33% off our NHI Course
Home› Glossary› Threats, Abuse & Incident Response› AWS Credential Harvesting
Threats, Abuse & Incident Response

AWS Credential Harvesting

← Back to Glossary
By NHI Mgmt Group Updated October 23, 2026 Domain: Threats, Abuse & Incident Response

AWS credential harvesting is the theft of access keys, session tokens, or other AWS secrets from users, workloads, or code repositories. Attackers use these credentials to impersonate identities in AWS, move laterally, and access cloud resources until the keys are revoked, rotated, or detected by monitoring controls.

AWS Credential Harvesting as an Attack Path

AWS credential harvesting is dangerous because the stolen material can be used immediately for authenticated access, often with the same trust level as the original user, workload, or application. Once an attacker has keys or tokens, they can query resources, create persistence, and blend into normal cloud activity until the credential is revoked or expires.

Where AWS Credentials Are Commonly Exposed

The most common exposure points are source code, CI/CD pipelines, container images, environment variables, chat logs, and misconfigured storage. Hardcoded secrets and copied tokens are especially risky because they spread beyond the original system, which is why guidance on secrets sprawl and API key management matters so much in AWS-heavy environments.

Harvesting also often targets long-lived credentials because they remain usable after the original event that exposed them. That is why static versus dynamic secrets is a useful lens for reducing the lifetime of any stolen material.

How Attackers Use Stolen AWS Access

Stolen AWS credentials are valuable because they let an attacker authenticate as the victim principal instead of breaking in again. From there, the attacker may enumerate roles, read data, call APIs, create new access paths, or pivot into adjacent accounts and services that trust the compromised identity.

This is why AWS credential theft is often paired with lateral movement, privilege escalation, and cloud abuse rather than a single isolated login event. Internal examples such as the TeamTNT worm show how exposed credentials can be pulled from hosts at scale, while the 230M AWS environment compromise illustrates how credential exposure can begin with something as ordinary as a leaked configuration file.

Detection, Containment, and Recovery After Exposure

Detection depends on knowing where valid AWS credentials exist, then watching for abnormal use, unusual source locations, unexpected API calls, and access that does not match the normal workload or user pattern. Inventory is critical because a stolen secret only becomes visible if defenders can tell which credential was exposed, who owned it, and what it should have been able to do.

Response should focus on revocation, rotation, and review of any actions taken with the compromised credential before and after the suspected theft window. In practical terms, teams should inspect CloudTrail, related identity logs, and surrounding workload telemetry to decide whether the issue was simple exposure or full account misuse. The incident value of the Sumo Logic breach and the remediation pattern in the Guide to the Secret Sprawl Challenge both reinforce that rotation and post-incident validation need to happen together.

Risk and Threat Considerations

AWS credential harvesting creates immediate risk because the attacker inherits trusted access rather than forcing a new authentication path. That makes the compromise hard to distinguish from legitimate automation, especially when keys, tokens, or certificates are widely reused across workloads and environments.

Failure mechanism: Exposure of a reusable AWS secret lets an attacker act as the compromised principal, then expand access through enumeration, privilege abuse, or secondary credential discovery.

Impact: The result can be unauthorized data access, infrastructure manipulation, persistence, cost abuse, and broader cloud compromise before the stolen credential is discovered or revoked.

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, MITRE ATT&CK and OWASP API Security Top 10 address the attack and risk surface, while 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-02 — Secret LeakageAWS credential theft is fundamentally secret leakage from identities and workloads.
NHI-05 — Overprivileged NHIStolen AWS credentials often grant more access than the task truly needs.
NHI-07 — Long-Lived SecretsLong-lived AWS keys stay usable long after the original exposure event.
Recommendation — Scan code, pipelines, and environments for exposed AWS secrets and remove them quickly. Reduce AWS credential privilege so a stolen secret cannot reach unnecessary resources. Replace long-lived AWS secrets with shorter-lived credentials wherever possible.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementCovers lifecycle control of authenticators such as secrets and tokens.
AU-6 — Audit Record Review, Analysis, and ReportingAWS credential abuse is best confirmed through review of access and API activity.
Recommendation — Rotate, revoke, and track AWS credentials through their full lifecycle. Review cloud audit logs for abnormal use after a suspected credential exposure.
CIS Controls v8CIS-6 — Access Control ManagementCredential harvesting is reduced by limiting and managing access paths tightly.
Recommendation — Tighten and review AWS access paths so exposed credentials have less value.
MITRE ATT&CKT1528 — Steal Application Access TokenCredential harvesting is an adversary technique for stealing access material.
T1078 — Valid AccountsStolen AWS credentials let attackers operate as valid accounts.
Recommendation — Map exposed AWS secrets to token theft and hunt for credential-access activity. Assume valid-account abuse after credential theft and verify subsequent access.
OWASP API Security Top 10API2 — Broken AuthenticationStolen AWS keys and tokens enable authentication abuse against cloud APIs.
Recommendation — Harden API authentication paths so leaked AWS credentials cannot be reused easily.

Practitioner Guidance

Why practitioners should care: The main control objective is not just secret storage, it is secret lifetime and blast radius. AWS credentials should be treated as high-value authentication material, with scoping, monitoring, and rotation designed around the assumption that exposure will eventually occur.

What to watch for: Focus on repositories, build logs, images, shared configuration, and third-party integrations where secrets tend to leak silently. A good operational habit is to treat any credential appearance outside its intended secret store as a potential security event, not just a cleanup task.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 23, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org