Skip to content

Modify Lambda Function Code (aws)

PlatformAuthorLast Update
awsNick Jones2024-12-02

An attacker may attempt to modify the code that a lambda function executes in order to gain a foothold in the environment

MITRE IDs

Required Permissions

  • lambda:UpdateFunctionCode

Required Parameters

NameTypeDescriptionExample Value
functionnamestrName of the function to be targetedexample-function
zipfilestrFilename of the zip file of code to be uploadedfile.zip

Attacker Action

Terminal window
aws lambda update-function-code --function-name example-function --zip-file file.zip --publish

Detection Case

ELK query

When logs are ingested into ELK, the following Lucene query can be used to identify relevant events.

eventName:None AND eventSource:None

Sigma Definition

---
title: Modify Lambda Function Code
id: 7890b11c-19b3-4fb9-bbec-cae87db769ca
status: experimental
author: Nick Jones
date: 2024-12-02
description: An attacker may attempt to modify the code that a lambda function executes in order to gain a foothold in the environment
logsource:
service: cloudtrail
detection:
selection_source:
- eventSource: "None"
events:
- eventName: "None"
condition: selection_source and events
level: low
tags:
- attack.T1059