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,…
Complete technique 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).[Cado Security Denonia] 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.[Rhino Security Labs AWS Privilege Escalation][Rhingo Security Labs GCP Privilege Escalation]
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.[Backdooring an AWS account] 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.[Varonis Power Automate Data Exfiltration][Microsoft DART Case Report 001] In Google Workspace environments, they may instead create an Apps Script that exfiltrates a user's data when they open a file.[Cloud Hack Tricks GWS Apps Script][OWN-CERT Google App Script 2024]
These contracts are selected through exact technique-to-data-component relationships or explicitly labelled planning overrides. Configure a collector at the relevant observation point; a telemetry name alone is not coverage.
Application Log Content · source-mapped
DC0038 collection page — Select the application event family required by the detection and document its native schema before normalization.
Providers and collection configuration
Application audit logs: First-party service events and request/result fields; schema is application-specific.
Enable the application audit category or instrument the owned lab application at the authorization/action boundary.
Define a schema with timestamp, service, actor, object, action, result and correlation ID. Export structured records through an authenticated collector.
Redact secrets and personal content, separate audit from debug logs, set retention and verify delivery during rotation/restart.
Project-normalized synthetic JSON, not a native provider log, captured event, attack verdict or validated detection. A parser/adapter is required for a real SIEM. Example names, IPs and values are fictional.
Visibility limits: Debug output is not necessarily a durable audit trail. Application developers must emit the relevant event; installing a log pipeline does not make an absent event exist.
Cloud Service Modification · source-mapped
DC0069 collection page — Collect the service-specific update API and resulting configuration state; record account/project, actor and changed settings.
Providers and collection configuration
AWS CloudTrail: Management-plane API activity; supported resource/data events require separate selectors.
Google Cloud Audit Logs: Admin Activity and other categories; configure Data Access where required.
In the isolated account/project/subscription, route administrative audit logs to a protected destination with retention and access controls.
Select the relevant service, regions and read/write operations. Confirm whether the API below is a management or data event in the provider documentation.
Preserve actor/session, resource, request ID, service, operation, region and error details. Check delivery latency and avoid logging credentials or sensitive request bodies.
Project-normalized synthetic JSON, not a native provider log, captured event, attack verdict or validated detection. A parser/adapter is required for a real SIEM. Example names, IPs and values are fictional.
Visibility limits: AWS, Azure and Google expose different APIs and event schemas. An accepted API request does not prove the final resource state; join asynchronous outcomes and inventory.
Correlate creation or modification of serverless functions (e.g., AWS Lambda, GCP Cloud Functions, Azure Functions) with anomalous IAM role assignments or permissions escalation events. Detect subsequent executions of newly created functions that perform unexpected actions such as spawning outbound network connections, accessing sensitive resources, or creating additional credentials.
Platforms: IaaS.
Cloud Service Modification — AWS:CloudTrail; channel CreateFunction / UpdateFunctionConfiguration: Function creation, role assignment, or configuration change events.
Application Log Content — AWS:CloudTrail; channel InvokeFunction: Unexpected or repeated invocation of functions not tied to known workflows.
Monitor for creation of new Power Automate flows or equivalent automation scripts that trigger on user or file events. Detect anomalous actions performed by these automations, such as email forwarding, anonymous link creation, or unexpected API calls to external endpoints.
Platforms: Office Suite.
Cloud Service Modification — m365:unified; channel AddFlow / UpdateFlow: New automation or workflow creation events.
Application Log Content — m365:exchange; channel New-InboxRule: Automation that triggers abnormal forwarding or external link generation.
Track creation or update of SaaS automation scripts (e.g., Google Workspace Apps Script). Detect when these scripts are bound to user events such as file opens or account modifications, and correlate with subsequent abnormal API calls that exfiltrate or modify user data.
Platforms: SaaS.
Cloud Service Modification — saas:appsscript; channel Create / Update: Deployment of scripts with event-driven triggers.
Application Log Content — saas:googledrive; channel FileOpen / FileAccess: Event-driven script triggering on user file actions.
Source rule directory and observation requirements
No exact-tagged Sigma source rule was imported. This does not establish that the technique is undetectable; the MITRE guidance and collection requirements remain relevant.
Before treating a rule as coverage
Read the actual condition and logsource; identify attacker-side, victim-side or third-party visibility.
Map native sensor fields, parse times and identities, then compile for the selected backend.
Replay a behavior-positive case, a normal control, an authorized look-alike and a missing-telemetry case.
Record matches and misses with rule version and source events. No match is inconclusive when required telemetry is absent.
Anomaly-based detection
Unexpected serverless or cloud-workload invocation — T1648 Serverless Execution
Comparison unit
function, caller, and trigger.
Expected behavior
functions are invoked by known trigger and caller combinations with stable rates.
Deviation
new caller-trigger edge, burst, or invocation outside established temporal context.
Start from the exact analytic above. The collection-specific lenses below are analyst recommendations; they do not assert that an arbitrary statistical deviation detects this technique.
Application and service audit: Per application, client and route: request rate, rare actions, failure ratios and unusual state transitions. Version changes, retries, health probes and seasonal load need separate baselines.
Cloud control plane: Per account, role, region and API: rare actions, new role-resource relationships, enumeration bursts and configuration changes. Separate deployment automation and organization-level administrative activity.
Define an entity/peer group and feature; exclude the evaluation period from baseline training.
Use representative normal and maintenance activity. Do not invent a production threshold from a synthetic example.
Evaluate held-out behavior-positive and benign cases; measure false positives, misses and telemetry loss separately.
Keep abnormality separate from maliciousness. Correlate with the behavior-specific source evidence.
These are exact ATT&CK software-use relationships, including malware. They provide behavior context, not recommendations to download or execute malware. No safety or detector claim is inherited.
Atomic evidence: 1 compatible documented candidates. Live lab status: not run for these imported procedures.
Use disposable lab hosts and test accounts, explicit target allowlists, a clean snapshot, bounded egress and a restore plan. Review every candidate and dependency before any execution.
Lambda Function Hijack
Modify an existing Lambda function to execute arbitrary code.
region: AWS region to deploy the EC2 instance (type string; source default us-east-2)
Review the upstream command, dependencies and cleanup at the source link. Source defaults may refer to real infrastructure or destructive actions; they are not authorized targets. No automatic install, prerequisite download or command execution is provided.
2 prerequisite definitions:
The AWS PowerShell module must be installed.
Terraform must be installed.
Technique-specific experiment contract
Choose one procedure implementing T1648 Serverless Execution; identify the observable behavior in the source definition, not just its tactic.
Record exact target, tool/version, inputs, privileges, network limits and approval. Never run an imported default target automatically.
Enable the collection sources above and verify a benign baseline reaches the detector.
Run only the approved isolated scenario; capture native events and an independent behavior observable.
Evaluate the exact rule/model, restore the lab, and preserve configuration, event hashes, alerts, controls and misses.
This fixture exercises the listed collection fields. It does not reproduce Serverless Execution, label its example events as malicious, or measure detection effectiveness. Use the exact analytic and selected procedure to build an independently labelled behavior-positive dataset.
Not run in this browser. No network scan or attack command is executed by this control.
Validation status and remaining work
Source identity
Joined by exact technique/object IDs against hash-pinned sources.
Collection fixture
Available for offline schema exercises; not attack emulation.
Native telemetry / backend / real attack
Not validated for these imported procedures. Source fidelity and page tests cannot establish sensor or detector effectiveness.
Pinned MITRE STIX source · SHA-256 81113ba98afa2928f3dcff62022539f7ce30c315c32e14422f11ff95ce534352. Definition and procedure context are reproduced from this snapshot, not independently re-investigated incidents.
Curated research views reached through an exact source technique, a catalog model, or a reviewed collection reference. These are navigation associations, not claims of detector effectiveness or sensor equivalence.
Pinned research references. No browser attack runner or production-validated detector is asserted. Imported procedures remain unvalidated; any bounded lab evidence has its own scope. ATT&CK / Atomic provenance · Detection provenance.