CONTINUOUS SECURITY CONTINUOUS SECURITY IN THE DEVOPS WORLD IN THE - - PowerPoint PPT Presentation

continuous security continuous security
SMART_READER_LITE
LIVE PREVIEW

CONTINUOUS SECURITY CONTINUOUS SECURITY IN THE DEVOPS WORLD IN THE - - PowerPoint PPT Presentation

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ CONTINUOUS SECURITY CONTINUOUS SECURITY IN THE DEVOPS WORLD IN THE DEVOPS WORLD JULIEN VEHENT JULIEN VEHENT MOZILLA SECURITY MOZILLA SECURITY


slide-1
SLIDE 1

1

CONTINUOUS SECURITY CONTINUOUS SECURITY

IN THE DEVOPS WORLD IN THE DEVOPS WORLD

JULIEN VEHENT JULIEN VEHENT MOZILLA SECURITY MOZILLA SECURITY

tip: navigate with left/right arrows

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 1 of 49 06/07/2016 19:00
slide-2
SLIDE 2

2

$WHOAMI $WHOAMI

Firefox Services Security Lead Infrastructure defense & incident response sec tools coder: MIG, sops, TLS Observatory, ... 50% ops, 50% dev, 50% security @jvehent on twitter

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 2 of 49 06/07/2016 19:00
slide-3
SLIDE 3

3

THIS TALK IS ABOUT THIS TALK IS ABOUT DEVOPS DEVOPS AND AND SECURITY SECURITY

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 3 of 49 06/07/2016 19:00
slide-4
SLIDE 4

IT'S ABOUT AVOIDING THIS IT'S ABOUT AVOIDING THIS

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 4 of 49 06/07/2016 19:00
slide-5
SLIDE 5

5

MEET SAMANTHA MEET SAMANTHA

She's a Full Stack developer

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 5 of 49 06/07/2016 19:00
slide-6
SLIDE 6

6

SAM USED TO WORK @SLOWCORP SAM USED TO WORK @SLOWCORP

She didn't like it much Internal private repos Manual deployment by ops, would take weeks Different platform between dev & prod No access to cool tools everyone else uses

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 6 of 49 06/07/2016 19:00
slide-7
SLIDE 7

7

SPEED MATTERS SPEED MATTERS

Traditional ops where deployments take entire weeks aren't acceptable anymore. To compete, startups need fast release cycles. 15min from patch to prod is the new standard!

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 7 of 49 06/07/2016 19:00
slide-8
SLIDE 8

8

SAM NOW WORKS AT MOZILLA SAM NOW WORKS AT MOZILLA

She gets to use all the cool stuff!

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 8 of 49 06/07/2016 19:00
slide-9
SLIDE 9

9

WHAT'S THE COOL STUFF WHAT'S THE COOL STUFF

Code in public Github repo Circle/Travis CI to run tests Docker to build and deploy applications Continuous Deployment via Jenkins in AWS Logs in Kibana, monitoring in Datadog

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 9 of 49 06/07/2016 19:00
slide-10
SLIDE 10

10 Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 10 of 49 06/07/2016 19:00

slide-11
SLIDE 11

11

IN AN IDEAL WORLD, ALL DEPLOYS ARE IN AN IDEAL WORLD, ALL DEPLOYS ARE AUTOMATED AND INSTANTANEOUS AUTOMATED AND INSTANTANEOUS

in the real world, we're not quite there yet, but you get the point

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 11 of 49 06/07/2016 19:00
slide-12
SLIDE 12

12

SECURITY VERSUS DEVOPS SECURITY VERSUS DEVOPS

AKA.

  • AKA. THE WRONG WAY

THE WRONG WAY

DevOps team optimizes for fast iterations Security team optimizes for fewer incidents Both sides typically work against each other, actively arming both the roadmap and security of the product

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 12 of 49 06/07/2016 19:00
slide-13
SLIDE 13

13

SECURITY SECURITY INTO INTO DEVOPS DEVOPS

