RootXJS blog

Back

Labs Overview

Comprehensive gRPC security vulnerabilities and attack scenarios

gRPC Goat Labs#

Welcome to the gRPC Goat vulnerability labs! Each lab demonstrates a specific security vulnerability commonly found in real-world gRPC applications. These hands-on exercises will help you understand both how to exploit these vulnerabilities and how to defend against them.

alt text

Vulnerability Overview#

The following table provides an overview of all available labs, their business context, and the security risks they demonstrate:

LabService NameBusiness PurposeVulnerabilityRisk / Impact
001Service DiscoveryInternal API registry for developersReflection EnabledAttackers can enumerate all gRPC services and hidden methods, discovering sensitive endpoints like admin functions
002Auth ServiceHandles user login and session tokensPlaintext gRPCCredentials sent over plaintext can be intercepted and reused by attackers
003Billing ServiceProcesses customer paymentsInsecure TLSSelf-signed TLS allows MITM attacks and interception/manipulation of transactions
004Partner APIExposes partner integrationsArbitrary mTLSAccepts any client certificate, letting attackers impersonate trusted partners and access restricted APIs
005Partner API v2Enhanced partner integrationsmTLS Subject ValidationValidates subject name but accepts self-signed certificates, allowing certificate impersonation
006Admin ServiceSystem administration functionsUnix Socket World WritableSocket with world read/write permissions allows any user to access admin functions
007User DirectoryStores employee profiles and permissionsSQL InjectionUnsanitized database queries allow attackers to exfiltrate sensitive data (users, credentials, API keys)
008File ProcessorProcesses uploaded files for reportsCommand InjectionUnsanitized input allows attackers to execute arbitrary system commands on the server
009Image PreviewFetches thumbnails from external URLsSSRFAttackers can make the server request internal resources, potentially accessing metadata or internal endpoints

Lab Categories#

Discovery & Enumeration#

  • Lab 001: Service Discovery - Learn how gRPC reflection can expose your entire API surface

Authentication & Authorization#

  • Lab 002: Auth Service - Understand the risks of plaintext gRPC communications
  • Lab 004: Partner API - Explore mTLS misconfigurations
  • Lab 005: Partner API v2 - Advanced certificate validation bypasses

Transport Security#

  • Lab 003: Billing Service - TLS implementation vulnerabilities
  • Lab 006: Admin Service - Unix socket permission issues

Injection Attacks#

  • Lab 007: User Directory - SQL injection in gRPC services
  • Lab 008: File Processor - Command injection vulnerabilities
  • Lab 009: Image Preview - Server-Side Request Forgery (SSRF)

Learning Path#

For Beginners#

Start with these foundational labs to understand basic gRPC security concepts:

  1. Lab 001 - gRPC Reflection (easiest to understand and exploit)
  2. Lab 002 - Plaintext Communications (demonstrates basic transport security)
  3. Lab 007 - SQL Injection (familiar vulnerability in gRPC context)

For Intermediate Users#

Explore authentication and transport security issues:

  1. Lab 003 - Insecure TLS Implementation
  2. Lab 004 - mTLS Misconfigurations
  3. Lab 006 - Unix Socket Permissions

For Advanced Users#

Tackle complex vulnerabilities and advanced attack scenarios:

  1. Lab 005 - Advanced Certificate Validation Bypasses
  2. Lab 008 - Command Injection in gRPC Services
  3. Lab 009 - Server-Side Request Forgery (SSRF)

Getting Started#

  1. Choose a lab from the table above based on your experience level
  2. Set up the environment following the installation guide
  3. Follow the lab instructions to exploit the vulnerability
  4. Study the mitigation techniques to secure your own gRPC services
  5. Practice with different tools like Postman, grpcurl, or BloomRPC

Ready to start? Head to Getting Started to set up your lab environment!