Security options for container implementations Jay Coles doger.io - - PowerPoint PPT Presentation

security options for container implementations
SMART_READER_LITE
LIVE PREVIEW

Security options for container implementations Jay Coles doger.io - - PowerPoint PPT Presentation

Security options for container implementations Jay Coles doger.io LCA2015 @container_doge Who am I http://doger.io @container_doge Jay Coles doger.io LCA2015 @container_doge Triangle of Effort NSA Decreasing Skill Hacker Level


slide-1
SLIDE 1

doger.io LCA2015 Jay Coles @container_doge

Security options for container implementations

slide-2
SLIDE 2

doger.io LCA2015 Jay Coles @container_doge

http://doger.io @container_doge

Who am I

slide-3
SLIDE 3

doger.io LCA2015 Jay Coles @container_doge

Triangle of Effort

NSA Hacker Organized Crime Drive By/Botnet Script Kiddie Increasing Effort Decreasing Skill Level

slide-4
SLIDE 4

doger.io LCA2015 Jay Coles @container_doge

What they want

  • Do not want to be detected
  • Access to other customers information
  • Access to other customers environments
  • Adequate Storage/CPU/Mem/Network capacity
  • Further ingress/infiltration on the network
slide-5
SLIDE 5

doger.io LCA2015 Jay Coles @container_doge

How they do it

  • Exploit an exposed service (does not need to

have network access, eg in batch/queue processing)

  • Pull down their toolset
  • Start attacking the kernels
  • Cement hold on system (command and control,

process hiding)

slide-6
SLIDE 6

doger.io LCA2015 Jay Coles @container_doge

What is security?

  • Restrict access to other containers
  • Prevent knowledge of other containers from

leaking

  • Ability to account for memory/cpu/network/disk

usage

  • Ability to control memory/cpu/network/disk

resources

  • Ability to detect and remove rouge processes
slide-7
SLIDE 7

doger.io LCA2015 Jay Coles @container_doge

Usual Suspects

  • Unix permissions
  • Chroot
  • Rlimit
  • App Armor
  • Selinux
  • Capabilities
  • Quotas
  • Cgroups
  • Seccomp
  • ACLs
slide-8
SLIDE 8

doger.io LCA2015 Jay Coles @container_doge

What does not work

  • rlimits
  • Quotas
  • Blacklisting via ACLs
slide-9
SLIDE 9

doger.io LCA2015 Jay Coles @container_doge

Capabilities

  • CAP_SYS_MODULE
  • CAP_SYS_RAWIO
  • CAP_NET_BROADCAST
  • CAP_MKNOD
  • CAP_SYS_TTY_CONFIG
  • CAP_AUDIT_WRITE
  • CAP_AUDIT_CONTROL
  • CAP_AUDIT_READ
  • CAP_SYS_TIME
  • CAP_MAC_OVERRIDE
  • CAP_MAC_ADMIN
  • CAP_NET_RAW
  • CAP_SETPCAP
  • CAP_SYSLOG
  • CAP_WAKE_ALARM
  • CAP_BLOCK_SUSPEND
  • CAP_SYS_BOOT
slide-10
SLIDE 10

doger.io LCA2015 Jay Coles @container_doge

Capabilities

  • 'capsh' to drop capabilities
  • Call instead of /sbin/init or entry point
  • Have it invoke the init/entrypoint
  • CAP_SETPCAP allows you to turn capabilties

back on

slide-11
SLIDE 11

doger.io LCA2015 Jay Coles @container_doge

cgroups

  • Multiple protections in one

– Accounting of resource usage – Limiting resource usage (cpu/mem) – Tracking of processes – Preventing/allowing device access

slide-12
SLIDE 12

doger.io LCA2015 Jay Coles @container_doge

cgroups

slide-13
SLIDE 13

doger.io LCA2015 Jay Coles @container_doge

App Armor vs selinux

slide-14
SLIDE 14

doger.io LCA2015 Jay Coles @container_doge

selinux

Multi Category Security Multi Level Security NSA ASIO CIA Secret Unclassified Confidential

slide-15
SLIDE 15

doger.io LCA2015 Jay Coles @container_doge

selinux

  • 'runcon' is your friend
  • 'chcon' to tag the files as belonging to a

container

  • Mainly going to be changing the security level

– s0:c1,c4

  • Will need appropriate policies/rules in place

– This means a working selinux setup

slide-16
SLIDE 16

doger.io LCA2015 Jay Coles @container_doge

seccomp

  • Mount
  • Acct
  • Umount2
  • Sethostname
  • Swapon
  • swapoff
  • Reboot
  • Adjtimeex
  • Setdomainname
  • init_module
  • delete_module
  • Quotactl
  • finit_module
  • Setns
  • clock_adjtime
  • kexec_load
  • Nfsservct
  • pivot_root
  • pciconfig_iobase
  • pciconfig_read
  • pciconfig_write
  • clock_settime
  • Personality
slide-17
SLIDE 17

doger.io LCA2015 Jay Coles @container_doge

Adding things in

  • Can be patched in:

– App Armor – Selinux – Capabilities – Cgroups

  • Requires app support:

– seccomp

slide-18
SLIDE 18

doger.io LCA2015 Jay Coles @container_doge

Questions