Most cloud intrusions never touch a server: they are a sequence of authorised-looking API calls made with a stolen identity against the cloud control plane. Endpoint detections do not see them, and native threat detection services see only part of them. Control plane detection engineering means writing, testing and tuning rules against AWS CloudTrail, the Azure Activity Log and Google Cloud Audit Logs so that credential theft, privilege escalation, logging tampering and exfiltration show up as alerts within minutes. This guide maps the same attacker behaviours to the event names in all three clouds, explains how to normalise identities across providers, and sets out a test and tuning process. It is written for detection engineers and cloud security teams. Log collection itself is covered in the Cloud Logging and Audit Trail Guide; the method behind rule writing is in the Detection Engineering Guide.
Key takeaways
- Detect behaviours, then map events: start from a short list of attacker behaviours (new credentials, new role grants, logging changes, data movement) and map each one to the event names in every provider you run.
- Identity is the join key: the hardest part of cross-cloud detection is turning
userIdentity,callerandprincipalEmailinto one human or workload owner. Normalise identity before you write rules. - Native services are a floor, not a ceiling: GuardDuty, Microsoft Defender for Cloud and Security Command Center Event Threat Detection cover known patterns; your own rules cover your environment's invariants, such as "nobody grants Owner outside the pipeline".
- Logging tampering is the highest-priority rule set: stopping a trail, deleting a diagnostic setting or a log sink blinds every other detection, so alert on it at high severity with no suppression.
- Test every rule with real events: replay or generate the API calls in a sandbox account, subscription or project, confirm the alert fires, and record the test so regressions are caught after parser or schema changes.
The three control plane log sources
| Property | AWS CloudTrail | Azure Activity Log | Google Cloud Audit Logs |
|---|---|---|---|
| What it records | Management events (default) and optional data events and network activity events | Subscription-level Resource Manager operations: Administrative, Policy, Security and other categories | Admin Activity, Data Access, System Event and Policy Denied logs |
| Always on? | Event history for management events; a trail or event data store is needed to keep and route them | Yes, but a diagnostic setting is needed to send it to Log Analytics, storage or Event Hubs | Admin Activity and System Event are always written and cannot be disabled; Data Access is off by default except BigQuery |
| Operation field | eventSource + eventName | operationName (for example Microsoft.Network/networkSecurityGroups/write) | protoPayload.serviceName + protoPayload.methodName |
| Who | userIdentity (type, arn, sessionContext) | caller and claims | protoPayload.authenticationInfo.principalEmail |
| From where | sourceIPAddress, userAgent | httpRequest.clientIpAddress | protoPayload.requestMetadata.callerIp |
| Grouping | sessionContext, signInSessionArn | correlationId | operation.id |
| Org-wide collection | Organisation trail | Diagnostic settings per subscription, enforced by Azure Policy | Aggregated sink at organisation or folder |
Azure has a second control plane log that matters as much as the Activity Log: Entra ID audit and sign-in logs, which record role assignments in the directory, application credentials and consent. Treat it as part of the Azure control plane. See the Entra ID Sign-In and Audit Log Detection Guide and the Azure Monitor, Activity Log and Diagnostic Settings Guide.
Normalising identity across clouds
A rule that says "alert when a human grants admin outside change windows" needs to know whether the caller is a human, a workload, or a cloud service acting on someone's behalf. Each provider encodes that differently:
- AWS:
userIdentity.typevalues includeRoot,IAMUser,AssumedRole,FederatedUser,AWSService,AWSAccountandIdentityCenterUser. For assumed roles,sessionContext.sessionIssuer.arngives the role,sessionContext.attributes.mfaAuthenticatedshows MFA, andsourceIdentitycarries the original user through role chaining if you require it in STS.invokedBymarks service-initiated calls. CloudTrail also recordsec2RoleDelivery(1.0 for IMDSv1, 2.0 for IMDSv2) in session context. - Azure:
calleris a UPN for users or an object or application ID for service principals and managed identities. Resolve application IDs against Entra ID to get the owning team. - Google Cloud: service accounts end in
.iam.gserviceaccount.com, service agents ingserviceaccount.comdomains owned by Google. Impersonation shows up asGenerateAccessTokenin IAM Data Access logs, which must be enabled to see it.
Build a lookup table (identity, type, owner, expected source networks, expected regions) from your IGA, CMDB or NHI inventory and enrich every event with it at ingest. The Detection Engineering for Non-Human Identities Guide covers workload baselining in depth.
Core detection set mapped across providers
The table lists behaviours that apply in every cloud, the ATT&CK v20 technique, and the events to key on. Sigma community rules exist for many of these and are a good starting point for logic and false positive notes.
| Behaviour | ATT&CK | AWS (CloudTrail eventName) | Azure (operationName) | Google Cloud (methodName) |
|---|---|---|---|---|
| Logging disabled or modified | T1685.002 Disable or Modify Cloud Log | StopLogging, DeleteTrail, UpdateTrail, PutEventSelectors | Microsoft.Insights/diagnosticSettings/delete and /write | google.logging.v2.ConfigServiceV2.DeleteSink, UpdateSink, exclusion changes |
| Security tooling disabled or blinded | T1685 Disable or Modify Tools | DeleteDetector, UpdateDetector, CreateIPSet (GuardDuty); StopConfigurationRecorder, DeleteDeliveryChannel (Config) | Microsoft.Security/alertsSuppressionRules/write; Defender plan changes | Access policy and access level deletion in Access Context Manager; VPC Service Controls perimeter changes |
| New long-lived credential | T1098.001 Additional Cloud Credentials | CreateAccessKey for another user; CreateLoginProfile, UpdateLoginProfile | Entra ID audit: add service principal credentials; Microsoft.Storage/storageAccounts/listKeys/action | google.iam.admin.v1.CreateServiceAccountKey |
| Privileged role granted | T1098.003 Additional Cloud Roles | AttachUserPolicy, AttachRolePolicy, PutRolePolicy, UpdateAssumeRolePolicy | Microsoft.Authorization/roleAssignments/write; Microsoft.Authorization/elevateAccess/action | SetIamPolicy adding owner, editor or token creator roles |
| Root or break-glass use | T1078.004 Cloud Accounts | userIdentity.type = Root, excluding AwsServiceEvent | Activity by emergency access accounts | Activity by super admin or organisation admin accounts |
| Snapshot or image shared out | T1537 Transfer Data to Cloud Account | ModifySnapshotAttribute, ModifyImageAttribute, ModifyDBSnapshotAttribute | Disk and snapshot beginGetAccess (SAS export) | Image and snapshot IAM changes to external principals |
| Storage made public | T1530 Data from Cloud Storage | PutBucketPolicy, DeletePublicAccessBlock, PutBucketAcl | Storage account write changing public network access or anonymous access | storage.setIamPermissions adding allUsers |
| Trust or federation change | T1484.002 Trust Modification | CreateSAMLProvider, UpdateSAMLProvider, CreateOpenIDConnectProvider | Entra ID audit: set federation settings on domain | Workload identity pool and provider creation |
| Hierarchy moved to escape policy | T1666 Modify Cloud Resource Hierarchy | LeaveOrganization, MoveAccount | Subscription moved between management groups | Project moved between folders or organisations |
| Recovery inhibited | T1490 Inhibit System Recovery | DeleteBackupVault, DeleteRecoveryPoint, PutBucketVersioning suspended | Recovery Services vault soft delete disabled | Backup vault and bucket retention policy changes |
Treat the event names as the starting set, not a complete list: providers add APIs every month. Confirm each name against the provider's API reference when you build the rule, and record the version you checked.
Native threat detection services and where your rules add value
| Provider | Service | Examples of what it detects | What it will not know |
|---|---|---|---|
| AWS | Amazon GuardDuty | UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS, Stealth:IAMUser/CloudTrailLoggingDisabled, Policy:IAMUser/RootCredentialUsage, Persistence:IAMUser/AnomalousBehavior | That a role should only be assumed by your pipeline, or that a given account never shares snapshots |
| Azure | Microsoft Defender for Cloud (Defender for Resource Manager) | Suspicious management operations and known attacker toolkits against Resource Manager | Your change windows, approved deployment identities and management group design |
| Google Cloud | Security Command Center Event Threat Detection | DORMANT_SERVICE_ACCOUNT_KEY_CREATED, LEAKED_SA_KEY_USED, DEFENSE_EVASION_MODIFY_VPC_SERVICE_CONTROL, DATA_EXFILTRATION_BIG_QUERY | Which service accounts are expected to create keys, and from where |
Ingest native findings into the same SIEM as raw logs and correlate them: a GuardDuty credential exfiltration finding followed by CreateAccessKey from the same session is a much higher-confidence incident than either alone. See the Amazon GuardDuty Guide, the Microsoft Defender for Cloud Guide and the Microsoft Sentinel Guide.
Writing rules that survive production
- Invariant rules: encode facts about your environment ("only the deployment role creates IAM roles in production", "no account outside the log archive account writes to the trail bucket"). These have the lowest false positive rates.
- Allow lists by identity, not IP: CI runners, SaaS integrations and cloud services change IPs. Key exceptions on the role ARN, service principal ID or service account email.
- Sequence rules: chain events within a session or correlation ID: new credential then use from a new IP; role grant then data access; logging change then destructive action.
- Rare-operation rules: first time an identity calls a sensitive API, or first use of a region. Azure's community rule for rare operations and GuardDuty's anomalous behaviour findings follow this pattern.
- Severity by blast radius: a role grant at the organisation root, management group or folder is more severe than the same grant on a single resource group.
- Write in a portable format: Sigma rules with product and service log sources (for example
product: aws, service: cloudtrail) can be converted to most SIEM languages and kept in source control.
Worked example: one behaviour in three clouds
Take "a workload identity gains a new long-lived credential and uses it from an unfamiliar network". The logic is the same everywhere; only the fields change.
- Trigger: AWS
CreateAccessKeywhere the target user differs from the caller; Googlegoogle.iam.admin.v1.CreateServiceAccountKey; Entra ID audit log entry adding a credential to a service principal. - Enrich: look up the target identity in the enrichment table. If its owner policy says "federated or keyless only", raise severity immediately, because no legitimate process should create a key.
- Correlate: within 24 hours, look for the first API call signed with the new key (AWS
userIdentity.accessKeyId; GoogleauthenticationInfo.serviceAccountKeyName; Azure sign-in logs for the service principal) from a source address outside the identity's expected networks. - Escalate: if the new credential then lists storage, reads secrets or changes IAM, open an incident and disable the credential through the runbook.
Building one behaviour end to end in all providers, with tests, teaches more about your log pipeline than writing twenty single-event rules, and it exposes missing fields early.
Testing and rollout
- Build a detection sandbox: one dedicated account, subscription and project per provider, wired to the same log pipeline as production.
- Write a test for each rule: a script or infrastructure-as-code change that performs the benign version of the behaviour (create and delete an access key, add and remove a role assignment, update a sink).
- Run in monitor mode first: deploy the rule to production as informational for one to two weeks, record every hit and classify it.
- Tune with identity exceptions: add allow-list entries for named pipelines and owners, each with an expiry date.
- Promote to alerting: assign severity and an owner, link a response runbook.
- Re-test on change: rerun the test suite when the parser, log schema, SIEM content pack or provider API changes. Keep the test result as evidence.
- Roll back cleanly: rules live in source control; revert the commit rather than editing in the SIEM console.
Detection and measurement
| Metric | What good looks like |
|---|---|
| Accounts, subscriptions and projects sending control plane logs to the SIEM | 100%, checked daily against the provider inventory |
| Core behaviours covered in every provider you run | All ten rows in the core set, with a passing test |
| Median time from event to alert for logging tampering | Under 15 minutes |
| Alert precision (true positives over all alerts) per rule | Tracked monthly; rules below an agreed threshold are tuned or retired |
| Share of events with a resolved identity owner | Above 95% for privileged operations |
| Rules with a test executed in the last 90 days | 100% |
Where identity fits
Almost every row in the core set is an identity event: credential creation, role grant, trust change or use of a stolen session. Workload identities produce most of the volume and most of the abuse, because their credentials are long-lived and their behaviour is predictable enough to baseline. Use that predictability: a service account or role that normally calls ten APIs from one network should alert the first time it calls an eleventh from another. See the Cloud Workload Identity Guide.
Common failure patterns
- Collecting logs nobody queries: the organisation trail exists but no rule fires on
StopLoggingor on a deleted diagnostic setting. - Missing Data Access logs: Google Cloud impersonation (
GenerateAccessToken) and many Azure data plane reads are invisible unless explicitly enabled, so sequence rules break. - Allow-listing whole roles: exempting an automation role entirely means an attacker who steals it is exempt too. Scope exceptions to the specific operations and sources.
- Azure activity seen only through the Activity Log: data plane abuse such as Key Vault secret reads and storage key listing needs resource logs. In the Storm-2949 Azure attack, the attacker changed Key Vault access settings, read secrets, wrote SQL firewall rules and called
listKeyson storage accounts: each step was a control plane or resource log event a rule could have caught. - Credential use outside the cloud not detected: instance role credentials used from external addresses, as in the Capital One breach of 2019, are exactly what GuardDuty's credential exfiltration findings now target. Make sure those findings page someone.
- No retest after schema changes: a SIEM parser update renames a field and half the rules silently stop matching.
Framework mapping
| Framework | Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev. 5 | AU-2 Event Logging; AU-6 Audit Record Review, Analysis, and Reporting; AU-12 Audit Record Generation; SI-4 System Monitoring | Log generation, analysis and monitoring |
| NIST CSF 2.0 | DE.CM-03; DE.CM-09; DE.AE-02; DE.AE-03; DE.AE-06 | Monitoring personnel and technology use, correlation, sharing adverse event information |
| CIS Controls v8.1 | Control 8 Audit Log Management; Control 13 Network Monitoring and Defense | Collection, review and alerting |
| ISO/IEC 27001:2022 Annex A | 8.15 Logging; 8.16 Monitoring activities | Logging and monitoring for anomalous behaviour |
| Microsoft cloud security benchmark | Logging and threat detection (LT) domain | Azure-focused baseline for threat detection and log collection |
| MITRE ATT&CK v20 | TA0112 Defense Impairment; T1685.002; T1098.001; T1098.003; T1537; T1666 | Technique coverage tracking |
Practitioner checklist
- Confirm organisation-wide collection: AWS organisation trail, Azure diagnostic settings on every subscription, Google aggregated sink.
- Enable the Data Access and resource logs your sequence rules depend on, starting with IAM, Key Vault and storage.
- Build an identity enrichment table with type, owner and expected networks for every privileged principal.
- Deploy the logging tampering rules first, at high severity, in every provider.
- Implement the remaining core behaviours and record the event names and version checked for each.
- Correlate native findings from GuardDuty, Defender for Cloud and Event Threat Detection with your own rules.
- Keep rules in source control in a portable format with a test per rule.
- Review precision and coverage metrics monthly and retire rules that never fire and have no test.
Standards and references
- AWS: CloudTrail userIdentity element
- AWS: GuardDuty IAM finding types
- Microsoft Learn: Azure Activity Log event schema
- Google Cloud: Cloud Audit Logs overview
- Google Cloud: Examples of audit logs for service accounts
- Google Cloud: Event Threat Detection overview
- SigmaHQ: Sigma detection rules (rules/cloud)
- MITRE ATT&CK: Defense Impairment
Related NHI Mgmt Group resources: Cloud Logging and Audit Trail Guide · Detection Engineering Guide · AWS CloudTrail Guide · Detection Engineering for Non-Human Identities Guide