Test Driven Security (TDS) integrated into the delivery

  • pipeline. Use security tests to gradual improve application

& infrastructure security. 1. Monitoring & blocking attacks, via fraud detection techniques and incident response. 2. Managing risks throughout the life-cycle of the service. 3.

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 13 of 49 06/07/2016 19:00
slide-14
SLIDE 14

14

CONTINUOUS SECURITY AT MOZILLA CONTINUOUS SECURITY AT MOZILLA

Walkthrough through the life-cycle of a project, from inception to retirement

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 14 of 49 06/07/2016 19:00
slide-15
SLIDE 15

15

SAM IS BUILDING A NEW SERVICE SAM IS BUILDING A NEW SERVICE

CuteFox: a REST API that sends webpush notications to Firefox users with photos of cute foxes.

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 15 of 49 06/07/2016 19:00
slide-16
SLIDE 16

16 Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 16 of 49 06/07/2016 19:00

slide-17
SLIDE 17

17

WHEN THE PROJECT STARTS, WHEN THE PROJECT STARTS, WE TALK RISK TOGETHER WE TALK RISK TOGETHER

RRA: RAPID RISK ASSESSMENT RRA: RAPID RISK ASSESSMENT

A ~30min friendly discussion between the devs, ops, products managers and security team to go over the business risks of the project

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 17 of 49 06/07/2016 19:00
slide-18
SLIDE 18

18

DONE REMOTELY! DONE REMOTELY!

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 18 of 49 06/07/2016 19:00
slide-19
SLIDE 19

19

A risk summary table from the RRA

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 19 of 49 06/07/2016 19:00
slide-20
SLIDE 20

20

RRA OUTPUTS RECOMMENDATIONS RRA OUTPUTS RECOMMENDATIONS

We capture those recommendation into a "Risk Summary"

  • bug. The bug stays open for the lifetime of the service and

serves as a tracker for security discussions related to the project

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 20 of 49 06/07/2016 19:00
slide-21
SLIDE 21

21

THE PROJECT TEAM UNDERSTANDS THE RISKS THE PROJECT TEAM UNDERSTANDS THE RISKS THEIR PROJECT IS EXPOSED TO. THEIR PROJECT IS EXPOSED TO.

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 21 of 49 06/07/2016 19:00
slide-22
SLIDE 22

22

SAM GOES CODING SAM GOES CODING

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 22 of 49 06/07/2016 19:00
slide-23
SLIDE 23

23

WE HELP SAM AVOID WE HELP SAM AVOID COMMON WEBAPP VULNERABILITIES COMMON WEBAPP VULNERABILITIES

Mozilla Web Security Guidelines OWASP ZAP Scanning Require baseline security on all websites (CSP, Secure Cookies, TLS Only, ...) wiki.mozilla.org/Security/Guidelines/Web_Security github.com/zaproxy/ZAP-Baseline-Scan

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 23 of 49 06/07/2016 19:00
slide-24
SLIDE 24

24

TEST DRIVEN SECURITY FOR WEB APPLICATIONS TEST DRIVEN SECURITY FOR WEB APPLICATIONS

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 24 of 49 06/07/2016 19:00
slide-25
SLIDE 25

25

ZAP EXAMPLE IN CIRCLECI ZAP EXAMPLE IN CIRCLECI

test:

  • verride:
  • docker run mozilla/cutefox &

# pull down the ZAP docker container

  • docker pull owasp/zap2docker-weekly

# Run ZAP against the application

  • >

docker run -t owasp/zap2docker-weekly zap-baseline.py

  • t http://172.17.0.2:8080/

# Shut down the application container

  • >

docker kill $(docker ps |grep mozilla/cutefox | awk '{print $1}')

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 25 of 49 06/07/2016 19:00
slide-26
SLIDE 26

26

PASS/FAIL OUTPUT, LIKE UNIT TESTS PASS/FAIL OUTPUT, LIKE UNIT TESTS

