BASTION: A Security Enforcement Network Stack for Container Networks
Jaehyun Nam1, Seungsoo Lee1, Hyunmin Seo1, Phillip Porras2, Vinod Yegneswaran2, and Seungwon Shin1 KAIST1 and SRI International2
BASTION: A Security Enforcement Network Stack for Container Networks - - PowerPoint PPT Presentation
BASTION: A Security Enforcement Network Stack for Container Networks Jaehyun Nam 1 , Seungsoo Lee 1 , Hyunmin Seo 1 , Phillip Porras 2 , Vinod Yegneswaran 2 , and Seungwon Shin 1 KAIST 1 and SRI International 2 The state of Container Security
Jaehyun Nam1, Seungsoo Lee1, Hyunmin Seo1, Phillip Porras2, Vinod Yegneswaran2, and Seungwon Shin1 KAIST1 and SRI International2
2
[1] https://www.tripwire.com/state-of-security/devops/organizations-container-security-incident
Mostly focus on the security of containers! Less concern for the security of container networks!
3
4
Web UI (A) Service (A) DB (1) DB (2) DB (3) Web UI (B) Service (B) Host Network Bridge #2 Bridge #1 External Interface Gateway #1 Gateway #2 Web UI (A) Service (A) DB (1) Web UI (B) Service (B) DB (2) DB (3)
5
Web UI (A) Service (A) DB (1) DB (2) DB (3) Web UI (B) Service (B) Host Network Bridge External Interface Gateway for an overlay network Web UI (A) Service (A) DB (1) Web UI (B) Service (B) DB (2) DB (3)
6
Container Network Container Container NS Container vNIC Container NS Host Network Namespace (NS) Iptables-based Access Control veth Packet veth vNIC
1 2,3
7
Container Container NS Host Service Host Network Namespace (NS) Bridge (or Software Switch) Network- privileged Container Container Network Host Network ExtNIC vNIC veth GW
4 5
8
Container NS Container NS
Host NS Host-side Container vNIC Host-side Container vNIC veth veth iptables iptables Bridge extNIC Network Visibility Traffic Visibility
Source Verification Direct ARP handler Container-aware Network Isolation Special IP handler End-to-end Direct Forwarding
Visibility Maps
Container Network Map Inter-container Dependency Map
Bastion
End-to-end direct forwarding End-to-end direct forwarding E2E forwarding
Bastion Bastion
9
Container Container vNIC vNIC
Container Network Service Interface IP address MAC address WebApp-X1 WebService WebApp vethwepl6f964e8 10.32.0.2 96:0e:73:ef:86:fe WebApp-X2 WebService WebApp vethweplb89dc35 10.32.0.3 6e:81:0f:a7:db:c7 Service-Y1 WebService Service vethweplb957e84 10.32.0.4 D6:bc:7b:20:32:c5 Database-Z1 WebService Database vethweplc5ee33c 10.32.0.5 42:a0:ae:b7:f5:97 Source Destination Policy WebApp Service Any WebApp Database TCP:3306 Service Database TCP:3307
< Inter-container Dependency Map >
Operator Container Platform Bastion Manager Manual update Periodic update
< Container Network Map >
10
Bastion UI
11
Bastion Manager Container Collection Stack Management NetMap DepMap Container Platform New Container Existing Container Security Stack Update the maps Security Stack Deploy a security stack Update the maps
12
Source container
Destination container
Bastion Security Stack Direct ARP handler
ARP Request (dst: 10.32.0.4) ARP Reply
(dst: D6:BC:7B:20:32:C5)
No broadcast
IP: 10.32.0.4 Mac: D6:BC:7B:20:32:C5 Container Network Map
Bastion Security Stack
13
Src: 10.32.0.2(5000) Dst: 10.32.0.5(3306) Key(10.32.0.5) = YYY (1) Key Generation (2) Dependency map lookup (3) Policy matches
DP:3306 = TCP:3306
Action (forward/drop) Packet from the WebApp
KEY Policy YYY TCP:3306
14
Container
Container-side Network Interface
Bastion Security Stack Source Verification
Packet Source IP = 10.32.0.1 Host-side Network Interface
Metadata (If_index: xx)
Source MAC = aa:bb:cc:dd:ee:ff Source interface = xx
15
Bastion Bastion Container Network Container A Container B Internal Interface Internal Interface Container A’s host-side Interface A à B A à B End-to-end direct forwarding No traffic?
Nothing?
Original path Container B’s host-side Interface
Nothing?
16
Redis (1) Container Takeover (2) Target Scanning (3) Target Monitoring (4) Forged Content Injection (5) Fake Content Delivery (1) Forged Contents Request contents (5)
(User)
Forged contents Original contents
Nginx (User)
Gateway (0.0) Microservices Redis
(Guest) Nginx (Guest)
(3) (4) 0.1 0.3 0.4 0.2
17 à The number of all deployed containers Nginx-User The original MAC address of Redis-User à Redis-User The MAC address of Nginx-Guest à Nginx-Guest
(Nginx-Guest)
(Nginx-Guest)
Before injection After injection
18
à The number of all deployed containers à The number of dependent containers
19
20
< Attacker side > < Victim side > < Attacker side > < Victim side >
21
Throughput (Gbps) Base (No Bastion) Network Visibility
Traffic Visibility
Bastion (Fully deployed) Within a host 34.4 33.7 41.8 41.5 Across hosts 4.28 4.23 4.91 4.83
22 34.50 40.02 34.40 41.50 31.92 38.52 6.04 6.61 4.28 4.83 5.87 6.16
10 20 30 40 50
Flannel Flannel-BN Weave Weave-BN Calico Calico-BN Throughput (Gbps) Intra-Host Inter-Host
23
24
namjh@kaist.ac.kr