Slide 1

Slide 1 text

Application Security Workflow Automation Using Docker and Kubernetes Abhisek Datta Head of Technology, Appsecco

Slide 2

Slide 2 text

Rootconf Pune 2019

Slide 3

Slide 3 text

About Me – Abhisek Datta • Head of Technology (appsecco.com) • A boutique security consulting company • TechWing @ null0x00 (null.co.in) • An Open Security Community • Security Researcher • Discovered vulnerabilities in MS Office, Internet Explorer, HP SiteScope etc. • Open Source Contributor • Wireplay, RbWinDBG etc. github.com/abhisek

Slide 4

Slide 4 text

1. How does an Application Security Workflow look like (Our opinion) 2. How to get started in automating Application Security Workflow using KubeSecO 3. Our approach of security automation using Kubernetes native technologies Key Take Away

Slide 5

Slide 5 text

What is Docker and Kubernetes?

Slide 6

Slide 6 text

What is Docker and Kubernetes? • https://www.katacoda.com/courses/docker • https://www.katacoda.com/courses/kubernetes

Slide 7

Slide 7 text

Let's do HANDS ON docker run –it jess/hollywood

Slide 8

Slide 8 text

Setup Kubernetes Deploy apps and services Run Workflow Getting Started with KubeSecO https://github.com/appsecco/kubeseco

Slide 9

Slide 9 text

$ git clone https://github.com/appsecco/kubeseco $ cd kubeseco $ ./cluster_create_gcp.sh # Optional $ ./setup.sh # Need kubectl & helm KubeSecO: Setup and Get Started

Slide 10

Slide 10 text

Application Security Workflow

Slide 11

Slide 11 text

Domain / URL / ... OSINT Application Discovery Security Testing Exploitation Analysis AppSec Workflow

Slide 12

Slide 12 text

An Example AppSec Workflow Domain Hosts Subdomain Enumeration CIDR ASN Search DNS SPF, MX etc. Port and Service Scanning URLs Technologies Cloud Infrastructure Emails Public Breach DB Query Password Spraying Application Security Scan

Slide 13

Slide 13 text

Data Collection Analysis Inference Further Actions How does it look like from Automation Perspective? Security Tools Human + Learning Systems Human + Learning Systems Feedback Loop

Slide 14

Slide 14 text

Security Tool Workflow Rules Security Automation Automating AppSec Workflow

Slide 15

Slide 15 text

KubeSecO Live in Action

Slide 16

Slide 16 text

What's under the hood?

Slide 17

Slide 17 text

How does the system look like?

Slide 18

Slide 18 text

Driving the System – Events FTW! API Service HTTP POST NATS Write to NATS Message Queue Scanners (Client) Minio Object Storage Persist Output Output Analysis and Feedback Alerting and Notification Tool Output Event

Slide 19

Slide 19 text

• 3rd Party Tools are not in our control • We need to be able to • Receive input from NATS • Run tool with tool specific command line • Receive output or check for error • Persist output to Minio The Tool Adapter (Pattern)

Slide 20

Slide 20 text

1. Package 3rd party tools as Docker containers 2. Add Tool Adapter binary and set as entrypoint 3. Write Kubernetes deployment spec (YAML) 4. Deploy to Kubernetes 5. Write YAML rules for Feedback Processing Adding a Security Tool (3rd Party)

Slide 21

Slide 21 text

Security Tool Dockerfile

Slide 22

Slide 22 text

Security Tool Kubernetes Spec (YAML)

Slide 23

Slide 23 text

Match Transform Take Action Feedback Processor (Driving the System)

Slide 24

Slide 24 text

Feedback Processor - Example

Slide 25

Slide 25 text

• State management is difficult due to asynchronous nature of the system • NATS connection issue with preemptible nodes on GKE • Capacity planning and analysis • Cost analysis Challenges, Constraints and Things to do

Slide 26

Slide 26 text

How to Contribute 1. Clone the repository from Github 2. Try out and report bugs 3. Add new security tools 4. Add feedback processor rules 5. Submit PR

Slide 27

Slide 27 text

Questions? [email protected] That’s all for now.. https://appsecco.com @abh1sek github.com/abhisek github.com/appsecco/kubeseco