Egress Security
Security also asks what a compromised service can call outward; unrestricted egress enables SSRF, command-and-control and exfiltration.
Frame the problem
Security starts with a concrete asset, attacker capability and trust crossing.
Why the system fails
Every workload can reach arbitrary addresses and protocols, so stolen data and callbacks leave without crossing another policy decision.
The important question is not “what is Egress Security?” but “which assumption let untrusted data or an over-scoped identity cross workload → internal services and internet destinations?” Trace the decision at the boundary, then constrain what can happen after the first control fails.
Design the control in layers
Start with the control closest to the interpretation or privilege boundary: Allow only required destinations and protocols Then add a control that reduces blast radius and telemetry that proves the decision was enforced.
The resulting design is not labelled secure. Record the identified controls, the known failure paths, the remaining exposure, and the evidence you would need during an incident.
| Prevent | Detect | Recover |
|---|---|---|
| Allow only required destinations and protocols · Use controlled proxies for fetch workloads · Remove sensitive credentials from internet-facing services | Novel destinations, DNS anomalies and unusual outbound volume | Contain the affected identity or component, scope impact from audit evidence, and preserve a regression test. |
Key points
- Asset: Secrets and data reachable from a compromised workload.
- Boundary: Workload → internal services and internet destinations
- Primary control: Allow only required destinations and protocols
- Detection signal: Novel destinations, DNS anomalies and unusual outbound volume
- Always ask what limits damage when the primary control fails.
Boundary control exercise
This lesson uses the shared boundary-control exercise.
Follow the attack
Safe conceptual simulation: capability → missing control → crossed boundary → asset impact.
- 1Attacker starts with: An attacker who controls a request path or gains code execution in a service.
- 2Every workload can reach arbitrary addresses and protocols, so stolen data and callbacks leave without crossing another policy decision.
- 3The weak or missing boundary control is crossed: Workload → internal services and internet destinations
- 4Impact: Credential theft, internal probing and data exfiltration.
- Credential theft, internal probing and data exfiltration.
Defend, detect, recover
One prevention is a single point of security failure. Layer it and make failure observable.
- • Allow only required destinations and protocols
- • Use controlled proxies for fetch workloads
- • Remove sensitive credentials from internet-facing services
- • Novel destinations, DNS anomalies and unusual outbound volume
- • Contain the affected identity or component.
- • Scope access from audit evidence.
- • Fix the boundary and add a regression test.
- • Misconfiguration and new access paths can bypass the intended control.
- • A privileged insider or compromised control plane may still reach the asset.