Edge Computing Attack
Supplementary Files:
payloads.md — Attack payloads organized by edge platform: Cloudflare Workers (V8 isolate escape, KV abuse), Fastly Compute@Edge (WASM sandbox), AWS Lambda@Edge / CloudFront Functions, Akamai EdgeWorkers, Vercel Edge Functions, Deno Deploy
test-cases.md — 18 structured test cases covering reconnaissance, edge script injection, KV/Kvstore abuse, isolate escape attempts, request smuggling, and origin WAF bypass
guides/edge-computing-attack-playbook.md — End-to-end playbook with engagement scoping, lab setup (local Wrangler, Fastly CLI, SAM Local), attack workflows, and blue-team detection engineering
guides/real-world-incident-case-studies.md — Eight case studies including the 2024 Cloudflare Workers KV incident, AWS Lambda@Edge CVE-2023-XX pattern, Fastly WASM breakouts, and Deno Deploy SSRF waves
Summary
This skill targets edge computing — where code runs in geographically-distributed nodes close to end users, typically in V8 isolates (Cloudflare Workers), WASM sandboxes (Fastly Compute@Edge), or restricted JavaScript engines (AWS CloudFront Functions, Lambda@Edge). The attack surface differs from origin-side attacks: edge platforms handle TLS termination, request routing, and caching, and their security model assumes a trusted-but-curious operator with strong tenant isolation.
Tools: wrangler, fastly-cli, sam-cli (SAM Local), gcloud edge, akamai-cli, vercel-cli, deno, vitesspa, chromium-headless, burp suite, postman, curl, jq
Domain: edge-computing
MITRE ATT&CK: T1190 Exploit Public-Facing Application · T1552.007 Container and Cloud Instance Credentials API · T1059 Command and Scripting Interpreter
Description
Attacks against edge computing platforms — Cloudflare Workers (V8 isolate), Fastly Compute@Edge (WASM/Wasmtime), AWS Lambda@Edge and CloudFront Functions, Akamai EdgeWorkers, Vercel Edge Functions, and Deno Deploy.
Edge platforms share common architecture: code runs in isolates (V8) or sandboxes (WASM), often co-located with hundreds of other tenants on the same physical machine. The threat model assumes:
- Operator (CSP) is trusted to enforce isolation
- Other tenants are NOT trusted (cross-tenant attacks possible)
- Origin servers may be inaccessible directly (all traffic flows through edge)
- Edge scripts have access to KV stores, secrets, and request/response bodies
This skill is distinct from:
- cloud-security — which targets CSP control planes (IAM, EC2, S3) broadly
- container-security — which targets Linux namespaces and cgroups
- web-ssrf — which targets origin-side SSRF (edge-side SSRF has different rules)
- api-security — which targets REST/GraphQL endpoints, not edge routing
Where container-security asks "can I escape this container?", edge-computing-attack asks "given that my Worker shares a V8 isolate pool with 10,000 other tenants, how do I leak their secrets via shared state, KV race conditions, or isolate escape?"
Coverage includes:
- Cloudflare Workers: V8 isolate escape attempts, KV race conditions, Durable Objects abuse, Workers AI prompt injection, R2 storage abuse, Pages Functions injection
- Fastly Compute@Edge: WASM sandbox bypass, WASI host-call misuse, secret store leakage, edge KV abuse
- AWS Lambda@Edge / CloudFront Functions: token theft from env, origin WAF bypass via edge-managed headers, CloudFront function code injection
- Akamai EdgeWorkers: bypass of edge-based ARL parsing, Property Manager manipulation
- Vercel Edge Functions / Edge Config: env var leakage, Edge Config race conditions
- Deno Deploy: V8 isolate escape, KV store race conditions
- Universal edge patterns: cache poisoning, request smuggling (CL.TE / TE.CL via edge), TLS SNI manipulation, host header injection at edge, geographic DNS hijack prep
Use Cases
- Cloudflare Workers KV race condition — concurrent reads/writes to same key to leak tenant data
- Cloudflare Workers V8 isolate escape — exploit V8 bugs (or Workers-specific quirks) to break isolation
- Cloudflare Durable Objects abuse — single-threaded object state to leak cross-tenant data
- Cloudflare Workers AI prompt injection — indirect prompt injection via Worker to leak secrets
- Fastly Compute@Edge WASM escape — exploit Wasmtime bug to escape sandbox
- Fastly Secret Store leakage — read secrets via misconfigured token
- AWS Lambda@Edge env var leakage — exploit logging side channel
- AWS CloudFront Function code injection — inject JS into edge function
- Akamai EdgeWorkers bypass — bypass ARL-based access control
- Vercel Edge Config race — concurrent reads to expose other tenant's config
- Deno Deploy KV race — concurrent KV operations to leak data
- Origin WAF bypass via edge header manipulation — set
X-Forwarded-For to bypass IP-based rules
- Cache poisoning via edge — poison edge cache to serve malicious content to other users
- Request smuggling at edge — CL.TE via edge HTTP/2 → origin HTTP/1.1 boundary
Differentiation from Adjacent Skills
| Skill |
Target |
Boundary |
Typical entry |
cloud-security |
CSP control plane |
Cloud IAM |
IAM enumeration |
container-security |
OCI, K8s, containerd |
Linux namespace |
Container escape |
web-ssrf |
Origin application |
Origin network |
URL parameter |
api-security |
REST/GraphQL endpoints |
API gateway |
Injection |
edge-computing-attack (this) |
Edge isolate / sandbox |
V8 / WASM boundary |
Edge script exploit |
dns-attacks |
DNS protocol |
DNS resolver |
DNS hijack, cache poison |
cdn-cache-attack |
CDN cache |
Cache key |
Cache poison (overlaps) |
Core Tools
Cloudflare Workers
- wrangler — official Workers CLI; deploy, dev, KV, R2
- miniflare — local Workers emulator for testing
- cloudflare-api-cli — direct REST API access
- workers-typescript-template — boilerplate for TS Workers
Fastly Compute@Edge
- fastly-cli — official Compute@Edge CLI
- wasmtime — local WASM runtime for testing
- fastly-compute-starter — Rust/JS starter kits
AWS Lambda@Edge / CloudFront Functions
- aws-cli — Lambda and CloudFront API
- sam-cli — local SAM emulation for Lambda testing
- cloudfront-testing-tools — request-response replay
Akamai EdgeWorkers
- akamai-cli with edgeworkers plugin
- akamai-sandbox — local EdgeWorkers emulator
Vercel Edge
- vercel-cli — Vercel deployment CLI
- next.js edge runtime testing
Deno Deploy
- deno — Deno runtime
- deployctl — Deno Deploy CLI
Universal
- curl — edge protocol testing
- Burp Suite — request/response tampering
- Wireshark — packet capture (limited use; most edge is TLS)
- vitesspa — Vite + SPA testing harness
- chromium-headless — end-to-end browser testing
Methodology
Phase 1 — Reconnaissance
- Identify edge platform via HTTP headers (
Server: cloudflare, X-Fastly, X-Amz-Cf-Pop, X-Akamai-Transformed, X-Vercel-*)
- Identify edge functions in use (timing analysis, behavior fingerprinting)
- Map edge KV store usage (timing, error patterns)
- Identify origin WAF patterns (security headers)
- Map request routing (geo DNS, edge POPs)
Phase 2 — Edge Script Discovery
- Inspect client-side JS for
cf: / cdn-cgi/ indicators
- Use Wrangler dev mode for local Cloudflare Workers inspection (if authorized)
- Analyze edge function behavior via timing and error patterns
- Identify Worker bundling via DevTools / source maps (often enabled)
Phase 3 — Tenant Isolation Testing
- Deploy own Worker on same platform
- Test for shared isolate patterns (timing, leak)
- Test KV store race conditions
- Test Durable Object cross-tenant access
- Test Deno Deploy KV cross-tenant
Phase 4 — Edge Script Injection
- Inject malicious edge script (if edge function has injection vuln)
- Test edge function input validation (headers, query, body)
- Test edge function source map leakage
Phase 5 — Cache and Routing Attacks
- Cache poisoning via edge header manipulation
- Request smuggling at HTTP version boundary
- Geographic DNS hijack preparation
- Host header injection at edge
Phase 6 — Origin WAF Bypass
- Test edge header manipulation (
X-Forwarded-For, X-Real-IP)
- Test edge-based request rewriting
- Test edge script that adds headers trusted by origin
- Test CloudFront signed URL bypass
Phase 7 — Secret and Data Exfiltration
- Edge KV store exfiltration via race condition
- Edge logs containing secrets (Worker logs often include env vars)
- Workers AI prompt injection for secret leak
- Durable Objects state exfiltration
Phase 8 — Persistence
- Persistent edge Worker via compromised deploy token
- Persistent cache poisoning
- Persistent KV store pollution
- Persistent DNS hijack prep
Defense Perspective
Core Principles
- Edge is privileged — edge scripts see all traffic including TLS-terminated plaintext
- Tenant isolation is critical — KV, Durable Objects, Edge Config must enforce hard isolation
- Cache is shared state — cache poisoning affects other tenants
- Origin must NOT trust edge headers —
X-Forwarded-For etc. can be set by attacker
- Logs are sensitive — edge logs often contain secrets in headers/body
Hardening Checklist
Detection Engineering
- Edge function log anomaly detection (unexpected env var reads)
- KV store race condition detection (concurrent operations)
- Cache hit ratio anomaly (potential poisoning)
- Edge function cold start anomaly (potential injection)
- Edge-to-origin header consistency checks
Practical Steps
Cloudflare Workers Recon
# Identify Cloudflare
curl -sI https://target/ | grep -i server
# Server: cloudflare
# Identify edge POP
curl -sI https://target/ | grep -i cf-ray
# CF-RAY: 85abc123.def-LAX (LAX = Los Angeles POP)
# Detect Worker
curl -s https://target/cdn-cgi/trace
# Identifies colo, request source, etc.
# Worker source map leak (often enabled)
curl -s https://target/script.js.map
Cloudflare Workers KV Race
// Deploy own Worker with KV binding
// Race condition: read-write-read pattern
// Worker code:
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request));
});
async function handleRequest(request) {
const key = 'shared_key';
// Read value
const initial = await KV.get(key);
// Write attacker value
await KV.put(key, 'attacker_value');
// Read again quickly — may catch another tenant's write
const after = await KV.get(key);
return new Response(JSON.stringify({ initial, after }));
}
Fastly Compute@Edge Recon
# Identify Fastly
curl -sI https://target/ | grep -i "X-Fastly"
# X-Fastly: hit
# X-Served-By: cache-lax1234-LAX
# Detect Compute@Edge usage
curl -sI https://target/ | grep -i server
# Server: Fastly Compute
# WASM source map leak
curl -s https://target/.well-known/fastly/source
AWS Lambda@Edge Recon
# Identify CloudFront
curl -sI https://target/ | grep -i "X-Amz-Cf"
# X-Amz-Cf-Pop: LAX1-C1
# X-Amz-Cf-Id: ...
# Lambda@Edge logs in CloudWatch (us-east-1)
aws logs describe-log-groups \
--region us-east-1 \
--log-group-name-prefix "/aws/lambda/"
# CloudFront Function source
aws cloudfront list-functions
aws cloudfront describe-function --name REPLACE_WITH_YOUR_FUNCTION
Vercel Edge Recon
# Identify Vercel
curl -sI https://target/ | grep -i "X-Vercel"
# X-Vercel-Cache: HIT
# X-Vercel-Id: vercel-sfo1:abc-def
# Edge Config endpoint
curl -s https://target/_vercel/edge-config/_default
Detection Methods
CDN / Edge Function Logs
- Cloudflare Workers abuse: Anomalous Worker invocations; outbound fetch to attacker domains.
- AWS Lambda@Edge anomalies: Function duration spikes; cross-region data egress from edge.
- Origin IP discovery: Direct origin access bypassing CDN (signature: requests to origin IP from internet).
SIEM Detection Rules
- Splunk SPL:
index=cdn sourcetype=cloudflare:workers | stats count by script | sort -count | head 10
- Cloudflare Analytics: Native bot/security analytics.
- AWS CloudTrail: Lambda@Edge invocation logs; alert on cross-region data egress.
Defense Evasion Techniques
CDN Bypass
- Direct origin access: Find origin IP via DNS history, leak in HTTP headers, SSL cert; bypass CDN/WAF.
- Cache poisoning: Poison cached response; affect all users of cached resource.
- Cache deception: Trick CDN into caching dynamic content with sensitive data.
Edge Function Exploitation
- Worker script injection: Inject code into Worker via compromised account or supply chain.
- Lambda@Edge privilege abuse: Use Lambda@Edge for global execution; harder to attribute.
- Origin IP rotation: Use direct IP for exfil; CDN sees only legitimate traffic.
Cross-References
skills/cloud-security/SKILL.md — broader CSP control plane attacks
skills/container-security/SKILL.md — Linux container escapes
skills/web-ssrf/SKILL.md — origin-side SSRF (compare to edge-side)
skills/dns-attacks/SKILL.md — DNS attacks relevant to edge routing
skills/api-security/SKILL.md — API gateway attacks
skills/persistence-attacks/SKILL.md — edge-side persistence patterns
skills/cdn-cache-attack/SKILL.md — CDN-specific cache attacks
References
- Cloudflare — Workers Security Model (2024)
- Fastly — Compute@Edge Security Documentation (2024)
- AWS — Lambda@Edge Security Best Practices (2024)
- Akamai — EdgeWorkers Security Guide (2024)
- Vercel — Edge Functions and Edge Config Documentation (2024)
- Deno — Deno Deploy Threat Model (2024)
- Bishop Fox — Edge Computing Attack Vectors (2024 whitepaper)
- Black Hat USA — Cross-Tenant Attacks in Edge Platforms (2024)
- MITRE ATT&CK — T1190 Exploit Public-Facing Application, T1552.007 Container and Cloud Instance Credentials API
1---2name: edge-computing-attack3description: Attacks against edge computing platforms — Cloudflare Workers (V8 isolate), Fastly Compute@Edge (WASM/Wasmtime), AWS Lambda@Edge and CloudFront Functions, Akamai EdgeWorkers, Vercel Edge Functions, and Deno Deploy. Covers V8 isolate escape, WASM sandbox bypass, request smuggling at the edge, edge KV store abuse, secret leakage via edge logs, and bypass of origin WAF via edge script injection. Distinct from cloud-security (broader CSP control plane), container-security (Linux namespaces), and web-ssrf (origin-side issues).4---56# Edge Computing Attack78> **Supplementary Files**:9> - `payloads.md` — Attack payloads organized by edge platform: Cloudflare Workers (V8 isolate escape, KV abuse), Fastly Compute@Edge (WASM sandbox), AWS Lambda@Edge / CloudFront Functions, Akamai EdgeWorkers, Vercel Edge Functions, Deno Deploy10> - `test-cases.md` — 18 structured test cases covering reconnaissance, edge script injection, KV/Kvstore abuse, isolate escape attempts, request smuggling, and origin WAF bypass11> - `guides/edge-computing-attack-playbook.md` — End-to-end playbook with engagement scoping, lab setup (local Wrangler, Fastly CLI, SAM Local), attack workflows, and blue-team detection engineering12> - `guides/real-world-incident-case-studies.md` — Eight case studies including the 2024 Cloudflare Workers KV incident, AWS Lambda@Edge CVE-2023-XX pattern, Fastly WASM breakouts, and Deno Deploy SSRF waves1314## Summary1516This skill targets **edge computing** — where code runs in geographically-distributed nodes close to end users, typically in V8 isolates (Cloudflare Workers), WASM sandboxes (Fastly Compute@Edge), or restricted JavaScript engines (AWS CloudFront Functions, Lambda@Edge). The attack surface differs from origin-side attacks: edge platforms handle TLS termination, request routing, and caching, and their security model assumes a trusted-but-curious operator with strong tenant isolation.1718**Tools**: wrangler, fastly-cli, sam-cli (SAM Local), gcloud edge, akamai-cli, vercel-cli, deno, vitesspa, chromium-headless, burp suite, postman, curl, jq1920**Domain**: edge-computing2122**MITRE ATT&CK**: T1190 Exploit Public-Facing Application · T1552.007 Container and Cloud Instance Credentials API · T1059 Command and Scripting Interpreter2324## Description2526Attacks against edge computing platforms — Cloudflare Workers (V8 isolate), Fastly Compute@Edge (WASM/Wasmtime), AWS Lambda@Edge and CloudFront Functions, Akamai EdgeWorkers, Vercel Edge Functions, and Deno Deploy.2728Edge platforms share common architecture: code runs in **isolates** (V8) or **sandboxes** (WASM), often co-located with hundreds of other tenants on the same physical machine. The threat model assumes:29- Operator (CSP) is trusted to enforce isolation30- Other tenants are NOT trusted (cross-tenant attacks possible)31- Origin servers may be inaccessible directly (all traffic flows through edge)32- Edge scripts have access to KV stores, secrets, and request/response bodies3334This skill is distinct from:35- **cloud-security** — which targets CSP control planes (IAM, EC2, S3) broadly36- **container-security** — which targets Linux namespaces and cgroups37- **web-ssrf** — which targets origin-side SSRF (edge-side SSRF has different rules)38- **api-security** — which targets REST/GraphQL endpoints, not edge routing3940Where container-security asks "can I escape this container?", edge-computing-attack asks "given that my Worker shares a V8 isolate pool with 10,000 other tenants, how do I leak their secrets via shared state, KV race conditions, or isolate escape?"4142Coverage includes:43- **Cloudflare Workers**: V8 isolate escape attempts, KV race conditions, Durable Objects abuse, Workers AI prompt injection, R2 storage abuse, Pages Functions injection44- **Fastly Compute@Edge**: WASM sandbox bypass, WASI host-call misuse, secret store leakage, edge KV abuse45- **AWS Lambda@Edge / CloudFront Functions**: token theft from env, origin WAF bypass via edge-managed headers, CloudFront function code injection46- **Akamai EdgeWorkers**: bypass of edge-based ARL parsing, Property Manager manipulation47- **Vercel Edge Functions / Edge Config**: env var leakage, Edge Config race conditions48- **Deno Deploy**: V8 isolate escape, KV store race conditions49- **Universal edge patterns**: cache poisoning, request smuggling (CL.TE / TE.CL via edge), TLS SNI manipulation, host header injection at edge, geographic DNS hijack prep5051## Use Cases5253- **Cloudflare Workers KV race condition** — concurrent reads/writes to same key to leak tenant data54- **Cloudflare Workers V8 isolate escape** — exploit V8 bugs (or Workers-specific quirks) to break isolation55- **Cloudflare Durable Objects abuse** — single-threaded object state to leak cross-tenant data56- **Cloudflare Workers AI prompt injection** — indirect prompt injection via Worker to leak secrets57- **Fastly Compute@Edge WASM escape** — exploit Wasmtime bug to escape sandbox58- **Fastly Secret Store leakage** — read secrets via misconfigured token59- **AWS Lambda@Edge env var leakage** — exploit logging side channel60- **AWS CloudFront Function code injection** — inject JS into edge function61- **Akamai EdgeWorkers bypass** — bypass ARL-based access control62- **Vercel Edge Config race** — concurrent reads to expose other tenant's config63- **Deno Deploy KV race** — concurrent KV operations to leak data64- **Origin WAF bypass via edge header manipulation** — set `X-Forwarded-For` to bypass IP-based rules65- **Cache poisoning via edge** — poison edge cache to serve malicious content to other users66- **Request smuggling at edge** — CL.TE via edge HTTP/2 → origin HTTP/1.1 boundary6768## Differentiation from Adjacent Skills6970| Skill | Target | Boundary | Typical entry |71|---|---|---|---|72| `cloud-security` | CSP control plane | Cloud IAM | IAM enumeration |73| `container-security` | OCI, K8s, containerd | Linux namespace | Container escape |74| `web-ssrf` | Origin application | Origin network | URL parameter |75| `api-security` | REST/GraphQL endpoints | API gateway | Injection |76| `edge-computing-attack` (this) | Edge isolate / sandbox | V8 / WASM boundary | Edge script exploit |77| `dns-attacks` | DNS protocol | DNS resolver | DNS hijack, cache poison |78| `cdn-cache-attack` | CDN cache | Cache key | Cache poison (overlaps) |7980## Core Tools8182### Cloudflare Workers83- **wrangler** — official Workers CLI; deploy, dev, KV, R284- **miniflare** — local Workers emulator for testing85- **cloudflare-api-cli** — direct REST API access86- **workers-typescript-template** — boilerplate for TS Workers8788### Fastly Compute@Edge89- **fastly-cli** — official Compute@Edge CLI90- **wasmtime** — local WASM runtime for testing91- **fastly-compute-starter** — Rust/JS starter kits9293### AWS Lambda@Edge / CloudFront Functions94- **aws-cli** — Lambda and CloudFront API95- **sam-cli** — local SAM emulation for Lambda testing96- **cloudfront-testing-tools** — request-response replay9798### Akamai EdgeWorkers99- **akamai-cli** with edgeworkers plugin100- **akamai-sandbox** — local EdgeWorkers emulator101102### Vercel Edge103- **vercel-cli** — Vercel deployment CLI104- **next.js** edge runtime testing105106### Deno Deploy107- **deno** — Deno runtime108- **deployctl** — Deno Deploy CLI109110### Universal111- **curl** — edge protocol testing112- **Burp Suite** — request/response tampering113- **Wireshark** — packet capture (limited use; most edge is TLS)114- **vitesspa** — Vite + SPA testing harness115- **chromium-headless** — end-to-end browser testing116117## Methodology118119### Phase 1 — Reconnaissance120- Identify edge platform via HTTP headers (`Server: cloudflare`, `X-Fastly`, `X-Amz-Cf-Pop`, `X-Akamai-Transformed`, `X-Vercel-*`)121- Identify edge functions in use (timing analysis, behavior fingerprinting)122- Map edge KV store usage (timing, error patterns)123- Identify origin WAF patterns (security headers)124- Map request routing (geo DNS, edge POPs)125126### Phase 2 — Edge Script Discovery127- Inspect client-side JS for `cf:` / `cdn-cgi/` indicators128- Use Wrangler dev mode for local Cloudflare Workers inspection (if authorized)129- Analyze edge function behavior via timing and error patterns130- Identify Worker bundling via DevTools / source maps (often enabled)131132### Phase 3 — Tenant Isolation Testing133- Deploy own Worker on same platform134- Test for shared isolate patterns (timing, leak)135- Test KV store race conditions136- Test Durable Object cross-tenant access137- Test Deno Deploy KV cross-tenant138139### Phase 4 — Edge Script Injection140- Inject malicious edge script (if edge function has injection vuln)141- Test edge function input validation (headers, query, body)142- Test edge function source map leakage143144### Phase 5 — Cache and Routing Attacks145- Cache poisoning via edge header manipulation146- Request smuggling at HTTP version boundary147- Geographic DNS hijack preparation148- Host header injection at edge149150### Phase 6 — Origin WAF Bypass151- Test edge header manipulation (`X-Forwarded-For`, `X-Real-IP`)152- Test edge-based request rewriting153- Test edge script that adds headers trusted by origin154- Test CloudFront signed URL bypass155156### Phase 7 — Secret and Data Exfiltration157- Edge KV store exfiltration via race condition158- Edge logs containing secrets (Worker logs often include env vars)159- Workers AI prompt injection for secret leak160- Durable Objects state exfiltration161162### Phase 8 — Persistence163- Persistent edge Worker via compromised deploy token164- Persistent cache poisoning165- Persistent KV store pollution166- Persistent DNS hijack prep167168### Defense Perspective169170### Core Principles1711. **Edge is privileged** — edge scripts see all traffic including TLS-terminated plaintext1722. **Tenant isolation is critical** — KV, Durable Objects, Edge Config must enforce hard isolation1733. **Cache is shared state** — cache poisoning affects other tenants1744. **Origin must NOT trust edge headers** — `X-Forwarded-For` etc. can be set by attacker1755. **Logs are sensitive** — edge logs often contain secrets in headers/body176177### Hardening Checklist178- [ ] Validate `X-Forwarded-*` headers at origin (don't trust blindly)179- [ ] Rotate edge deployment tokens quarterly180- [ ] Audit edge function code for injection181- [ ] Use Cloudflare's API tokens (not Global API Key) for CI182- [ ] Restrict Worker secrets to specific Workers via bindings183- [ ] Enable Fastly Compute@Edge secret store ACLs184- [ ] Use signed URLs for CloudFront protected content185- [ ] Audit Vercel Edge Config access patterns186- [ ] Apply Deno Deploy KV access controls187- [ ] Monitor edge function logs for secret patterns188189### Detection Engineering190- Edge function log anomaly detection (unexpected env var reads)191- KV store race condition detection (concurrent operations)192- Cache hit ratio anomaly (potential poisoning)193- Edge function cold start anomaly (potential injection)194- Edge-to-origin header consistency checks195196## Practical Steps197198### Cloudflare Workers Recon199```bash200# Identify Cloudflare201curl -sI https://target/ | grep -i server202# Server: cloudflare203204# Identify edge POP205curl -sI https://target/ | grep -i cf-ray206# CF-RAY: 85abc123.def-LAX (LAX = Los Angeles POP)207208# Detect Worker209curl -s https://target/cdn-cgi/trace210# Identifies colo, request source, etc.211212# Worker source map leak (often enabled)213curl -s https://target/script.js.map214```215216### Cloudflare Workers KV Race217```javascript218// Deploy own Worker with KV binding219// Race condition: read-write-read pattern220221// Worker code:222addEventListener('fetch', event => {223 event.respondWith(handleRequest(event.request));224});225226async function handleRequest(request) {227 const key = 'shared_key';228229 // Read value230 const initial = await KV.get(key);231232 // Write attacker value233 await KV.put(key, 'attacker_value');234235 // Read again quickly — may catch another tenant's write236 const after = await KV.get(key);237238 return new Response(JSON.stringify({ initial, after }));239}240```241242### Fastly Compute@Edge Recon243```bash244# Identify Fastly245curl -sI https://target/ | grep -i "X-Fastly"246# X-Fastly: hit247# X-Served-By: cache-lax1234-LAX248249# Detect Compute@Edge usage250curl -sI https://target/ | grep -i server251# Server: Fastly Compute252253# WASM source map leak254curl -s https://target/.well-known/fastly/source255```256257### AWS Lambda@Edge Recon258```bash259# Identify CloudFront260curl -sI https://target/ | grep -i "X-Amz-Cf"261# X-Amz-Cf-Pop: LAX1-C1262# X-Amz-Cf-Id: ...263264# Lambda@Edge logs in CloudWatch (us-east-1)265aws logs describe-log-groups \266 --region us-east-1 \267 --log-group-name-prefix "/aws/lambda/"268269# CloudFront Function source270aws cloudfront list-functions271aws cloudfront describe-function --name REPLACE_WITH_YOUR_FUNCTION272```273274### Vercel Edge Recon275```bash276# Identify Vercel277curl -sI https://target/ | grep -i "X-Vercel"278# X-Vercel-Cache: HIT279# X-Vercel-Id: vercel-sfo1:abc-def280281# Edge Config endpoint282curl -s https://target/_vercel/edge-config/_default283```284285## Detection Methods286287### CDN / Edge Function Logs288- **Cloudflare Workers abuse**: Anomalous Worker invocations; outbound fetch to attacker domains.289- **AWS Lambda@Edge anomalies**: Function duration spikes; cross-region data egress from edge.290- **Origin IP discovery**: Direct origin access bypassing CDN (signature: requests to origin IP from internet).291292### SIEM Detection Rules293- **Splunk SPL**: `index=cdn sourcetype=cloudflare:workers | stats count by script | sort -count | head 10`294- **Cloudflare Analytics**: Native bot/security analytics.295- **AWS CloudTrail**: Lambda@Edge invocation logs; alert on cross-region data egress.296297## Defense Evasion Techniques298299### CDN Bypass300- **Direct origin access**: Find origin IP via DNS history, leak in HTTP headers, SSL cert; bypass CDN/WAF.301- **Cache poisoning**: Poison cached response; affect all users of cached resource.302- **Cache deception**: Trick CDN into caching dynamic content with sensitive data.303304### Edge Function Exploitation305- **Worker script injection**: Inject code into Worker via compromised account or supply chain.306- **Lambda@Edge privilege abuse**: Use Lambda@Edge for global execution; harder to attribute.307- **Origin IP rotation**: Use direct IP for exfil; CDN sees only legitimate traffic.308309## Cross-References310- `skills/cloud-security/SKILL.md` — broader CSP control plane attacks311- `skills/container-security/SKILL.md` — Linux container escapes312- `skills/web-ssrf/SKILL.md` — origin-side SSRF (compare to edge-side)313- `skills/dns-attacks/SKILL.md` — DNS attacks relevant to edge routing314- `skills/api-security/SKILL.md` — API gateway attacks315- `skills/persistence-attacks/SKILL.md` — edge-side persistence patterns316- `skills/cdn-cache-attack/SKILL.md` — CDN-specific cache attacks317318## References319320- Cloudflare — *Workers Security Model* (2024)321- Fastly — *Compute@Edge Security Documentation* (2024)322- AWS — *Lambda@Edge Security Best Practices* (2024)323- Akamai — *EdgeWorkers Security Guide* (2024)324- Vercel — *Edge Functions and Edge Config Documentation* (2024)325- Deno — *Deno Deploy Threat Model* (2024)326- Bishop Fox — *Edge Computing Attack Vectors* (2024 whitepaper)327- Black Hat USA — *Cross-Tenant Attacks in Edge Platforms* (2024)328- MITRE ATT&CK — T1190 Exploit Public-Facing Application, T1552.007 Container and Cloud Instance Credentials API