technologies container and cloud native the do's and don't for securing · 2019-12-20 ·...

32
The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief Information Security Officer - Sisense Kavya Pearlman Cybersecurity Strategist - Wallarm

Upload: others

Post on 26-May-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

The Do's and Don't for Securing Container and Cloud Native Technologies

Ty SbanoCloud Chief Information Security Officer - Sisense

Kavya PearlmanCybersecurity Strategist - Wallarm

Page 2: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief
Page 3: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

© 2019 Cloud Native Computing Foundation3

Sponsorships available:Prospectus

Page 4: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Who am I

● Well known as the “Cyber Guardian”

● Cybersecurity Strategist at Wallarm

● An Award-winning Cybersecurity Professional

● Founder and CEO of XR Safety Initiative

● Former Information Security Director Linden Lab

● Former Facebook Third Party Security Risk Advisor

Personal interests : Emerging Technologies, Gaming, Virtual Worlds

Page 5: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Who am I - Ty Sbano

2

Ty Sbano is an Information Security Practitioner with 13 years of experience, mainly in Financial Technology organizations. Currently serving as Cloud Chief Information

Security Officer at Sisense and advising for Watchertower.ai and Spherical Data.

Previously Ty focused on leading application, product, and information security

programs at >

Education

Penn State University

B.S. Information Science and Technology

Norwich University

M.S. Information Assurance

Certifications

CISSP, SSCP, CEH, CCSK, CPT

Page 6: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Overview of Containers

6tysbano.com

BIN/LIB/MODULE

APPLICATION

SERVER

OS KERNEL

CONTAINER ENGINE

BIN/LIB/MODULE

APPLICATION

CONTAINER

BIN/LIB/MODULE

APPLICATION

SERVER

HYPERVISOR

OS

BIN/LIB/MODULE

APPLICATION

VIRTUAL MACHINE

OS

Page 7: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Monolith vs. Microservices?

7tysbano.com

Data Layer

Business Logic

User Interface

Microservice

User Interface

Microservice Microservice

DATA SOURCE DATA SOURCE DATA SOURCEMONOLITH APPLICATION DB

Page 8: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

What is up with these directions?

• North-South ○ Container to Clients

• East-West ○ Between Clusters/Pods

7tysbano.com

Page 9: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

We hear a lot about Kubernetes, Kube, K8s...

tysbano.com

OPEN SOURCE CONTAINER ORCHESTRATION ENGINE

“koo-burr-NET-eez”

Kubernetes is a portable, extensible, open-source platform for

managing containerized workloads and services, that facilitates

both declarative configuration and automation. It has a large,

rapidly growing ecosystem. Kubernetes services, support, and

tools are widely available. The name Kubernetes originates from

Greek, meaning helmsman or pilot.

Page 10: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Where to start?

➔ Inventory

➔ Leverage Service Mesh

➔ Risk Rank Process - Update Process

◆ CIA Triad

tysbano.com

REPUTATION

CONFIDENTIALITY

AVAILABILITY INTEGRITY

Page 11: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Secure Defaults - Natively

● NameSpace - A way to divide resources○ https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

● Network Policy - Ingress & egress rules○ https://kubernetes.io/docs/concepts/services-networking/network-policies/

● Pod Security Policy - Min Reqs to be accepted○ https://kubernetes.io/docs/concepts/policy/pod-security-policy/

● Security Context - Applies to all containers in the Pod○ https://kubernetes.io/docs/tasks/configure-pod-container/security-context/

tysbano.com

Page 12: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Secure Defaults - Natively

● AppArmor - Protect and reduce attack surface○ https://kubernetes.io/docs/tutorials/clusters/apparmor/

● Disabling Default Services - Least Privilege ○ https://cloud.google.com/kubernetes-engine/docs/how-to/hardening-your-cluster

● Certificate Management - Self-signed w/ kubeadm○ https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/

● Back-ups - Encrypt them!○ https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/

tysbano.com

Page 13: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Production Access

• Who NEEDS access, why?

• Leverage Role Based Access Controls (RBAC)○ https://kubernetes.io/docs/reference/access-authn-authz/rbac/

• Establish Risk Based Alerts

○ Event / Action

○ Time

