9 lessons

Network, OS & Container Security

Segmentation, firewall rules, egress control, process isolation, privilege separation, sandboxing — and why a container is not a security boundary you can lean on.

AssetThreatAttack SurfaceTrust BoundaryVulnerabilityExploit PathImpactMitigationDefense in DepthResidual Risk

Every lesson below identifies the asset, attacker capability and boundary before naming the vulnerability. Controls are split into prevention, detection and recovery; residual risk is explicit.

Network Security Boundaries
▶ lab

Network design controls reachability and blast radius; it does not turn an internal caller into a trusted identity.

Boundary · Public, application, database and management networks
Network Segmentation
▶ lab

Internet → public layer → application network → database network → management network: crossings are explicit and narrow.

Boundary · One network zone → a more privileged zone
Firewalls and Security Groups
▶ lab

A rule is source, destination, port, protocol and action; every broad wildcard is an explicit expansion of attack surface.

Boundary · Network source → destination socket
Egress Security
▶ lab

Security also asks what a compromised service can call outward; unrestricted egress enables SSRF, command-and-control and exfiltration.

Boundary · Workload → internal services and internet destinations
Operating System Security

Processes, users, file permissions, privileges, patching and resource limits decide what a compromised application can do next.

Boundary · Process identity → kernel-mediated resources
Privilege Separation

A web server should run as a restricted user; administrative setup and runtime request handling should not share one authority.

Boundary · Restricted runtime identity → host administration
Unix-Style File Permissions

Owner, group and others each receive read, write and execute; the effective service identity determines which boundary actually exists.

Boundary · Process user/group → filesystem object
Sandboxing Untrusted Workloads
▶ lab

A sandbox constrains files, network, CPU, memory, syscalls and credentials so untrusted computation cannot spend or reach everything.

Boundary · Untrusted workload → host and network capabilities
Container Security and Its Limits
▶ lab

Containers package and isolate processes but share a host kernel; privileged mode, host mounts and broad capabilities erase much of the boundary.

Boundary · Container namespace/cgroup → shared host kernel