Slide 1

Slide 1 text

Application Security In an Agile World

Slide 2

Slide 2 text

Stefan Streichsbier CTO at Vantage Point Twitter: @s_streichsbier

Slide 3

Slide 3 text

A brief history of AppSec

Slide 4

Slide 4 text

✤ Let’s start with what it is not: • Firewalls, secure network protocols, • Antivirus and Phishing attacks • Intrusion Detection • SoCs, ... What is AppSec?

Slide 5

Slide 5 text

Firewall is locked down tight, ...only 443 is open…

Slide 6

Slide 6 text

✤ Application Security is: • A quality aspect of your application • And contributes to the business success the same way UX Design, Usability and Performance do. • In other words, is my application used the way it is intended to. What is AppSec?

Slide 7

Slide 7 text

✤ Security was traditionally in the hands of Network folks • Suddenly, they become responsible for applications... • ... And applied the same audit-like principals. Why AppSec == Pain?

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

✤ Things slowly evolved • From performing “Penetration Tests” once a year • To doing a Pentest for every release (a few times a year) Pentest to the rescue Great, we all love Pentests, right?

Slide 10

Slide 10 text

Pentesters after turning a report in...

Slide 11

Slide 11 text

Security

Slide 12

Slide 12 text

Meanwhile outside the security camp ...

Slide 13

Slide 13 text

0 20 40 60 80 100 120 140 2005 2010 2015 2020 The frequency of releases over time Releases per app per year Towards CD From Waterfall The frequency increased

Slide 14

Slide 14 text

14 So many releases?!

Slide 15

Slide 15 text

Security DevOps

Slide 16

Slide 16 text

16 Agile + DevOps + Security = DevSecOps

Slide 17

Slide 17 text

Step 1: Security as part of Agile

Slide 18

Slide 18 text

1-4 Weeks 24 hours Develop Test Design Plan Output Shippable Increment Product Backlog Sprint Backlog Let’s look at SCRUM Start with understanding the process

Slide 19

Slide 19 text

✤ No more pdf/doc/xls! ✤ Security uses the same language as the dev team. ✤ Security as part of existing environments/workflows. ✤ Security work is completed in-cycle. ✤ Not all apps have the same security requirements. Some general hygiene

Slide 20

Slide 20 text

0x 5x 10x 15x 20x 25x 30x 35x Requirements/Design Coding Integration Testing Acceptance Testing Production Relative Cost to fix, based on time of detection Penetration Testing Source: NIST Relative Cost

Slide 21

Slide 21 text

1-4 Weeks 24 hours Develop Test Design Plan Output Shippable Increment Product Backlog Sprint Backlog Secure SCRUM Security Training Security Requirements Security Activities Threat Modelling Design Review Pairing Manual Security Tests Automatic Security Tests Security Feature Demo Security Retrospective Security Acceptance Criteria

Slide 22

Slide 22 text

(Security) Training

Slide 23

Slide 23 text

Are all security requirements non-functional?

Slide 24

Slide 24 text

✤ Functional security requirement are related to: - Authentication & Access Control - Data Integrity - Wrong password lockouts ✤ Non-functional requirements are related to: - Password policies - Characteristics of audit logs - Backups Functional vs Non-Functional

Slide 25

Slide 25 text

• It all starts with the backlog & security is a part of this: • 1. As an anonymous user I want to see the entire book selection, ... • 2. As a logged-in user I want to see my entire purchase history, ... • 3. As a customer I want to ensure my privacy when using a public wifi , ... (Security) Requirements - User Story and it’s acceptance criteria is unrelated to security - User Story and it’s acceptance criteria is security sensitive [tagged] - “One-off” (Security) User story [tagged]

Slide 26

Slide 26 text

v Architecture & Design Review & Threat Modelling Think like a hacker v Design Guidelines are invaluable. Use existing design patterns v Helps to reducing the ongoing amount of work Secure by Design

Slide 27

Slide 27 text

✤ Assorted Secure Coding Guidelines in the repo ✤ Pairing for more complex stories ✤ Pull requests for security relevant stories are reviewed - Code reviews are important (especially for increased speed). Secure Coding

Slide 28

Slide 28 text

99% of unit tests passed

Slide 29

Slide 29 text

✤ Code coverage is key aspect of quality 100% is just the beginning ✤ Security related acceptance criteria makes a difference Both for manual and automated tests ✤ The more that is automated the better Security Unit Tests

Slide 30

Slide 30 text

✤ Open source projects can help - Gauntlt - BDD-Security Security Unit Tests

Slide 31

Slide 31 text

✤ Continue demonstrating the new attributes/features and their impact on users ✤ What were the security considerations for this new feature ✤ In the retrospective share those lessons learned Sprint Review & Retro

Slide 32

Slide 32 text

Is security hard?

Slide 33

Slide 33 text

0 20 40 60 80 100 120 Jan March May July September November % Remaining Security work % App Robustness, Security Skills Security Debt Burndown

Slide 34

Slide 34 text

Step 2: DevSecOps

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

Vulnerability Repository • Security Unit Tests • SAST • SCA • DAST • IAST • VA • Security as Code • RASP • NG WAF • Red Team • GOPT • Actual Attackers • Sec Requirements • Design Review • Threat Modelling AppSec Pipeline

Slide 39

Slide 39 text

Instead of this ...

Slide 40

Slide 40 text

...Let’s do this...

Slide 41

Slide 41 text

Announcements DevSecCon Asia 2017

Slide 42

Slide 42 text

✤ Start with embedding your friendly AppSec guy ✤ Transfer knowledge, find a security champion ✤ Step back and advise ✤ Iterate continuously– don’t go for big bang ✤ Keep adding automation ✤ Churn out awesome (& secure) releases at the speed of DevOps From Zero to Hero

Slide 43

Slide 43 text

[email protected] @s_streichsbier Stefan Streichsbier https://devsecopssg.herokuapp.com Questions?

Slide 44

Slide 44 text

References • https://www.infoq.com/presentations/Facebook-Moving-Fast-at-Scale • Jeff Williams: 2013 Appsec USA: https://www.youtube.com/watch?v=cIvOth0fxmI&t=377 • http://blog.diniscruz.com • https://www.owasp.org/index.php/OWASP_AppSec_Pipeline • http://www.slideshare.net/SeniorStoryteller/amy-demartine-7-habits-of-rugged-devops