Cloud API abuse (MITRE ATT&CK T1059.009) is an Execution technique. MITRE lists the platforms as IaaS, Identity Provider, Office Suite and SaaS.
Cloud APIs offer feature-rich, programmatic access to nearly every aspect of a tenant. That covers compute, storage, identity and access management (IAM), networking and security policies. People reach these APIs in several ways: command line interpreters, in-browser cloud shells, PowerShell modules such as Azure for PowerShell, and software development kits for languages such as Python.
The same convenience that makes automation easy makes the API a powerful execution surface for anyone who holds valid credentials.
How attackers use it
MITRE explains that with the right permissions, often obtained through credentials such as an application access token or a web session cookie, an adversary can call cloud APIs to invoke functions that carry out malicious actions.
CLI and PowerShell functionality may run from binaries installed on cloud-hosted or on-premises hosts, or from the browser-based cloud shells that AWS, Azure and GCP offer. These shells are typically a packaged environment with CLI or scripting modules, hosted as a container in the cloud.
The important point for defenders: nothing here needs malware on a laptop. A stolen token and an API client are enough, and the actions look like normal administration at the log level.
How to detect it
MITRE's detection strategy focuses on API calls and the context around them. Look for:
- Anomalous API calls for command execution, resource control or reconnaissance.
- CLI, SDK or scripting language use with stolen credentials, or from in-browser cloud shells.
- Authentication context shifts followed by privileged action, such as a stolen token being used for something its owner never does.
- Cross-service effects, where one identity touches compute, storage and IAM in a short window.
The data you need is the provider's control plane audit log (for example, CloudTrail on AWS, the Azure activity and sign-in logs, or Google Cloud audit logs), plus identity provider sign-in records. Baseline who normally calls which APIs, from where, and with which client or user agent. Then alert on the gaps.
How to reduce the risk
MITRE lists two mitigations:
- Privileged account management. Use proper IAM with role-based access control (RBAC) policies to limit what administrators can do, and to keep a history of administrative actions that helps detect abuse.
- Execution prevention. Use application control where appropriate to block PowerShell cmdlets or other host-based resources from reaching cloud API resources.
In plain steps: give each identity only the permissions it needs, prefer short-lived credentials to long-lived keys, protect session tokens like passwords, and keep audit logging on and shipped somewhere separate from the account it describes.
Try it yourself
Click through it at your own pace, or open it full screen.
Check your own environment
# AWS CLI: the 20 most recent control plane events in this account and Region (read only)
aws cloudtrail lookup-events --max-results 20
# Azure CLI: groups the signed-in user belongs to (read only)
az ad signed-in-user list-owned-objects --query "[].displayName"
Then work through this list:
- Is control plane audit logging on in every account and subscription?
- Who can open a cloud shell, and is that access needed?
- Which identities hold long-lived access keys?
- Can you answer "which API calls did this token make last week" in under an hour?
Quick check
Why can cloud API abuse happen without any malware on an endpoint?
The adversary only needs credentials, such as an application access token or web session cookie, and any API client or cloud shell.
Which two mitigations does MITRE list?
Privileged account management (IAM with RBAC) and execution prevention (application control to block host-based tools from reaching cloud APIs).