Individual skill
detecting-serverless-function-injection
Detects and prevents code injection attacks targeting serverless functions (AWS Lambda, Azure Functions, Google Cloud Functions) through event source poisoning, malicious layer injection, runtime command execution, and IAM privilege escalation via function modification. The analyst combines static analysis of function code, CloudTrail event correlation, runtime behavior monitoring, and IAM policy auditing to identify injection vectors across the expanded serverless attack surface including API Gateway, S3, SQS, DynamoDB Streams, and CloudWatch event triggers. Activates for requests involving Lambda security assessment, serverless injection detection, function event poisoning analysis, or serverless privilege escalation investigation.
skills/detecting-serverless-function-injection/SKILL.md
Source commit 54a798831d2266a3ca61ce68a7acb80b81160d57
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Network or broad shell
- Last checked
- Nov 9, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 35,878
- Repository last updated
- Aug 31, 2026
- License
- Apache-2.0
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- ai-agents Repository topic
- claude-code Repository topic
- cybersecurity Repository topic
- incident-response Repository topic
- mitre-attack Repository topic
- penetration-testing Repository topic
- red-team Repository topic
- security Repository topic
- cloud-security Repository topic
- malware-analysis Repository topic
- serverless-security Declared skill tag
- lambda-injection Declared skill tag
- event-source-poisoning Declared skill tag
- owasp-serverless Declared skill tag
- iam-escalation Declared skill tag
- cloudtrail Declared skill tag
- security Derived category
- security-application Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
LICENSEasset · 11,255 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesSKILL.mdcore · 25,164 bytesreferences/api-reference.mddoc · 5,121 bytesscripts/agent.pyruns · 26,531 bytes
Read excerpt
# Detecting Serverless Function Injection
## When to Use
- Auditing Lambda/Cloud Functions for code injection vulnerabilities where unsanitized event data flows into dangerous runtime functions (`eval`, `exec`, `child_process.exec`, `os.system`)
- Investigating incidents where an attacker modified function code or layers to establish persistence or exfiltrate data from the serverless environment
- Detecting privilege escalation paths where an adversary with `lambda:UpdateFunctionCode` and `iam:PassRole` can assume higher-privilege execution roles
- Analyzing event source poisoning attacks where malicious payloads are injected through S3 object uploads, SQS messages, DynamoDB stream records, or API Gateway requests that trigger function execution
- Building detection rules for SOC teams monitoring serverless workloads for unauthorized function modifications, layer additions, and suspicious invocation patterns
**Do not use** for load testing or denial-of-service simulation against serverless functions, for testing against production functions processing live customer data without explicit authorization, or for modifying IAM policies in shared accounts without change management approval.
## Prerequisites
- AWS account access with read permissions for Lambda, CloudTrail, IAM, CloudWatch Logs, and EventBridge