Cloud Threat Hunting: Six Hunts for Credential Abuse

Cloud Threat Hunting: Six Hunts for Credential Abuse

Augusto Barros
Augusto Barros
December 1, 2026

An attacker holding one valid AWS access key needs no malware to work inside the account. The first call can be GetCallerIdentity, which returns the account and identity behind the key, requires no IAM permissions and succeeds even when a policy explicitly denies it. If the key's permissions allow, the same key can then list roles, create a second access key and launch instances in a Region the account has never used. Each of those is a documented API call that engineers and deployment pipelines make in an ordinary week.

When the key is used from the attacker's own infrastructure, none of those calls touch one of your endpoints, so endpoint agents and network sensors have nothing to capture. The main record of them is in the cloud provider's audit logs.

Cloud threat hunting is the practice of searching cloud telemetry for attacker activity, most often the audit logs, such as AWS CloudTrail, Entra ID and Azure Activity logs, and Google Cloud Audit Logs, that record actions taken with valid credentials and the provider's own APIs.

This guide to cloud threat hunting covers six hunts for common malicious activity, AWS first and in the most depth, then Entra ID and Google Cloud. Each hunt names the attacker behavior and its MITRE ATT&CK ID, the log and fields, the filter logic, what normal looks like, and when to escalate. Hunts inside workloads, such as containers, Kubernetes clusters and virtual machines, rely on host and cluster telemetry and are not covered here.

{{ebook-cta}}

What does cloud threat hunting look for?

In a typical cloud attack scenario, the ATT&CK starting point is Valid Accounts: Cloud Accounts (T1078.004). The attacker authenticates as a real identity, using credentials obtained through phishing, credential stuffing, a leaked access key, a stolen token, or role credentials taken from a compromised workload.

Hunting in the cloud control plane therefore starts from identity and API activity rather than from files and processes. Each hunt below looks for a change in what an identity does: a new trust path, a new credential, wider permissions, a new network or Region, a logging change, or unusually heavy storage or secret reads. All the related events are part of legitimate actions by administrators and pipelines, so every hunt must include a definition of normal.

Like any hypothesis-driven hunt, each one looks for activity that produced no alert, whereas investigating GuardDuty findings begins with something a detector already flagged. Running the six on a schedule, ordered by where your detections are thinnest, is directed hunting applied to the cloud control plane.

Which logs does cloud threat hunting need?

AWS. CloudTrail Event history holds 90 days of management events per Region at no charge, and changing or deleting a trail does not alter it. Longer retention needs a trail or an event data store, which logs management events by default once you create it. Data events, including S3 object reads and listings such as GetObject and ListObjects, are off by default and billed separately. For CloudTrail threat hunting, most of the filter logic in this guide uses nine fields: eventSource, eventName, userIdentity, sourceIPAddress, userAgent, awsRegion, errorCode, requestParameters and readOnly. CloudTrail records global service events, such as IAM calls, in us-east-1, which Hunt 4 has to account for.

Entra ID. Audit logs record directory changes such as credential additions and role assignments. Sign-in logs come in four types: interactive user, non-interactive user, service principal and managed identity. Collect the non-interactive type as well. A client redeeming a refresh token produces one, so a refresh token replayed after session hijacking appears there. The Entra portal keeps audit and sign-in logs for 7 days on the Free tier and 30 days with P1 or P2. Longer baselines depend on exporting them through diagnostic settings, for example to Microsoft Sentinel, where they land in tables such as AuditLogs, SigninLogs, AADNonInteractiveUserSignInLogs and AADServicePrincipalSignInLogs. Sentinel ingestion of sign-in logs requires P1 or P2. Microsoft Graph activity logs, which record the HTTP requests Graph processes for the tenant, also require P1 or P2 and are kept only if you export them.

Azure resources. For Azure threat hunting beyond the directory, the activity log records control-plane operations such as creating a virtual machine, assigning a role or deleting a diagnostic setting. Azure keeps activity log entries for 90 days, and sending them to a Log Analytics workspace through a diagnostic setting keeps them longer. Blob reads are recorded in storage resource logs, which aren't collected until you create a diagnostic setting for the storage account.

