MITRE ATT&CKtechnique
T1648 Serverless Execution
- Domain
- enterprise
- Tactics
- Execution
- Platforms
- SaaS, IaaS, Office Suite
- Version
- 1.2
- Created
- 2022-05-27
Description
Adversaries may abuse serverless computing, integration, and automation services to execute arbitrary code in cloud environments. Many cloud providers offer a variety of serverless resources, including compute engines, application integration services, and web servers.
Adversaries may abuse these resources in various ways as a means of executing arbitrary commands. For example, adversaries may use serverless functions to execute malicious code, such as crypto-mining malware (i.e. Resource Hijacking). Adversaries may also create functions that enable further compromise of the cloud environment. For example, an adversary may use the `IAM:PassRole` permission in AWS or the `iam.serviceAccounts.actAs` permission in Google Cloud to add Additional Cloud Roles to a serverless cloud function, which may then be able to perform actions the original user cannot.
Serverless functions can also be invoked in response to cloud events (i.e. Event Triggered Execution), potentially enabling persistent execution over time. For example, in AWS environments, an adversary may create a Lambda function that automatically adds Additional Cloud Credentials to a user and a corresponding CloudWatch events rule that invokes that function whenever a new user is created. This is also possible in many cloud-based office application suites. For example, in Microsoft 365 environments, an adversary may create a Power Automate workflow that forwards all emails a user receives or creates anonymous sharing links whenever a user is granted access to a document in SharePoint. In Google Workspace environments, they may instead create an Apps Script that exfiltrates a user's data when they open a file.
Related
Tactic · MITRE ATT&CK (1)
- TA0002 Execution tactic
Referenced by MITRE ATT&CK · mitigates (2)
Referenced by MITRE ATT&CK · uses (1)
- S1091 Pacu software (tool)
Referenced by Compliance · mitigates (9)
- CIS-6.8 Define and Maintain Role-Based Access Control CIS Safeguard v8.1
- NIST-AC-2 Account Management NIST 800-53 control
- NIST-AC-3 Access Enforcement NIST 800-53 control
- NIST-AC-6 Least Privilege NIST 800-53 control
- NIST-CM-6 Configuration Settings NIST 800-53 control
- NIST-CM-7 Least Functionality NIST 800-53 control
- NIST-IA-2 Identification and Authentication (Organizational Users) NIST 800-53 control
- NIST-SC-7 Boundary Protection NIST 800-53 control
- NIST-SI-4 System Monitoring NIST 800-53 control
References
- https://www.microsoft.com/security/blog/2020/03/09/real-life-cybercrime-stories-dart-microsoft-detection-and-response-team Microsoft DART Case Report 001
- https://medium.com/daniel-grzelak/backdooring-an-aws-account-da007d36f8f9 Backdooring an AWS account
- https://www.varonis.com/blog/power-automate-data-exfiltration Varonis Power Automate Data Exfiltration
- https://cloud.hacktricks.xyz/pentesting-cloud/workspace-security/gws-google-platforms-phishing/gws-app-scripts Cloud Hack Tricks GWS Apps Script
- https://www.own.security/ressources/blog/google-workspace-malicious-app-script-analysis OWN-CERT Google App Script 2024
- https://www.cadosecurity.com/cado-discovers-denonia-the-first-malware-specifically-targeting-lambda/ Cado Security Denonia
- https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation/ Rhino Security Labs AWS Privilege Escalation
- https://rhinosecuritylabs.com/gcp/privilege-escalation-google-cloud-platform-part-1/ Rhingo Security Labs GCP Privilege Escalation