tysbano.com

Page 14: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Software Supply Chain

tysbano.com

SUPPLIERS WAREHOUSES DEVELOPERS PRODUCT

Page 15: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Security EcoSystem

• Where are your containers from?

○ Trusted Images (latest?)

• Security Scanning (Open Source)

○ Clair - https://coreos.com/clair/docs/latest/

○ Klar - https://github.com/optiopay/klar

tysbano.com

Page 16: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Summary

• Security Hygiene FTW

○ Inventory

○ Hardening

○ Scanning

tysbano.com

Page 17: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

DOs and DON’TsContainer Security

14

Page 18: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

“Cloud-native applications and infrastructure create several new challenges for all of us security professionals. We need to establish new security programs, have a new mindset and adopt advanced new tools that are focused primarily on securing cloud-native technologies.”

- Kavya Pearlman

Getting Started

Page 19: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Build. Deploy. Run.

DEPLOY

RUNBUILD

Artifact Download

CI/CD pipeline

Container Runtime Environments

Host Runtime

Workload at Runtime

Orchestrator

Container Registries

Page 20: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Build. Deploy. Run.

➔ Application Security◆ Secure Coding Practices◆ SAST/DAST

➔ Image Scanning on Build/Pull◆ Vulnerability Management◆ SCA - Software Composition Analysis

➔ Image Signing➔ Attack Surface Reduction

◆ Multi-Stage Builds

BUILD TIME CONSIDERATIONS

Page 21: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Build. Deploy. Run.

➔ Image Registries➔ Vulnerability Management

◆ Regular Scans◆ Maintain deployment Info

➔ RBAC - Limit User Privileges➔ Configuration Manager

◆ Open APIs➔ Secrets Management Integration➔ Traffic Segregation

DEPLOY TIME CONSIDERATIONS

Page 22: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Build. Deploy. Run.

➔ Host Protection➔ Hardening

◆ CIS Benchmarks◆ Container-Friendly Hosts

➔ Network Segregation◆ Protect APIs

➔ Container Firewalls➔ Activity monitoring, logging & auditing➔ Patching & Vulnerability Tracking

RUN TIME CONSIDERATIONS

Page 23: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Container Hardening

COMES TO THE RESCUE!!

● Downgrade to non privileged user

RUN adduser -D limited_userUSER limited_user

● OR provide the following option at runtime:

docker run -u limited_user ubuntu

● Mitigate Denial of Service by limiting resource usage

docker run -it --cpus 1 --memory 512Mb ubuntu

● Enforce a good AppArmor Profile

https://github.com/genuinetools/bane

Page 24: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Host Protection

Review NIST 800-190 for detailed guidelines

Lock Down the Host (Volume write / exec, etc. )

Use Seccomp to to restrict Host syscall access

SELinux to prevent container escape

Page 25: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Security Tooling

Pre-commit

Continuous integration Continuous delivery and deployment

Real-time SAST in IDE pre-commit

checks

Commit Build Test StagingDeploy/

Production

Incremental SAST

SCA, SAST(deeper level)

IAST, DAST, fuzz testing, hardening,

checks

Monitoring, pen testing, red teaming

Stability, Performance, Reliability

& Security Testing

Page 26: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Infrastructure as Code

Page 27: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Open Source Tools For Container Security

Page 28: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

DOs for Containerized Environments

RUN IMAGES ONLY FROMTRUSTED SOURCES

USE CONTAINER-NATIVEMONITORING TOOLS

CREATE IMMUTABLECONTAINERS

Page 29: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

NOT To Dos for Containerized Environments

Installing an operating system inside a Docker container

Running unnecessary services

Storing critical data inside a container

Hard-Coded Credentials for accessing Registry

Hosting too many services inside a container

Page 30: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Q&A 42

Page 31: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Linkedin kavya-pearlman

Twitter @KavyaPearlman

Website - www.wallarm.com

Kavya and Ty Contact Info

Linkedin tysbano

Twitter - @tysbano

Website - tysbano.com

Page 32: Technologies Container and Cloud Native The Do's and Don't for Securing · 2019-12-20 · The Do's and Don't for Securing Container and Cloud Native Technologies Ty Sbano Cloud Chief

Thank You!

43