Leaked Cloud Credentials

Exposed long-lived cloud keys (AWS IAM access keys, GCP service-account keys, Bedrock/Gemini/LLM API keys, GitHub PATs that bridge into the cloud) and the automated harvesting that turns them into cryptojacking, extortion, LLMjacking or full account takeover within minutes.

How it works

AWS’s own incident-response team names exposed long-term credentials as the top initial access vector it sees. Attackers run continuous pipelines that clone public repos, crawl websites for .env, pull Docker Hub images and package tarballs, then validate and enumerate:

TIME (UTC)  EVENT                              NOTE
21:27:59    iam:AttachUserPolicy               AWSCompromisedKeyQuarantineV3 attached by AWS
21:33:23    sts:GetCallerIdentity              TruffleHog user agent (validation)
21:35:00    secretsmanager:ListSecrets         Boto3
21:35:00    secretsmanager:GetSecretValue      2 values returned

That is a 2026 canary experiment (Tachyon): a pushed .env was used within ~5 minutes and Secrets Manager drained within 7, after AWS’s quarantine policy was attached — the policy denies selected high-cost/IAM actions but neither revokes the key nor blocks GetSecretValue.

Where cloud credentials come from

  • Source and history: see Hardcoded Secrets, Secrets in Git History.
  • Web-exposed .env files (Content Discovery).
  • Container images: Flare found 10,000+ Docker Hub images leaking secrets in one month; LLM keys were the most common (~4,000); 75% of developers who removed a leaked secret never rotated it.
  • Runtime credential providers an attacker can query after code execution or SSRF: env vars (AWS_ACCESS_KEY_ID/AWS_SESSION_TOKEN in Lambda), ~/.aws/credentials, /etc/boto.cfg, IMDS 169.254.169.254, ECS/CodeBuild 169.254.170.2 via AWS_CONTAINER_CREDENTIALS_RELATIVE_URI, EKS Pod Identity 169.254.170.23 with AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE, IRSA token at /var/run/secrets/eks.amazonaws.com/serviceaccount/token. See Cloud Metadata Service Exploitation and IMDSv2.
  • Developer endpoints and CI runners via infostealers and worms: Developer Workstation Secrets, Shai-Hulud Worm; in Nov 2026 the hijacked agent-framework PyPI releases also requested Azure managed-identity tokens for twelve resources and instance metadata (VeritasChain on Wiz findings).
  • Prompts in transit through AI inference providers. Dragos seeded ~2M prompts (Jul–Nov 2026) with unique links and credentials. Three providers had been breached for months; ~200 planted AWS keys, each sent once, were all stolen during late-October windows, including from requests rejected before inference (traffic copied at first arrival). The thief tested keys within hours, listed S3, searched Secrets Manager and Parameter Store, and tried to create Bedrock API keys and IAM users for persistence (tens of thousands of API calls). On 1 Nov the actor used the ARTEX framework to confirm keys were live; user agents artex-agent and artex-judge-r121 are worth detections. Marketplace sellers logged traffic and tested keys by hand; a Chinese lab’s scraper fetched secret links from more than half of seeded prompts, including ZDR-flagged ones. Together AI lost stored prompt samples after an AI coding agent committed a credential to its public GitHub repo (THN).

AI-era key types

  • Bedrock API keys — long-term keys create an IAM user BedrockAPIKey-xxxx with AmazonBedrockLimitedAccess (over half of Bedrock privileges) via iam:CreateServiceSpecificCredential; format ABSK + base64 that decodes to user name and account ID. They are bearer tokens (no SigV4). Seen leaked on GitHub within two weeks of launch. Short-term keys are client-side presigned URLs (bedrock-api-key-…), invisible at creation in CloudTrail. Detection: CreateServiceSpecificCredential with service=bedrock.amazonaws.com; usage carries "callWithBearerToken": true. Wiz recommends an SCP denying IAM users and bedrock:CallWithBearerToken.
  • Google AIza… keys — formerly low-impact, now often enable Gemini and other billable APIs; GitHub dorks like /AIza[0-9A-Za-z_-]{35}/ path:/.env. See Google Dorking.
  • GitGuardian counted 1,275,105 leaked AI-service secrets in 2025 (+81% YoY), incl. 113,000 DeepSeek keys.