PASS: Absence of Anti-CSRF Tokens [40014] WARN: Web Browser XSS Protection Not Enabled [10016] x 3 http://172.17.0.2:8080/ http://172.17.0.2:8080//robots.txt http://172.17.0.2:8080//sitemap.xml

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 26 of 49 06/07/2016 19:00
slide-27
SLIDE 27

27

TEST DRIVEN SECURITY TEST DRIVEN SECURITY

Similar to TDD: Write the security tests rst, let them fail, implement the security control then verify the tests pass Security team writes the tests Developers implement the controls

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 27 of 49 06/07/2016 19:00
slide-28
SLIDE 28

28

WE ALSO ASK SAM TO WE ALSO ASK SAM TO KEEP HER APP UP TO DATE KEEP HER APP UP TO DATE

Node.JS: NSP, Greenkeeper.io Python: requires.io, pip --outdated Go: govend

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 28 of 49 06/07/2016 19:00
slide-29
SLIDE 29

29

TDS FOR DEPENDENCY MANAGEMENT TDS FOR DEPENDENCY MANAGEMENT

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 29 of 49 06/07/2016 19:00
slide-30
SLIDE 30

30

DEVELOPERS OWN THE OPERATIONAL SECURITY DEVELOPERS OWN THE OPERATIONAL SECURITY OF THEIR APPLICATION OF THEIR APPLICATION

We don't bolt it on top with WAFs and so on, we build security into the app directly

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 30 of 49 06/07/2016 19:00
slide-31
SLIDE 31

31

THEN WE DEPLOY THEN WE DEPLOY

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 31 of 49 06/07/2016 19:00
slide-32
SLIDE 32

32

MEET MAX MEET MAX

He's the Ops guy

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 32 of 49 06/07/2016 19:00
slide-33
SLIDE 33

33

MAX HAS TO WRITE ALL THE PROVISIONING MAX HAS TO WRITE ALL THE PROVISIONING CODE CODE

Build the AWS infra via cloudformation Setup the jenkins pipeline to for continuous deployment (Docker container deployed to EC2 instances with Jenkins, Ansible, Cloudformation and Puppet). He often helps the devs make architecture decisions, like how to use CDNs, caching, etc...

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 33 of 49 06/07/2016 19:00
slide-34
SLIDE 34

34 Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 34 of 49 06/07/2016 19:00

slide-35
SLIDE 35

35

WE HELP MAX WITH TOOLS... WE HELP MAX WITH TOOLS...

Managing secrets ( ) to prevent leaks Conguring good TLS on endpoints ( ) Disabling users that have left the company ( ) Building crypto services so services don't have to manage keys ( ) SOPS TLS Observatory Userplex Autograph

AND GUIDELINES AND GUIDELINES

Require that admin panel must be placed behind VPN Perform audits and incident response training with the teams etc...

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 35 of 49 06/07/2016 19:00
slide-36
SLIDE 36

36

SEC TEAM BUILDS SOLUTIONS SEC TEAM BUILDS SOLUTIONS TO HELP DEVOPS TO HELP DEVOPS

Dev or Ops come see us with a problem 1. We discuss it together 2. Sec or Dev team builds a solution that solve the issue 3. We generalize it so other teams can benet as well 4.

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 36 of 49 06/07/2016 19:00
slide-37
SLIDE 37

37

EXAMPLE: STORING SECRETS IN GIT EXAMPLE: STORING SECRETS IN GIT

Problem: secrets in cleartext les have a bad tendency to leak Solution: SOPS - encrypt all credentials, decrypt at provisioning

# The secrets below are unreadable without access to one of the sops maste myapp1: ENC[AES256_GCM,data:QsGJGjvQOpoVCIlrYTcOQEfQzriw,iv:ShmgdRNV6UrOJ2 app2: db: user: ENC[AES256_GCM,data:Arbb,iv:7bjm4ZaVFlxNk3O4M1P67TqfFtXTOHOe password: ENC[AES256_GCM,data:9/jSxNCq0A==,iv:5mk+GS016hKGj6gVfQD

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 37 of 49 06/07/2016 19:00
slide-38
SLIDE 38