Google Cloud. Admin Activity audit logs are always written, can't be disabled, and stay in the _Required bucket for 400 days. Data Access audit logs, which record reads of resource configuration and reads and writes of user data, are disabled by default for every service except BigQuery. Once enabled, they go to the _Default bucket, which keeps entries for 30 days unless you change it.

The baselines in each hunt use 30 to 90 days of history. Wherever the logs land, in a SIEM or a data lake, cloud threat hunting results depend on proper data retention. Each of the six hunts has an equivalent in all three clouds, though the event names differ:

HuntAWS (CloudTrail)Entra ID and AzureGoogle Cloud
1. First-time trust pathAssumeRole with a new caller and role pair; new role chains; AssumeRoleWithWebIdentity from a new subjectFirst sign-in by a service principal, or the first in monthsGenerateAccessToken on a service account (Data Access logs)
2. New credentialsCreateAccessKey, CreateLoginProfile, UpdateLoginProfile; CreateUserAdd service principal credentials; application certificate and secret updates; Add owner to applicationCreateServiceAccountKey
3. Wider accessAttachUserPolicy, AttachRolePolicy, PutUserPolicy, PutRolePolicy, CreatePolicyVersion, SetDefaultPolicyVersion, UpdateAssumeRolePolicy; group changes; resource policies that admit outside accountsroleAssignments/write; Add member to role; Add app role assignment to service principal; elevateAccessSetIamPolicy adding roles/owner or roles/editor, or service account impersonation roles
4. New networks and RegionsWrites outside the Region baseline; RunInstances; EnableRegion; first call from a new ASN; Bedrock model access by a new identityVirtual machine creation in a region or subscription with no history; service principal sign-in from an IP or ASN new to itVM instance creation in a region with no history; service account calls from a new caller IP
5. Logging changesStopLogging, DeleteTrail, UpdateTrail, PutEventSelectors; trail bucket and KMS key changesDiagnostic setting deleted or narrowedDeleteSink, UpdateSink; SetIamPolicy removing audit configs
6. Bulk storage and secret readsS3 data events: GetObject, ListObjects; ListBuckets; snapshot sharing and bucket policy changes; Secrets Manager GetSecretValue and ListSecretsStorageBlobLogs: GetBlob (diagnostic setting required); storage account listKeys; Key Vault SecretGet and SecretList (diagnostic setting required)Cloud Storage Data Access logs: DATA_READ; Secret Manager AccessSecretVersion (Data Access logs)

The filter logic in each hunt is written as plain field conditions, so translate it into SPL, KQL, SQL or whatever your SIEM or data lake uses. Test every condition against your own data before scheduling it. Prophet AI Threat Hunter can identify the appropriate data repositories and write the queries in the corresponding query language by itself.

Hunt 1: Roles and accounts used for the first time

Hunt 1 looks for an identity using a trust path for the first time: a first cross-account role assumption, a new role chain, or a first service account impersonation. An attacker with one credential often tests which roles it can assume, because cross-account roles and role chains reach beyond that credential's own permissions. The technique is Valid Accounts: Cloud Accounts (T1078.004).

