Skip to content

Commit 6bc48e5

Browse files
committed
updated docs for mtls and tls lab focus and real world scenario
1 parent f6cb796 commit 6bc48e5

File tree

4 files changed

+55
-0
lines changed

4 files changed

+55
-0
lines changed
File renamed without changes.
File renamed without changes.

src/content/docs/grpc_goat_docs/walkthrough.mdx renamed to src/content/blog/grpc-goat/walkthrough.mdx

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,18 @@ func (s *authServer) Login(ctx context.Context, req *pb.LoginRequest) (*pb.Login
104104
s := grpc.NewServer(grpc.UnaryInterceptor(unaryInterceptor))
105105
```
106106

107+
### Lab Objective
108+
To solve this lab, you simply connect to the plaintext gRPC service and call the authentication method with valid credentials. However, examining the service reveals additional security concerns:
109+
110+
**Immediate Issue (Lab Focus)**:
111+
- Service accepts plaintext connections without requiring TLS
112+
- Credentials are logged in server logs
113+
114+
**Broader Security Implications**:
115+
- **Network Traffic Exposure**: In a real environment, credentials would be visible to anyone monitoring network traffic
116+
- **Man-in-the-Middle Attacks**: Attackers could intercept and modify communications
117+
- **Credential Harvesting**: Network-level attackers could collect authentication data
118+
107119
### What to Look For
108120
- No TLS encryption on gRPC connections
109121
- Credentials transmitted in plaintext
@@ -177,6 +189,16 @@ tlsConfig := &tls.Config{
177189
}
178190
```
179191

192+
### Lab Objective
193+
To solve this lab, you bypass certificate validation using the `-insecure` flag to connect to a service with a self-signed certificate. However, this reveals deeper security issues:
194+
195+
**Immediate Issue (Lab Focus)**:
196+
- Service uses self-signed certificates that clients must bypass
197+
- Sensitive payment data is logged in plaintext
198+
199+
**Broader Security Implications**:
200+
- **Trust Establishment**: Clients cannot verify server identity, enabling impersonation attacks
201+
180202
### What to Look For
181203
- Self-signed TLS certificates
182204
- Certificate validation bypasses required
@@ -249,6 +271,18 @@ tlsConfig := &tls.Config{
249271
}
250272
```
251273

274+
### Lab Objective
275+
To solve this lab, you generate a self-signed client certificate and use it to access partner data. This demonstrates how improper mTLS configuration can be exploited:
276+
277+
**Immediate Issue (Lab Focus)**:
278+
- mTLS configuration accepts any client certificate without validation
279+
- No verification against a trusted Certificate Authority
280+
281+
**Broader Security Implications**:
282+
- **Partner Impersonation**: Any attacker can create certificates and pose as legitimate partners
283+
- **Data Breach**: Sensitive partner API keys and secrets are exposed to unauthorized clients
284+
- **Trust Model Failure**: The entire purpose of mTLS (mutual authentication) is defeated
285+
252286
### What to Look For
253287
- mTLS configuration that accepts any certificate
254288
- No certificate authority validation
@@ -329,6 +363,18 @@ tlsConfig := &tls.Config{
329363
}
330364
```
331365

366+
### Lab Objective
367+
To solve this lab, you create a self-signed certificate with the correct subject name (`goatpartner.local`) to bypass the subject validation. This demonstrates a common mTLS misconfiguration:
368+
369+
**Immediate Issue (Lab Focus)**:
370+
- Service validates certificate subject but not the certificate authority
371+
- Self-signed certificates with correct subjects are accepted
372+
373+
**Broader Security Implications**:
374+
- **Partner Impersonation**: Attackers can create certificates with legitimate subjects and pose as trusted partners
375+
- **Data Breach**: Sensitive partner data is exposed to unauthorized clients with forged certificates
376+
- **Trust Model Failure**: Subject validation alone is insufficient without proper CA verification
377+
332378
### What to Look For
333379
- Subject name validation in mTLS
334380
- Acceptance of self-signed certificates
@@ -742,6 +788,15 @@ func isInternalIP(hostname string) bool {
742788

743789
## Security Lessons Learned
744790

791+
### Understanding Lab vs. Real-World Vulnerabilities
792+
793+
**Important Note**: The labs focus on demonstrating specific gRPC vulnerabilities through direct exploitation techniques. However, many of the underlying security issues have broader implications in real-world scenarios:
794+
795+
- **Lab Approach**: Direct connection and exploitation to demonstrate the core vulnerability
796+
- **Real-World Impact**: These same vulnerabilities enable more sophisticated attacks like network interception, MITM attacks, and other advanced techniques
797+
798+
For example, while Lab 002 shows direct plaintext connection, the real security risk is that credentials would be visible to network monitoring tools, packet sniffers, or man-in-the-middle attackers in production environments.
799+
745800
### Key Takeaways
746801

747802
1. **Disable gRPC Reflection** in production environments to prevent service discovery

0 commit comments

Comments
 (0)