Notable cases / campaigns

CampaignEntryOutcome
EleKtra-Leak (Unit 42)AWS keys in public GitHub, used within 5 min; actor blocklists accounts that repeatedly leak (researcher canaries)Long-running EC2 Monero cryptojacking (474 miners observed)
.env extortion (Unit 42)110,000 domains’ exposed .env (90,000 vars, 7,000 cloud)Exfil from S3, ransom note left in bucket; infrastructure built inside victims’ AWS
LLMjacking (GTIG/Mandiant)Stolen IAM keys, SA keys, PATs, LLM keys from GitHub>$100k/day spikes, up to $1M cumulative; UNC6993 via misconfigured SA key
GitHub PAT → cloud (Wiz CIRT)Read-scope PAT code-searches ${{ secrets.NAME }}; write-scope PAT adds a workflow, exfils double-base64’d secrets past log masking or creates fresh cloud keysCross-cloud lateral movement; deletes workflow runs/logs. 73% of orgs using Actions secrets store CSP creds there
AWS crypto-mining (2025)Compromised admin-like IAM keys; validated quietly with ec2:RunInstances DryRunECS/Lambda roles, image yenik65958/secret:user, ModifyInstanceAttribute to disable API termination for persistence
AI token jacking (Unit 42)AI keys from dev accounts, repos, Shai-Hulud/Miasma-style supply chainKeys resold through “transfer station” proxies (new-api, one-api)
ARTEX (Microsoft)Agentic AI framework scanning public GitHub for secretsAzure Key Vault and Storage exfil, Azure AI abuse
CISA Private-CISAContractor’s public repo, importantAWStokensAdmin on three AWS GovCloud accounts; keys valid 48h after takedown
Rackspace Spot (17 Nov 2026)Leaked credentials used to act as legitimate users in customer orgsCreated pods, read every Kubernetes Secret in affected clusters plus Spot API/refresh tokens, listed nodes and volumes; IoCs 23.224.0.0/15, pod prefixes i1, glm-, probe; console outage blocked customer rotation until 21 Nov
AI inference prompt theft (Dragos/OpenRouter, Jul–Nov 2026)Breached providers and logging resellers copying promptsCanary AWS keys abused within hours; OpenRouter dropped 3 providers and 125 ZDR endpoints
UNC6426GitHub token stolen by nx/QUIETVAULT stealerAbused GitHub→AWS OIDC trust to create admin role in 72h (Workload Identity Federation)

Defenses

  • Remove IAM users and long-term keys; use roles, Workload Identity Federation, IAM Roles Anywhere. Credential reports + IAM Access Analyzer unused-access findings to prune what remains.
  • Data perimeter: SCPs/RCPs that deny use of org credentials from outside expected networks and deny outside principals on S3 etc., so a leaked key fails off-network.
  • Monitor iam:AttachUserPolicy where policyArn contains AWSCompromisedKeyQuarantine — the quarantine email often goes to cloud engineering, not security.
  • Do not treat quarantine as revocation: deactivate the key, rotate, review CloudTrail from the exposure time (Credential Rotation and Revocation).
  • Canary credentials as tripwires: seed fake keys (e.g. Thinkst Canarytokens) into repos, prompts and agent context and treat any use as an incident; a planted secret has exactly one place it could have been read (THN).
  • After a platform breach that exposes cluster Secrets, rotate the platform tokens and every credential stored in the clusters, then review downstream logs (DBs, registries, Git, storage) from the exposure start (BleepingComputer).
  • Least privilege on whatever key exists; tight budgets/alerts on AI services against LLMjacking.

Sources