In the role's account, a cross-account AssumeRole event records the caller's account in userIdentity.accountId, with userIdentity.type set to AWSAccount, and the target role in requestParameters.roleArn. CloudTrail also logs the request in the caller's account, and the two entries share a sharedEventID. CloudTrail does not log denied cross-account role assumptions in the role's account, so failed attempts from an account outside your organization never reach your logs.

  • eventSource = sts.amazonaws.com AND eventName IN (AssumeRole, AssumeRoleWithWebIdentity, AssumeRoleWithSAML)
  • pair = userIdentity.accountId + requestParameters.roleArn for cross-account calls, or userIdentity.arn + requestParameters.roleArn within one account
  • for AssumeRoleWithWebIdentity, pair userIdentity.identityProvider and userIdentity.userName (the token's subject) with requestParameters.roleArn, so a repository or workload new to the role stands out; a trust policy with no condition on the subject can let other repositories on that provider assume the role
  • flag pairs with no occurrence in the previous 90 days
  • role chains: userIdentity.type = AssumedRole, flag new pairs of userIdentity.sessionContext.sessionIssuer.arn + requestParameters.roleArn
  • dormant identities: any call by a user, role or access key with no activity in the previous 90 days
  • discovery bursts: more distinct eventName values in an hour than the identity's 30-day hourly maximum, mostly List, Describe and Get calls, often with a high share of errors such as AccessDenied or UnauthorizedOperation (Cloud Service Discovery, T1526; Cloud Infrastructure Discovery, T1580)

Extend the hunt to identities that become active after months of silence. In a case study Prophet Security published, a dormant AWS access key that had not been rotated in four years began making discovery calls such as ListBuckets. The calls came through a third-party S3 browser tool from a VPN address in a country never seen for that account, and they failed with AccessDenied. Three signals together marked them as hostile: the new source, the rare user agent, and discovery calls the identity had not made in the previous 30 days. That case began with a GuardDuty finding; a hunt that checks for the same three signals can surface the key without one.

In one AntiFox intrusion on AWS, a similar pattern played out in about half an hour: identity checks such as GetCallerIdentity, then hundreds of API calls across several valid identities, most of them denied.

What normal looks like. Deployment pipelines and federated users assume the same few roles repeatedly. In a stable account, new pairs should be rare enough to review by hand. Most legitimate ones follow a change you can point to, such as a new account in the organization, a new pipeline or a new vendor integration.

When to escalate. Escalate when the calling account is outside your organization, the chain ends in a role that can modify IAM, or the first use comes from a new network.

Entra ID and Google Cloud. In Entra ID, the nearest equivalent is a service principal signing in for the first time, or the first time in months, in the service principal sign-in log. When one does, check what it did next: Microsoft Graph activity logs record each request it sent to Graph, and storage and Key Vault resource logs, where you collect them, show what data it reached. In Google Cloud, it is service account impersonation: flag the first time a principal calls GenerateAccessToken for a given service account. Those calls are recorded in Data Access audit logs for the IAM Service Account Credentials API (a separate entry from the IAM API in audit log settings), which you have to enable first.

Hunt 2: New keys, secrets and passwords on existing identities

Hunt 2 looks for a new long-lived credential on an existing identity, which keeps an attacker's access alive after the original credential is revoked. With compromised AWS credentials, an attacker can create a second access key or give a programmatic user a console password. The technique is Account Manipulation: Additional Cloud Credentials (T1098.001). Its ATT&CK entry covers AWS access keys, Entra ID service principal and application credentials, and Google Cloud service account keys.

  • eventSource = iam.amazonaws.com AND eventName IN (CreateAccessKey, CreateLoginProfile, UpdateLoginProfile)
  • requestParameters.userName present and different from the calling user
  • CreateLoginProfile for a user with no console sign-in history
  • CreateAccessKey for a user with no API activity in the previous 90 days
  • CreateUser followed by CreateAccessKey or CreateLoginProfile for the new user, the same persistence through a new identity (Create Account: Cloud Account, T1136.003)

What normal looks like. Key rotation produces a recognizable sequence: a new key, then the old key deactivated with UpdateAccessKey or removed with DeleteAccessKey, run by the same automation identity on a regular schedule. An organization that gives people AWS access through single sign-on should see few IAM user credentials created at all.

When to escalate. Escalate when the creator has never managed IAM users, the creation came from a new network, or the new credential's first use comes from a different network than its creation.

Entra ID. The audit log records new secrets and certificates on applications and service principals:

  • AuditLogs: ActivityDisplayName = "Add service principal credentials"
  • AuditLogs: ActivityDisplayName starts with "Update application" AND the change concerns "Certificates and secrets management"
  • AuditLogs: ActivityDisplayName = "Add owner to application" or "Add owner to service principal", which often comes just before a new secret
  • AuditLogs: ActivityDisplayName starts with "Update application" AND the change adds a federated identity credential, which lets tokens from an outside identity provider sign in as the app without a secret

Microsoft's report on Storm-0940 describes application credential changes used for persistence, alongside activity that needed no interactive user sign-in. Prophet Security's post on ARTEX AI attacks, the agentic framework in that report, covers how to check Entra ID for the leaked application credentials those intrusions relied on. A report like that becomes actionable threat intelligence once it turns into a hunt such as this one. Treat a new credential on an application that already holds high-privilege Microsoft Graph permissions as an escalation by default.

Google Cloud. Service account key creation is an Admin Activity event, so it is logged even when Data Access logs are off. Escalate when a human user creates a key for a service account that holds project-level roles.

  • methodName = google.iam.admin.v1.CreateServiceAccountKey

Hunt 3: Policy changes that widen access

Hunt 3 looks for a permission change that gives an identity more access than it had, made by a principal that does not normally change permissions. An attacker can attach an administrator policy, write a permissive inline policy, or rewrite a role's trust policy so an outside account can assume it. The technique is Account Manipulation: Additional Cloud Roles (T1098.003).

  • eventSource = iam.amazonaws.com AND eventName IN (AttachUserPolicy, AttachRolePolicy, AttachGroupPolicy, PutUserPolicy, PutRolePolicy, PutGroupPolicy, AddUserToGroup, DeleteUserPermissionsBoundary, DeleteRolePermissionsBoundary, CreatePolicyVersion, SetDefaultPolicyVersion, UpdateAssumeRolePolicy)
  • requestParameters.policyArn ends with :policy/AdministratorAccess
  • decoded requestParameters.policyDocument contains a statement whose Action or Resource is the bare wildcard
  • CreatePolicyVersion AND requestParameters.setAsDefault = true
  • UpdateAssumeRolePolicy where the new trust policy names an account ID outside your organization or a Principal of "*"
  • resource policies, which widen access without any IAM change: PutBucketPolicy, PutKeyPolicy, and Lambda AddPermission (logged with a version suffix, such as AddPermission20150331v2), where the new policy names an account outside your organization or a Principal of "*"

A managed policy holds up to five versions, so SetDefaultPolicyVersion can switch a policy back to an older, broader version without any new policy text appearing in the log. Compare the version being activated with the one it replaces. UpdateAssumeRolePolicy changes who can assume a role, so check Hunt 1 results for that role afterward.

What normal looks like. In accounts managed through infrastructure as code, most IAM changes come from one deploy role running on known runners, and each matches a merged pull request or change ticket. Expect some benign changes outside that path: IAM Identity Center creates and updates its AWSReservedSSO_ roles itself, and AWS services create service-linked roles the first time a feature is used.

When to escalate. Escalate IAM changes by a person or by an identity that has never changed IAM before. Also escalate AdministratorAccess attached to a user, a trust policy that admits an outside account, and any change in the same session as a Hunt 2 credential.

Azure, Entra ID and Google Cloud. The equivalents are Azure role assignments, Entra directory role and app role grants, and Google Cloud IAM policy changes. Google advises against granting the basic Owner and Editor roles in production unless there is no alternative, so any new binding for either deserves review.

  • Azure: operationName = Microsoft.Authorization/roleAssignments/write for Owner, Contributor or User Access Administrator at subscription or management group scope (the log names the role by roleDefinitionId, so map the GUID to a role name first)
  • Azure: operationName = Microsoft.Authorization/elevateAccess/action, a Global Administrator granting themselves User Access Administrator over every subscription in the tenant, recorded in the tenant-level activity log and in Entra audit logs under Azure RBAC (Elevated Access) rather than a subscription's
  • Entra ID: ActivityDisplayName = "Add member to role" for directory roles such as Global Administrator, and in tenants that use Privileged Identity Management, PIM activity names such as "Add member to role completed (PIM activation)"
  • Entra ID: ActivityDisplayName = "Add app role assignment to service principal"
  • Entra ID: ActivityDisplayName = "Consent to application" or "Add delegated permission grant", especially consent that gives an app high-privilege Microsoft Graph permissions such as Mail.Read or Directory.ReadWrite.All
  • Google Cloud: methodName = SetIamPolicy adding a binding for roles/owner or roles/editor, or for roles/iam.serviceAccountTokenCreator or roles/iam.serviceAccountUser, which let the holder act as a service account, including bindings set at folder or organization level

Hunt 4: Credentials used from new networks and Regions

Hunt 4 looks for an identity calling from a network, or writing in a Region, that it has no history of using. A stolen key or role session used from the attacker's own infrastructure usually calls from an address the identity has never used, so the network baseline below can catch the theft even when the attacker creates nothing. Attackers often create resources in Regions the victim does not use or monitor, for example to mine cryptocurrency at the victim's expense. The techniques are Unused/Unsupported Cloud Regions (T1535) and Resource Hijacking: Compute Hijacking (T1496.001), or Cloud Service Hijacking (T1496.004) when what they take is a hosted AI model rather than compute.

  • readOnly = false AND awsRegion not in the account's 90-day Region baseline
  • build the baseline without global service events, such as IAM calls, which CloudTrail records in us-east-1
  • eventName = RunInstances by an identity that has never launched instances, or in a Region new to the account
  • eventSource = account.amazonaws.com AND eventName = EnableRegion
  • eventSource = bedrock.amazonaws.com AND eventName IN (InvokeModel, InvokeModelWithResponseStream, Converse, ConverseStream, PutUseCaseForModelAccess, PutFoundationModelEntitlement) by an identity with no Bedrock history, the pattern of stolen keys used to run AI models at the victim's expense

Regions launched after March 20, 2019 are disabled by default. An attacker who wants one must first call EnableRegion, an Account Management API operation that CloudTrail logs. When the management account enables a Region for a member account, the call is made from, and logged in, the management account. An EnableRegion call outside a planned expansion is worth reviewing on its own.

Apply the same baseline to networks. Map sourceIPAddress to an ASN, and flag an identity's first call from an ASN it has not used in 90 days, including identity checks such as GetCallerIdentity. Work each hit the way you would an impossible travel alert, checking it against travel, VPN egress and new infrastructure before calling it hostile.

Two kinds of sourceIPAddress need their own handling. Calls an AWS service makes on the identity's behalf record the service's name, such as cloudformation.amazonaws.com, and calls through a VPC endpoint record a private address with vpcEndpointId set, so baseline those apart from public addresses. Role sessions issued to an EC2 instance end userIdentity.principalId with the instance ID, and the same session calling from an address that isn't one of your own egress points usually means its credentials were used off the instance.

What normal looks like. Disaster recovery tests, planned Region expansions and multi-Region deployments all produce legitimate activity outside the baseline, and each should match a plan or a change record.

When to escalate. Escalate compute in a Region enabled that day, an identity's first-ever instance launch, and a new ASN that coincides with a hit from Hunts 1 to 3.

Entra ID, Azure and Google Cloud. In Entra ID, apply the network baseline to the service principal sign-in log, and follow up a sign-in from an IP address or ASN new to a service principal the same way as a first sign-in in Hunt 1. The Azure activity log records virtual machine creation, and Google Cloud Admin Activity logs record VM instance creation. Join either with your resource inventory to get each new machine's region, then compare it with the subscription's or project's history. In Google Cloud, the callerIp field in each audit log entry supports the same network baseline for service accounts.

Hunt 5: Logging someone turned off

Hunt 5 looks for changes that stop, delete or narrow the logs the other five hunts depend on. In each cloud, narrowing or cutting off the logs you collect can take one API call. The technique is Disable or Modify Cloud Log (T1685.002), which ATT&CK files under Disable or Modify Tools in the Defense Impairment tactic. Older mappings use T1562.008.

  • eventSource = cloudtrail.amazonaws.com AND eventName IN (StopLogging, DeleteTrail, UpdateTrail, PutEventSelectors, DeleteEventDataStore, StopEventDataStoreIngestion)
  • PutEventSelectors that drops management events, write events or data event resources compared with the previous configuration

AWS's API reference says StopLogging is unnecessary under most circumstances, because a trail can be updated without stopping it. Any StopLogging call therefore deserves a look. For a multi-Region trail, StopLogging has to be called from the trail's home Region, so search that Region's events. Event history is unaffected by trail changes, so the StopLogging or DeleteTrail call stays visible there for 90 days after the trail stops delivering.

A trail can also be blinded without a CloudTrail call. A change to the trail bucket's policy or lifecycle rules, deletion of the bucket, or DisableKey or ScheduleKeyDeletion on the trail's KMS key can each stop usable logs from arriving, so watch those calls on the logging bucket and key too. An organization trail created in the management account can't be stopped or deleted from a member account other than a CloudTrail delegated administrator, which narrows this path for an attacker holding member-account credentials.

Azure. Deleting a diagnostic setting stops resource logs, or an activity log export, from reaching your SIEM without touching the resource itself:

  • operationName = MICROSOFT.INSIGHTS/DIAGNOSTICSETTINGS/DELETE, or MICROSOFT.INSIGHTS/DIAGNOSTICSETTINGS/WRITE that drops log categories or changes the destination

Entra ID's own log export is a separate diagnostic setting configured at tenant level, so confirm that whatever watches subscription diagnostic settings also covers that one.

Google Cloud. Admin Activity logs cannot be disabled, so an attacker who wants them out of your SIEM deletes or edits the sink that exports them, or breaks the destination it writes to:

  • methodName = google.logging.v2.ConfigServiceV2.DeleteSink
  • methodName = google.logging.v2.ConfigServiceV2.UpdateSink where the filter narrows or an exclusion is added
  • methodName = SetIamPolicy where protoPayload.serviceData.policyDelta.auditConfigDeltas shows a removal or an added exempted principal, which turns off the Data Access logs that Hunts 1 and 6 depend on

What normal looks like. Logging changes usually come from the platform team's automation, during a change window, with a ticket. StopLogging has few legitimate uses by AWS's own description, and DeleteTrail normally accompanies a documented migration or decommissioning.

When to escalate. Escalate StopLogging or DeleteTrail without a change record, event selectors narrowed by anyone outside the platform team, and any logging change by an identity from another hunt's results.

Hunt 6: Bulk reads from storage and secret stores

Hunt 6 looks for an identity reading far more objects, or far more buckets, than it has before. With wider permissions in hand, an attacker often lists buckets and downloads objects. The technique is Data from Cloud Storage (T1530).

Most of this hunt depends on data-plane logging that is off by default in all three clouds: S3 data events in AWS, storage resource logs in Azure, and Cloud Storage Data Access logs in Google Cloud. Where cost rules out logging every bucket, enable it for the buckets that hold sensitive data, backups and exports.

  • eventSource = s3.amazonaws.com AND eventName IN (GetObject, ListObjects)
  • count per userIdentity.arn per requestParameters.bucketName per hour, compared with that identity's 30-day hourly maximum
  • distinct buckets read per identity per day, flagged above that identity's previous maximum
  • eventName = ListBuckets by an identity that has never called it (a management event, logged without data events)

Some exfiltration leaves no reads to count. Sharing a snapshot with another account (ModifySnapshotAttribute adding createVolumePermission, or ModifyDBSnapshotAttribute adding restore), opening a bucket with PutBucketPolicy or DeletePublicAccessBlock, and setting up replication to an outside bucket with PutBucketReplication all move or expose data without the attacker's identity making GetObject calls. They are management events, so this part of the hunt runs even where data events are off. Flag any that names an account outside your organization or makes a resource public. ATT&CK tracks the snapshot path as Transfer Data to Cloud Account (T1537).

Azure. Blob reads appear in StorageBlobLogs once the diagnostic setting exists:

  • StorageBlobLogs: OperationName = "GetBlob", counted per RequesterObjectId per container

Microsoft notes that Shared Key and SAS authorization provide no means of auditing individual identities, so a per-identity baseline works only for reads authorized through Entra ID. For the rest, group reads by caller IP address and user agent, and group SAS requests by token hash (AuthenticationHash). The key retrieval itself is logged: operationName = Microsoft.Storage/storageAccounts/listKeys/action in the activity log records the identity that pulled the account keys, which is the step to hunt when later reads can't be tied to anyone.

Google Cloud. Object reads and listings are recorded as DATA_READ entries in Cloud Storage Data Access logs once those logs are enabled, and the same per-principal baseline applies.

Secret stores. An identity that starts listing secrets, or reads secrets it has never read, may be collecting credentials to reach other systems. In some of the AntiFox intrusions, a successful request read a production secret. The technique is Credentials from Password Stores: Cloud Secrets Management Stores (T1555.006). Secrets Manager and Parameter Store calls are management events, so this part of the hunt runs without data events:

  • eventSource = secretsmanager.amazonaws.com AND eventName IN (GetSecretValue, BatchGetSecretValue, ListSecrets)
  • count distinct secrets read per identity per day, flagged above that identity's previous maximum
  • ListSecrets by an identity that has never called it
  • eventSource = ssm.amazonaws.com AND eventName IN (GetParameter, GetParameters, GetParametersByPath) with requestParameters.withDecryption = true, counted the same way

Azure and Google Cloud. Key Vault records SecretGet and SecretList operations in its resource logs once a diagnostic setting sends the AuditEvent category to your workspace. In Google Cloud, AccessSecretVersion calls appear in Secret Manager Data Access audit logs, which you have to enable. In every cloud, applications and rotation jobs read the same secrets from the same identities on a schedule, so a new reader of a secret is a stronger signal than a change in volume.

What normal looks like. Backup, replication, analytics and ETL jobs read large volumes every day from the same identities, networks and schedules. Exclude them by identity and network rather than by volume, since an attacker reading at a backup job's volume would otherwise pass.

When to escalate. Escalate heavy reads by a person or by a role new to that bucket, reads that follow a hit from Hunts 1 to 5, and reads from a new network. A DLP alert on the same objects, where your DLP tool covers them, is corroborating evidence to pull into the investigation. For secrets, escalate a listing followed by reads of many secrets, and any read of a production secret by an identity that has never read it before.

How do you tell an attacker from your own automation?

Each hunt above will return hits from your own automation, and a baseline per identity, rather than per account, is what separates those hits from an attacker. Start by sorting identities into classes with different expected behavior: CI/CD and infrastructure-as-code roles, backup and data pipeline roles, people and their federated roles, and break-glass accounts. A deployment role usually calls the same APIs from the same runners on a schedule. A break-glass account should be silent almost all the time, so any use of it is a lead.

For AWS threat hunting, five kinds of context help separate those classes from an attacker:

  • Source network. Map sourceIPAddress to an ASN and compare it with your corporate egress ranges and your CI runners' ranges.
  • User agent. userAgent distinguishes the console, the CLI, SDKs and infrastructure-as-code tools such as Terraform. The client sets the value, so an attacker can copy your pipeline's string. Use it to rank leads, and never suppress a lead on user agent alone.
  • Session issuer. For role sessions, userIdentity.sessionContext.sessionIssuer identifies the role that issued the session, so you can baseline the role instead of each session name.
  • Source identity. Requiring sts:SourceIdentity in role trust policies makes each session carry the identity of the person or workload that started it, and the value persists through role chains.
  • Change records. Put any IAM, trail or diagnostic-setting change without a matching pull request or change ticket at the top of the review queue.

Entra ID and Google Cloud logs carry the same kinds of context for most calls: the identity, its source IP address and its client. Whatever threat hunting tools run these queries, the per-identity baseline is the first thing to build for cloud threat hunting, because every hunt in this guide depends on it.

What should you do with a hit?

Treat a hit as a lead, the way you would treat an alert in alert triage, and scope it before deciding anything. A notice that an access key was exposed, from your cloud provider or a secret-scanning service, is a lead too. Scope the key the same way to see whether anyone used it, starting with identity checks such as GetCallerIdentity from networks the key has never used. Pull every call made with the same access key or session across all Regions, failed calls included. Use userIdentity.accessKeyId where CloudTrail records it, and fall back to the principal ARN otherwise. Then follow every role session that identity created. Each AssumeRole event records the new session's temporary key in responseElements.credentials.accessKeyId, and searching for that key finds the session's later calls.

Next, look for the persistence and access changes from Hunts 2 and 3 made by the same identity: new access keys, console passwords, policy attachments and trust policy changes. Containment means deactivating the keys, revoking active sessions for any role the identity assumed, and rotating any secrets it could read. Deactivating an access key does not end temporary credentials already issued from it through GetSessionToken or GetFederationToken, so also attach an explicit deny-all policy to the IAM user (root user keys can't be restricted this way) while the investigation runs.

When the investigation closes, turn the hunt into a detection. Schedule the filter and its baseline, tune it with the benign cases the investigation found, and backtest it against your history before it goes live. Once it runs as a detection, catching that technique no longer depends on someone remembering to rerun the hunt. That handoff is detection engineering work, and it turns a one-time cloud threat hunting result into standing coverage.

How Prophet Security helps with cloud threat hunting

Running six hunts across three clouds on a schedule is repetitive query work of the kind AI threat hunting is built for. Prophet AI follows the same lead-to-detection sequence. Prophet AI Threat Hunter runs scheduled and custom hunts autonomously across the data sources you connect, including cloud and identity logs, and ships expert-curated hunts for emerging threats. Suspicious leads go to Prophet AI SOC Analyst for a full investigation, with every query and piece of evidence attached. The same agent already investigates cloud alerts across AWS, Azure and GCP. Validated findings become detection opportunities in Prophet AI Detection Engineer, backtested and delivered as reviewable changes.

If you want to see it run against your own cloud logs, you can start a proof of value from the Prophet AI Threat Hunter page or request a demo today.

What is cloud threat hunting?

Cloud threat hunting is the practice of searching cloud telemetry, most often provider audit logs such as AWS CloudTrail, Entra ID and Azure Activity logs, and Google Cloud Audit Logs, for attacker activity that produced no alert. A typical cloud intrusion begins with valid credentials and documented API calls made from the attacker's own infrastructure, so endpoint agents capture little of it. Hunts therefore start from identity and API activity rather than from files and processes.

Which logs do you need for cloud threat hunting in AWS, Azure and Google Cloud?

Start with the control-plane audit logs: AWS CloudTrail, Entra ID audit and sign-in logs including the non-interactive and service principal types, the Azure activity log, and Google Cloud Admin Activity audit logs. Data-plane logs that record object reads, such as S3 data events, are off by default in all three clouds, so enable them at least for buckets holding sensitive data. Baselines need 30 to 90 days of history, which usually means exporting to a SIEM or data lake.

How do you tell an attacker from your own automation in cloud audit logs?

Build a baseline per identity rather than per account, then sort identities into classes with different expected behavior: CI/CD and infrastructure-as-code roles, backup and data pipeline roles, people and their federated roles, and break-glass accounts. A deployment role usually calls the same APIs from the same runners on a schedule, so a first call from a new ASN or an IAM change with no matching change ticket stands out. Use user agent to rank leads, since attackers can copy it.

What is the difference between cloud threat hunting and endpoint threat hunting?

Endpoint threat hunting works from files, processes and host telemetry, while cloud threat hunting works from identity and API activity in the provider's audit logs. An attacker using one valid access key from their own infrastructure can list roles, create a second key and launch instances in an unused Region without touching a managed endpoint. The signal is a change in what an identity does. Hunts inside workloads such as Kubernetes clusters still depend on host and cluster telemetry.

What should you do when a cloud threat hunt returns a hit?

Treat the hit as a lead and scope it before deciding anything, the way you would an alert in alert triage. Pull the calls made with the same access key or session across all Regions, failed calls included, then follow each role session that identity created. Contain by deactivating keys, revoking active role sessions and rotating any secrets it could read. Then schedule the filter and its baseline as a detection, the lead-to-detection sequence Prophet AI follows.

Table of contents
Add as Google Preferred Sources

Insights

Definitive Guide to Detection Engineering

Where detection engineering falls short, how to close those gaps, and what it looks like in an AI-enabled SOC.

Download Guide
Augusto Barros

Augusto Barros

As Principal Product Manager at Prophet Security, Augusto applies his hands-on experience and critical thinking to help push forward the new capabilities of Prophet AI SOC platform