38

TEST DRIVEN SECURITY FOR THE TEST DRIVEN SECURITY FOR THE INFRASTRUCTURE INFRASTRUCTURE

Test the TLS conguration daily (certicate, ciphersuites, ...) [future] Test security groups with [future] Test AWS IAM policies mozilla/build-fwunit

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 38 of 49 06/07/2016 19:00
slide-39
SLIDE 39

39

EXAMPLE: TESTING TLS CONFIGURATION EXAMPLE: TESTING TLS CONFIGURATION

$ tlsobs addons.mozilla.org [...]

  • -- Analyzers ---

* Mozilla evaluation: intermediate

  • for modern level: remove ciphersuites ECDHE-RSA-AES128-SHA, ECDHE-RSA
  • for modern level: consider adding ciphers ECDHE-ECDSA-AES256-GCM-SHA3
  • for modern level: remove protocols TLSv1, TLSv1.1
  • for modern level: consider enabling OCSP stapling
  • for modern level: use a certificate of type ecdsa, not RSA
  • oldest clients: Firefox 1, Chrome 1, IE 7, Opera 5, Safari 1, Windows
Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 39 of 49 06/07/2016 19:00
slide-40
SLIDE 40

WHEN TLS CONFIG TEST FAILS, WE DIRECT OPS WHEN TLS CONFIG TEST FAILS, WE DIRECT OPS TO THE CONFIG GENERATOR TO THE CONFIG GENERATOR

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 40 of 49 06/07/2016 19:00
slide-41
SLIDE 41 Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 41 of 49 06/07/2016 19:00
slide-42
SLIDE 42

IT'S LAUNCH DAY! FOXES EVERYWHERE! IT'S LAUNCH DAY! FOXES EVERYWHERE!

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 42 of 49 06/07/2016 19:00
slide-43
SLIDE 43 Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 43 of 49 06/07/2016 19:00
slide-44
SLIDE 44

42

UNTIL BAD GUYS START ATTACKING CUTEFOX UNTIL BAD GUYS START ATTACKING CUTEFOX

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 44 of 49 06/07/2016 19:00
slide-45
SLIDE 45

INCIDENT RESPONSE INCIDENT RESPONSE

NO ONE IN THE DEVOPS TEAM SLEEPS UNTIL THE FIRE IS OUT NO ONE IN THE DEVOPS TEAM SLEEPS UNTIL THE FIRE IS OUT

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 45 of 49 06/07/2016 19:00
slide-46
SLIDE 46

44

INCIDENTS SUCK INCIDENTS SUCK

but they are great for Team building: Nothing like going through hell together to build trust! Roadmaps: Incidents always bump up the priority of security features. Security maturity: no amount of testing compares to an incident to evaluate the reliability of a service.

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 46 of 49 06/07/2016 19:00
slide-47
SLIDE 47

45

CONTINUOUS SECURITY IS A CYCLE CONTINUOUS SECURITY IS A CYCLE

design new feature 1. assess risks 2. implement feature 3. test security 4. deploy 5. get attacked 6. ght back 7. learn 8. rinse and repeat 9.

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 47 of 49 06/07/2016 19:00
slide-48
SLIDE 48

46

SECURITY MUST BE PART OF THE PRODUCT SECURITY MUST BE PART OF THE PRODUCT

Not an afterthought built on top Be a member of the DevOps team Understand the roadmap Share the successes Share the failures Write code that makes things better It's not SecDevOps, it's just DevOps. Security is a natural component of it.

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 48 of 49 06/07/2016 19:00
slide-49
SLIDE 49

47

THANK YOU THANK YOU

jvehent.github.io/continuous-security-talk

Continuous Security in DevOps https://jvehent.github.io/continuous-security-talk/?print-pdf#/ 49 of 49 06/07/2016 19:00