mirror of
https://github.com/splunk/security_content
synced 2026-06-08 17:32:49 +00:00
11c909f725
* Add YAML formatting and validation infrastructure - Add yamlfmt configuration (.yamlfmt) with 4-space indent, LF line endings - Add yamllint configuration (.yamllint) for syntax validation (detections/ only) - Add pre-commit hook for automatic YAML formatting - Add CI validation script with unified error output - Add GitHub Actions workflow for PR validation - Add documentation for setup and usage - Support custom yamlfmt binary path via --yamlfmt-path flag * comment yaml check from pre-commit * apply yamlfmt * Update yaml-validation.yml * Update yaml-validation.yml * application folder search formatting * cloud folder search formatting * web folder search formatting * network folder search formatting * endpoint folder search formatting * resolve first conflict * apply formatting * remove additional pipe * Update README.md * update versions * restore and update formatting (#3920) --------- Co-authored-by: Bhavin Patel <bhavin.j.patel91@gmail.com>
43 lines
2.2 KiB
YAML
43 lines
2.2 KiB
YAML
name: AWS Lambda UpdateFunctionCode
|
|
id: 211b80d3-6340-4345-11ad-212bf3d0d111
|
|
version: 8
|
|
date: '2026-02-25'
|
|
author: Bhavin Patel, Splunk
|
|
status: production
|
|
type: Hunting
|
|
description: The following analytic identifies IAM users attempting to update or modify AWS Lambda code via the AWS CLI. It leverages CloudTrail logs to detect successful `UpdateFunctionCode` events initiated by IAM users. This activity is significant as it may indicate an attempt to gain persistence, further access, or plant backdoors within your AWS environment. If confirmed malicious, an attacker could upload and execute malicious code automatically when the Lambda function is triggered, potentially compromising the integrity and security of your AWS infrastructure.
|
|
data_source:
|
|
- AWS CloudTrail
|
|
search: |-
|
|
`cloudtrail` eventSource=lambda.amazonaws.com eventName=UpdateFunctionCode* errorCode = success user_type=IAMUser
|
|
| rename user_name as user
|
|
| stats count min(_time) as firstTime max(_time) as lastTime
|
|
BY signature dest user
|
|
user_agent src vendor_account
|
|
vendor_region vendor_product
|
|
| `security_content_ctime(firstTime)`
|
|
| `security_content_ctime(lastTime)`
|
|
| `aws_lambda_updatefunctioncode_filter`
|
|
how_to_implement: You must install Splunk AWS Add on and enable Cloudtrail logs in your AWS Environment.
|
|
known_false_positives: While this search has no known false positives, it is possible that an AWS admin or an autorized IAM user has updated the lambda fuction code legitimately.
|
|
references:
|
|
- http://detectioninthe.cloud/execution/modify_lambda_function_code/
|
|
- https://sysdig.com/blog/exploit-mitigate-aws-lambdas-mitre/
|
|
tags:
|
|
analytic_story:
|
|
- Suspicious Cloud User Activities
|
|
asset_type: AWS Account
|
|
mitre_attack_id:
|
|
- T1204
|
|
product:
|
|
- Splunk Enterprise
|
|
- Splunk Enterprise Security
|
|
- Splunk Cloud
|
|
security_domain: threat
|
|
tests:
|
|
- name: True Positive Test
|
|
attack_data:
|
|
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1204/aws_updatelambdafunctioncode/aws_cloudtrail_events.json
|
|
sourcetype: aws:cloudtrail
|
|
source: aws_cloudtrail
|