{
  "technique_id": "T1648",
  "name": "Serverless Execution",
  "priority": "medium",
  "status": "draft",
  "version": "0.1.0",
  "last_reviewed": "2026-07-23",
  "generated_by": "SOC Response Atlas by Basyrix",
  "tactics": [
    "Execution"
  ],
  "platforms": [
    "SaaS",
    "IaaS",
    "Office Suite"
  ],
  "summary": "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...",
  "soc_recommendation": "Investigate Serverless Execution activity in the context of Execution: confirm scope, affected host/identity, and whether it matches expected administrative behaviour before deciding this is benign.",
  "d3fend_mappings": [
    {
      "id": "D3-NTA",
      "name": "Network Traffic Analysis",
      "relationship": "detect",
      "practical_action": "Monitor for Network Traffic Analysis indicators relevant to this technique.",
      "tooling": [
        "Sentinel",
        "Defender for Endpoint"
      ]
    }
  ],
  "investigation_steps": {
    "microsoft": [
      "Review Defender for Endpoint / Defender XDR alerts and timeline for the affected host or identity.",
      "Check Sentinel analytics rules and incidents correlated with this technique.",
      "Review Entra ID sign-in and audit logs if the technique involves an identity or cloud resource."
    ],
    "generic": [
      "Confirm whether the observed serverless execution activity matches expected administrative or application behaviour.",
      "Identify the host, account, or resource where the activity occurred and its business criticality.",
      "Check for related alerts before and after this activity to reconstruct the broader intrusion timeline.",
      "Real detection reference: \"AWS Lambda Function Invoked Cross-Account\" -- Identifies an AWS Lambda function invoked by a principal whose AWS account differs from the account that owns the function (a cross-account invocation). The caller's account is parsed from the invoking principal's ARN and compared to the function account..."
    ]
  },
  "evidence_to_collect": [
    "Host or resource affected",
    "Account or identity involved",
    "Timestamp of the activity",
    "Related process, file, or network artifact",
    "Any preceding or follow-on alerts"
  ],
  "response_actions": [
    {
      "name": "Contain the affected host or account",
      "category": "Containment",
      "risk": "Medium",
      "automation_safe": false,
      "approval_required": true,
      "tool": "Defender for Endpoint / Entra ID",
      "notes": "Requires approval -- confirm malicious intent before isolating a host or disabling an account."
    },
    {
      "name": "Collect and preserve evidence",
      "category": "Investigation",
      "risk": "Low",
      "automation_safe": true,
      "approval_required": false,
      "tool": "Defender for Endpoint",
      "notes": "Safe -- read-only evidence collection."
    }
  ],
  "queries": {
    "kql": [
      {
        "name": "Starting point for T1648",
        "description": "Generic starting query -- tune to the specific data source relevant to this technique.",
        "query": "DeviceEvents\n| where TimeGenerated > ago(24h)\n| where ActionType has \"<tune to T1648>\""
      }
    ],
    "spl": [],
    "esql": [
      {
        "name": "49002bbe-7aea-4146-91eb-b2b683bf5ed5 — AWS Lambda Function Invoked Cross-Account",
        "description": "(ESQL) Identifies an AWS Lambda function invoked by a principal whose AWS account differs from the account that owns the function (a cross-account invocation). The caller's account is parsed from the invoking principal's ARN and compared to the function account... (Source: Elastic's official detection-rules repository (Elastic License v2).)",
        "query": "from logs-aws.cloudtrail-*\n\n| where\n    event.provider == \"lambda.amazonaws.com\"\n    and event.action like \"Invoke*\"\n    and event.outcome == \"success\"\n    and aws.cloudtrail.user_identity.arn IS NOT NULL\n    and aws.cloudtrail.user_identity.invoked_by IS NULL\n    and aws.cloudtrail.request_parameters IS NOT NULL\n\n| grok aws.cloudtrail.user_identity.arn \"\"\":(?<Esql.caller_account>[0-9]{12}):\"\"\"\n| grok aws.cloudtrail.request_parameters \"\"\"functionName=arn:aws:lambda:[a-z0-9-]*:(?<Esql.function_account>[0-9]{12}):\"\"\"\n\n| where Esql.caller_account IS NOT NULL and Esql.function_account IS NOT NULL and Esql.caller_account != Esql.function_account\n\n| stats\n    Esql.invocation_count = count(*),\n    Esql.source_ips = values(source.ip),\n    Esql.function_arns = values(aws.cloudtrail.resources.arn)\n  by\n    aws.cloudtrail.user_identity.arn,\n    Esql.caller_account,\n    Esql.function_account\n\n| keep\n    aws.cloudtrail.user_identity.arn,\n    Esql.caller_account,\n    Esql.function_account,\n    Esql.function_arns,\n    Esql.invocation_count,\n    Esql.source_ips"
      },
      {
        "name": "fd01b949-81be-46d5-bcf8-284395d5f56d — GitHub App Deleted",
        "description": "(EQL) Detects the deletion of a GitHub app either from a repo or an organization. (Source: Elastic's official detection-rules repository (Elastic License v2).)",
        "query": "configuration where data_stream.dataset == \"github.audit\" and github.category == \"integration_installation\" and event.type == \"deletion\""
      }
    ]
  },
  "automation": {
    "safe": [
      "Add recommendation as Sentinel incident comment.",
      "Run enrichment queries.",
      "Create ServiceNow SecOps task."
    ],
    "approval_required": [
      "Contain or disable the affected host/account.",
      "Any change to production configuration."
    ]
  },
  "escalation_criteria": [
    "Serverless Execution activity observed on a privileged account or critical system.",
    "Activity follows or precedes other suspicious behaviour in the same investigation.",
    "Automated triage cannot confidently rule out malicious intent."
  ],
  "false_positive_considerations": [
    "Legitimate administrative or maintenance activity matching this pattern.",
    "Approved security testing or red team exercise.",
    "Known benign software producing similar telemetry."
  ],
  "confluence": {
    "title": "T1648 - Serverless Execution Response Guidance",
    "labels": [
      "mitre",
      "attack",
      "d3fend",
      "secops",
      "basyrix"
    ],
    "sections": [
      "summary",
      "d3fend_mappings",
      "investigation_steps",
      "response_actions",
      "queries",
      "automation",
      "escalation_criteria",
      "false_positive_considerations"
    ]
  }
}