Cloud Threat Detection: Control Plane Changes Worth an Alert
Most cloud breaches leave a trail in the control plane before they leave one in the data. Someone detaches a guardrail policy, loosens a role trust, stops a trail or turns off backups. Each of those is a single API call, and each is recorded in CloudTrail, Cloud Audit Logs or the Azure Activity Log within minutes.
The hard part of cloud threat detection is not collecting those logs. It is deciding which of the millions of write calls deserve a human, and keeping that list sharp when your own automation makes the same calls every day. Alert on too much and the queue gets muted. Alert on too little and the first sign of an attack sits unread in a bucket.
This post lays out the control plane changes we think deserve an alert on AWS, Google Cloud and Azure, why each one matters, and how to carve out known automation without blinding the rule.
What cloud threat detection should watch in the control plane
Posture scanning tells you what is wrong right now. Event detection tells you what just changed and who changed it. You need both, and they answer different questions. A posture check finds a public bucket at the next evaluation. An event rule tells you that a specific principal, from a specific IP, made the bucket public four minutes ago, along with what else that session did.
The events worth a human fall into a handful of families. They share one property: an attacker needs them, and a well-run team rarely does them by hand.
- Guardrail removal. Organization policies, logging and security services are switched off or detached.
- Identity and trust weakening. A role becomes assumable by more principals than intended, or a new long-lived credential appears.
- Ransomware precursors. Recovery options are removed before data is encrypted or deleted.
- Network and data exposure. A resource that was private becomes reachable from the internet or from anonymous callers.
- Execution footholds. Changes that let someone run code on a machine at boot or on demand.
Guardrail removal: the change that hides every other change
If an attacker can turn off your logging or your preventive controls, everything after that is harder to see or stop. These deserve the highest severity you have.
Organization guardrail policies
On AWS, service control policies and resource control policies set the ceiling for every account in an organization. Detaching one from an account or organizational unit lifts that ceiling for everything below it. Disabling the policy type for the organization detaches every policy at once. The CloudTrail calls to watch are organizations:DetachPolicy and organizations:DisablePolicyType, along with LeaveOrganization, which takes an account out from under the organization's controls entirely.
Audit logging stopped or weakened
Stopping or deleting a trail is loud: StopLogging and DeleteTrail. Weakening one is quieter and just as useful to an attacker. An UpdateTrail or PutEventSelectors call can drop log file validation, KMS encryption, multi-region coverage or management events while the trail still reports as logging. The Google Cloud equivalent is a log sink deleted or disabled, or Data Access audit logging removed from an IAM policy. On Azure, watch for a diagnostic setting or legacy log profile being deleted.
Security services turned off
GuardDuty, Security Hub, Config, Access Analyzer, Macie, Inspector and Detective each have their own disable or delete calls. On Azure, a Microsoft Defender for Cloud plan dropped to the free tier is the same move. None of these should happen outside a planned change.
Identity and trust changes that widen who can get in
Identity is the perimeter in the cloud, and the most dangerous identity changes are often edits to trust, not new users.
- OIDC trust without a subject condition. A role that trusts a CI provider's OIDC tokens without a condition on the token subject can be assumed by any identity that provider issues tokens to. With GitHub Actions, that can mean any workflow in any repository, not just yours. The call is
UpdateAssumeRolePolicyorCreateRolewith a trust policy missing thesubcondition. On Google Cloud, a Workload Identity Federation provider created with no attribute condition has the same effect. - Outside accounts without an external ID. A trust policy that lets a third-party account assume a role without an
sts:ExternalIdcondition opens the classic confused deputy problem. - Credentials created for someone else.
CreateAccessKeyorCreateLoginProfilewhere the target user is not the caller is a common persistence step. Legitimate admins do it, but rarely, and it is worth a look every time. - Password policy weakened or deleted.
DeleteAccountPasswordPolicy, or anUpdateAccountPasswordPolicythat shortens length or reuse prevention. - Broad privileged grants. Owner or Contributor at subscription scope on Azure, owner or editor at project or organization scope on Google Cloud, and administrator-level IAM policies attached on AWS.
Trust changes pair well with pipeline hygiene. If your CI systems assume cloud roles, the trust policy is part of your pipeline's attack surface. We cover that side in CI/CD security.
Ransomware precursors: recovery removed before the damage
Cloud ransomware rarely starts with encryption. It starts with making sure you cannot restore. Each of these is a small change on its own. Several in one session from one principal is a pattern you want to see immediately.
- Deletion protection turned off on a database, DynamoDB table, load balancer, CloudFormation stack or EC2 instance.
- Automated RDS backups disabled, or DynamoDB point-in-time recovery turned off.
- An AWS Backup vault or plan deleted, or a vault lock removed.
- S3 versioning suspended or MFA delete turned off with
PutBucketVersioning. - A lifecycle rule with no filter that expires every object in a bucket within days.
- A KMS key disabled or scheduled for deletion with
ScheduleKeyDeletion.
Teardown pipelines and sandbox cleanups make several of these calls legitimately. That is exactly where exceptions earn their keep, and it is why turning the rule off is the wrong answer.
Network and data exposure
Exposure events are the most familiar category and the noisiest if you write them naively. The useful versions are specific:
- Security group or firewall ingress opened to
0.0.0.0/0or::/0on a port other than 80 or 443. Watch edits to existing rules as well as new ones, sinceModifySecurityGroupRulescan widen a rule without anAuthorizeSecurityGroupIngresscall. - Buckets, snapshots, AMIs and resource policies granted to any principal without a condition.
- Databases created or modified with public accessibility.
- On Azure, storage accounts, Key Vaults, SQL servers, Cosmos DB accounts and container registries that were closed to public networks and are now open, plus blob containers set to public access.
Execution footholds
Some changes give an attacker a way to run code without touching your deploy pipeline:
- On Google Cloud, an
ssh-keysentry or startup script added to instance or project metadata throughcompute.instances.setMetadataorcompute.projects.setCommonInstanceMetadata. Project metadata reaches every VM that does not block it, and startup scripts run as root on the next boot. - Serial port access enabled or OS Login turned off, which moves SSH from IAM back to keys.
- On Azure, Run Command on a VM, and AKS cluster admin credentials fetched with
listClusterAdminCredential. - An AKS cluster created with Kubernetes RBAC disabled.
How to handle known automation without going blind
Every rule above will match something legitimate in a real environment. Your deploy role opens a port on a new environment. Your teardown pipeline turns off deletion protection before it destroys a stack. Your identity team creates access keys for a break-glass user. The temptation is to turn the rule off. Do not.
A good exception is narrow. It names one rule, a specific principal, a specific scope, and ideally an expiry. Everything else that matches the rule still raises an event. A useful test before you save one: if an attacker compromised a different role and made the same call, would the exception hide it? If yes, it is too broad.
Here is the shape of an exception for a teardown pipeline on the deletion protection rule:
- Rule: Deletion protection turned off
- Name: Nightly sandbox teardown
- Reason: The teardown pipeline disables protection before it destroys sandbox stacks.
- Allow activity where:
Principal is any of arn:aws:sts::111122223333:assumed-role/sandbox-teardown/*ANDAccount is any of 111122223333 - Expires: the end of the quarter, so someone reviews it
The same principal turning off deletion protection in a production account still raises an event. So does any other principal in the sandbox account. That is the property you want.
Preview before you commit
The second discipline is to check an exception against history before it goes live. If an exception would have suppressed every match of a rule in the last month, you have effectively disabled the rule. If it would have suppressed only the pipeline's matches, it is doing its job.
Close the loop between events and posture
An event tells you something changed. It does not tell you whether the resource is now misconfigured. That is the job of posture checks, and the two work best together. When an event shows a resource changed, the checks for that resource should run again soon, not at the next daily scan. Otherwise you get a suspicious event with no answer to the obvious follow-up: is it still exposed?
For the posture side of the picture, see our earlier post on cloud security from prompt to production.
How Heeler does cloud threat detection
Heeler's Cloud Events page shows write activity from connected cloud accounts: CloudTrail for AWS, Cloud Audit Logs for Google Cloud and the Activity Log for Azure. Each suspicious event is a write that matched at least one detection rule, either a Heeler-managed rule or a custom rule your organization writes.
- Managed rules cover the families above. They include organization guardrail policies detached or disabled, audit logging stopped or weakened, roles that trust an OIDC provider without a subject condition or an outside account without an external ID, access keys created for another user, a weakened or deleted password policy, and ransomware precursors such as deletion protection turned off, backups disabled and S3 versioning suspended. Google Cloud rules cover workload identity providers without an attribute condition, SSH keys and startup scripts in metadata, and serial port and OS Login changes. Azure rules cover storage, Key Vault, database and registry network exposure, public blob containers, AKS without RBAC and AKS admin credential fetches.
- The event drawer gives context. It shows the principal, origin country and IP, whether an AWS session used MFA, why the event was flagged, the caller's other writes ten minutes either side, posture checks the resource fails, and the request parameters.
- Exceptions instead of off switches. An Administrator can add an exception to a managed or custom rule, with conditions on fields such as principal, account, region, origin IP and request parameters, plus an optional expiry. The dialog previews how many of the rule's matches in the last 30 days the exception would have suppressed. Each exception records its hit count and when it was last hit.
- Custom rules with a backtest. The rule builder runs a draft rule against the last seven days of stored writes and shows sample matches before you save.
- Events re-run posture checks on AWS. With AWS event collection on, Heeler records each resource an event changed and re-runs that resource's cloud checks every five minutes, so a finding opens or is fixed within about 15 minutes of the change.
Some events also feed Toxic Combinations: a security group opened to the internet, a database made publicly accessible and a service account key created count toward its event patterns. Heeler's newest AWS checks map to SOC 2, NIST CSF 2.0 and ISO/IEC 27001:2022, which helps when an auditor asks how you watch for control changes. More on that in compliance.
What to do this quarter
- Confirm you have an organization-wide, multi-region trail with management events on AWS, an organization log sink on Google Cloud, and Activity Log access on every Azure subscription. Detection cannot start without the logs.
- Pick the guardrail removal events first and set them to your highest severity. They are rare and almost never benign.
- Audit every role trust policy for OIDC providers without a subject condition and outside accounts without an external ID, then alert on new ones.
- List your teardown, deploy and break-glass principals. Write one narrow exception per rule per principal, scoped by account, with an expiry.
- Check each exception against the last month of matches before you save it.
- Make sure a changed resource triggers a fresh posture check, not just an event.
- Review rule match counts monthly. A rule that never matches may be fine. A rule that matches hundreds of times a week needs a better exception, not a mute.
The goal is fewer, sharper signals that a person reads and acts on. That is the same principle behind autonomous operations: let the system handle the expected so people spend time on the unexpected.
FAQ
What is cloud threat detection?
Cloud threat detection is watching cloud audit logs for changes that signal an attack, such as disabled logging, weakened trust policies or removed backups. It complements posture scanning, which reports the current state, by telling you what changed, who changed it and when.
Which CloudTrail events should always raise an alert?
Events that remove guardrails should always raise an alert. That includes StopLogging, DeleteTrail, organizations:DetachPolicy, organizations:DisablePolicyType, LeaveOrganization and any write made with root credentials.
How do I stop my own automation from triggering alerts?
Add a narrow exception rather than turning the rule off. Scope it to one rule, one principal and one account, give it an expiry, and check it against recent matches so you know it suppresses only the automation.
Why watch trust policy changes instead of new users?
A loosened trust policy can let a large set of outside identities assume a role with one edit. A role that trusts an OIDC provider without a subject condition, or an outside account without an external ID, is a wider door than any single new user.
Does event detection replace posture scanning?
No, they answer different questions. Events show what changed and who did it. Posture checks show whether the resource is misconfigured now. The best setup re-runs a resource's checks shortly after an event changes it.
Heeler flags risky control plane changes across AWS, Google Cloud and Azure, lets you carve out known automation with previewed, expiring exceptions, and re-checks AWS posture minutes after a resource changes. See it on your own accounts. Get a demo


.jpg)
