236
NEW ERA OF SOFTWARE WITH MODERN APPLICATION SECURITY VERSION 1.0 (19/MAR/2016) CODEMOTION ROME @DINISCRUZ

New Era of Software with modern Application Security v1.0

Embed Size (px)

Citation preview

Page 1: New Era of Software with modern Application Security v1.0

N E W E R A O F S O F T W A R E W I T H M O D E R N A P P L I C AT I O N S E C U R I T Y

V E R S I O N 1 . 0 ( 1 9 / M A R / 2 0 1 6 )

C O D E M O T I O N R O M E

@ D I N I S C R U Z

Page 2: New Era of Software with modern Application Security v1.0

C O U P L E D I S C L A M E R S

• This presentation has 233 slides and is designed to guide the delivery of this presentation and provide background information for offline reading

• I speak really fast (for an English audience)

• I have too much content - even when I deliver three-day courses :)

• I abuse the term ‘Unit Testing’ :

• for me the ‘Unit’ can be anything, from just a method to a full browser automation workflow

• if it can be executed with a Unit Test Framework (NUnit, Mocha, Karma) then it is a Unit Test ( even if it is called an e2e or Integration test)

Page 3: New Era of Software with modern Application Security v1.0

M E

• Developer for 25 years

• AppSec for 13 years

• Day jobs:

• Leader OWASP O2 Platform project

• Head of Application Security at The Hut Group

• Application Security Training for JBI Training

• AppSec Consultant and Mentor

Page 4: New Era of Software with modern Application Security v1.0

P E R F O R M E D H U N D R E D S O F S E C U R I T Y R E V I E W S

• Found critical vulnerabilities in high profile applications (impacting millions of users)

• desktop apps, websites, mobile apps, web services, security tools, frameworks, telephony, networks, etc…

• Reported zero days to software vendors (before bug bounties)

• 0wned data centres, networks, apps, databases

Page 5: New Era of Software with modern Application Security v1.0

D E L I V E R E D T R A I N I N G T O 1 0 0 0 S O F D E V E L O P E R S

• BBC

• BAE Applied Intelligence

• O2

• Alaska Airlines

• Ocado

• Capita (Orbit)

• BSkyB

• Harrods

• Microsoft

• Verifone

• OWASP Conferences

• BlackHat

• TotalJobs

• Cashflows

• RunEscape

• The Hut Group

Page 6: New Era of Software with modern Application Security v1.0

I ’ M A D E V E L O P E R

• Have shipped code

• Have managed dev teams

• Have written tests (with 100% code coverage)

• Have created CI and CD environments (DevOps)

• Worked on Secure Software Architecture and workflows (SecDevOps)

Page 7: New Era of Software with modern Application Security v1.0

G R A P H S

• I love Graphs

• Recently I have realised that I have spend most of my life thinking about graphs and coding graphs

• Graphs are great for data analysis and modelling

• … but this is a topic for another presentation

Page 8: New Era of Software with modern Application Security v1.0

@ D I N I S C R U Z

Page 9: New Era of Software with modern Application Security v1.0

B L O G . D I N I S C R U Z . C O M

Page 10: New Era of Software with modern Application Security v1.0

B O O K S

• Published at Leanpub (http://leanpub.com/u/DinisCruz)

• Minimum price: 0 €

Page 11: New Era of Software with modern Application Security v1.0

O W A S P O 2 P L AT F O R M

• My brain in a tool

• Very powerful but not easy to start using

Page 12: New Era of Software with modern Application Security v1.0

N E W E R A O F S O F T W A R E W I T H M O D E R N A P P L I C AT I O N S E C U R I T Y

Page 13: New Era of Software with modern Application Security v1.0

My thesis is that

Application Security can be used to define and measure Software Quality

Page 14: New Era of Software with modern Application Security v1.0

• TDD with Code Coverage

• Threat Models

• Docker and Containers

• Test Automation

• SAST/DAST/IAST/WAF

M O D E R N A P P L I C AT I O N S E C U R I T Y

• Clever Fuzzing

• JIRA Risk workflows

• Kanban for Quality fixes

• Web Services visualisation

• ELK

Page 15: New Era of Software with modern Application Security v1.0

J I R A W O R K F L O W

Page 16: New Era of Software with modern Application Security v1.0

lets start with a view of the problem

Page 17: New Era of Software with modern Application Security v1.0

S O F T W A R E I S E AT I N G AT TA C K I N G T H E W O R L D

Page 18: New Era of Software with modern Application Security v1.0

W H O I S AT TA C K I N G Y O U

Page 19: New Era of Software with modern Application Security v1.0

I F T H E AT TA C K E R T E L L S Y O U A B O U T T H E AT TA C K

Page 20: New Era of Software with modern Application Security v1.0

Y O U S H O U L D T H A N K T H E M

Page 21: New Era of Software with modern Application Security v1.0

The dangerous ones are the commercially focused

criminals

Page 22: New Era of Software with modern Application Security v1.0

It’s all about the money

Page 23: New Era of Software with modern Application Security v1.0
Page 24: New Era of Software with modern Application Security v1.0

… to hack you …

Page 25: New Era of Software with modern Application Security v1.0

Buy botnet for $110

Page 26: New Era of Software with modern Application Security v1.0

How much it cost to be an ‘internal user’

Page 27: New Era of Software with modern Application Security v1.0

100% Anti-virus non detection guarantee

Page 28: New Era of Software with modern Application Security v1.0

But the credit cards were protected

Page 29: New Era of Software with modern Application Security v1.0

E X A M P L E S O F AT TA C K S

Page 30: New Era of Software with modern Application Security v1.0

https://www.owasp.org/index.php/OWASP_WASC_Web_Hacking_Incidents_Database_Project

Page 31: New Era of Software with modern Application Security v1.0

S Q L I N J E C T I O N

Page 32: New Era of Software with modern Application Security v1.0

S Q L I N J E C T I O N T O O L - H AV I J

Page 33: New Era of Software with modern Application Security v1.0

XSS

Page 34: New Era of Software with modern Application Security v1.0

X S S AT TA C K - A PA C H E . O R G

https://blogs.apache.org/infra/entry/apache_org_04_09_2010

Page 35: New Era of Software with modern Application Security v1.0
Page 36: New Era of Software with modern Application Security v1.0

X S S W O R M - M Y S PA C E

Page 37: New Era of Software with modern Application Security v1.0

G E T PAY E D T O F I N D X S S

Page 38: New Era of Software with modern Application Security v1.0

Man-in-the-middle

Page 39: New Era of Software with modern Application Security v1.0

T J X ( PA R T O F T X M A X )

• 94 Million customer’s data compromised

• $256 Million USD Settlement with Visa, MasterCard, Customers

• Estimated cost to deal with incident (and improve security): 1 Billion USD

Page 40: New Era of Software with modern Application Security v1.0
Page 41: New Era of Software with modern Application Security v1.0
Page 42: New Era of Software with modern Application Security v1.0
Page 43: New Era of Software with modern Application Security v1.0
Page 44: New Era of Software with modern Application Security v1.0

D O N ’ T A C C E P T I T

Page 45: New Era of Software with modern Application Security v1.0
Page 46: New Era of Software with modern Application Security v1.0

AT TA C K I N G C A R S

Page 47: New Era of Software with modern Application Security v1.0

http://www.ioactive.com/pdfs/IOActive_Remote_Car_Hacking.pdf

Page 48: New Era of Software with modern Application Security v1.0

D o S

( D e n i a l o f S e r v i c e )

Page 49: New Era of Software with modern Application Security v1.0

S Y N F L O O D S ( c r a s h i n g t h e f i r e w a l l )

Page 50: New Era of Software with modern Application Security v1.0

Brute force attacks

Page 51: New Era of Software with modern Application Security v1.0

L O G I N AT T E M P T S

Page 52: New Era of Software with modern Application Security v1.0

Attacking the Cloud

Page 53: New Era of Software with modern Application Security v1.0

https://speakerdeck.com/silvexis/bringing-a-machete-to-the-amazon-blackhat-eu-2014

Page 54: New Era of Software with modern Application Security v1.0
Page 55: New Era of Software with modern Application Security v1.0

Google Dorks

Page 56: New Era of Software with modern Application Security v1.0
Page 57: New Era of Software with modern Application Security v1.0
Page 58: New Era of Software with modern Application Security v1.0

Punkspider

Page 59: New Era of Software with modern Application Security v1.0

Web crawler that performs penetration tests and indexes sites based on the

vulnerabilities they have.

UK sites that have XSS and SQL injection

Page 60: New Era of Software with modern Application Security v1.0

UK sites that have XSS and SQL injection

Page 61: New Era of Software with modern Application Security v1.0

Attacking the Internet of Things (IoT)

Page 62: New Era of Software with modern Application Security v1.0
Page 63: New Era of Software with modern Application Security v1.0

Cyberwar

Page 64: New Era of Software with modern Application Security v1.0
Page 65: New Era of Software with modern Application Security v1.0

Attacking markets

Page 66: New Era of Software with modern Application Security v1.0

R U S S I A N H A C K E R S M O V E D R U B L E R AT E W I T H M A LW A R E

• http://www.bloomberg.com/news/articles/2016-02-08/russian-hackers-moved-currency-rate-with-malware-group-ib-says

Page 67: New Era of Software with modern Application Security v1.0
Page 68: New Era of Software with modern Application Security v1.0
Page 69: New Era of Software with modern Application Security v1.0

A G U Y C H A L L E N G E D H A C K E R S AT D E F C O N T O H A C K H I M …

https://www.youtube.com/watch?v=bjYhmX_OUQQ

Page 70: New Era of Software with modern Application Security v1.0

Attacks coming soon…

Page 71: New Era of Software with modern Application Security v1.0

1. Mass supermarket failure (no food, milk, water available)

2. Bank or Financial Company collapse

3. Fabricated News

4. Mass loss, sale and exploitation of Individuals Private information

Page 72: New Era of Software with modern Application Security v1.0

5. Mass Identify Theft!

• Can you prove that YOU are YOU? • What if the ‘Computer says differently’? • What if your picture ‘in the computer’ is modified? • What if your date-of-birth and family name are modified? • What if you are shown as DEAD in the system? • How many databases would it take to kill you digitally • What if there is NO record at ALL that you ever existed?

• in ID database • in Financial database • in Hospital databases • etc...?

Page 73: New Era of Software with modern Application Security v1.0

6. Medical systems exploitation:

• Wrong medicaments delivered, sold

• Manipulating hospital systems

• Corruption of medial records

• Sale of medial records

7. Car/Plane/Train crashes:

• all lights are made green at the same time

• maintenance records are fiddled or manipulated (Fake parts scam)

• Remote control and manipulation

• Manipulation of traffic guidance systems

Page 74: New Era of Software with modern Application Security v1.0

8. ID cards/Passport exploits

• Government loses ability to issue new ID cards

• Massive ID Card fraud

9. Companies are selling Fake ID carts with no ability to stop them

10.No Cashpoints

11.New laws introduced in parliament (without formal discussion/approval)

12.Fighter jet fires missile into crowd / building / city

Page 75: New Era of Software with modern Application Security v1.0

13. Mass hysteria at stadium, where a big message on screen says:

•"...RUN!!!!!! The stadium is going to blow in 2 minutes..."

•"...There is a terrorist in the stadium, here is his picture! Find him and kill him!!..."

14. Water poisoning

15. Manipulation of controls that introduce or remove chemicals in water

16. Attacks on electric grid

17. Mass compromise of online email systems

18. Corruption of Inland Revenue database (if they did not know who owed what and they could not be able to collect money from taxes)

19. Websites massively attack users and users are afraid to go online

20. Localised or global Internet shutdowns

Page 76: New Era of Software with modern Application Security v1.0

I think you get the idea

for more examples read:

Page 77: New Era of Software with modern Application Security v1.0

TA L K TA L K

Page 78: New Era of Software with modern Application Security v1.0
Page 79: New Era of Software with modern Application Security v1.0
Page 80: New Era of Software with modern Application Security v1.0
Page 81: New Era of Software with modern Application Security v1.0
Page 82: New Era of Software with modern Application Security v1.0

Where is AppSec?

Page 83: New Era of Software with modern Application Security v1.0
Page 84: New Era of Software with modern Application Security v1.0
Page 85: New Era of Software with modern Application Security v1.0
Page 86: New Era of Software with modern Application Security v1.0

http://www.parliament.uk/business/committees/committees-a-z/commons-select/culture-media-and-

sport-committee/inquiries/parliament-2015/cyber-security-15-16/

Page 87: New Era of Software with modern Application Security v1.0
Page 88: New Era of Software with modern Application Security v1.0
Page 89: New Era of Software with modern Application Security v1.0
Page 90: New Era of Software with modern Application Security v1.0
Page 91: New Era of Software with modern Application Security v1.0

“After police & PWC investigation TalkTalk CEO admits firm 'underestimated' cybersecurity and touts change in culture”

“Investigation by PwC shown TalkTalk has been acting like a startup rather than a major company, (new services, innovate, move fast) and they saw security as a technology issue, not a business one and underestimated the challenge.”

Page 92: New Era of Software with modern Application Security v1.0

…moving on to user’s identities

Page 93: New Era of Software with modern Application Security v1.0

H AV E Y O U B E E N P W N E D ?

Page 94: New Era of Software with modern Application Security v1.0
Page 95: New Era of Software with modern Application Security v1.0
Page 96: New Era of Software with modern Application Security v1.0
Page 97: New Era of Software with modern Application Security v1.0
Page 98: New Era of Software with modern Application Security v1.0
Page 99: New Era of Software with modern Application Security v1.0
Page 100: New Era of Software with modern Application Security v1.0
Page 101: New Era of Software with modern Application Security v1.0
Page 102: New Era of Software with modern Application Security v1.0
Page 103: New Era of Software with modern Application Security v1.0
Page 104: New Era of Software with modern Application Security v1.0
Page 105: New Era of Software with modern Application Security v1.0
Page 106: New Era of Software with modern Application Security v1.0
Page 107: New Era of Software with modern Application Security v1.0

B U G B O U N T I E S

Page 108: New Era of Software with modern Application Security v1.0

Bug bounties are a sign of

Application Security

Maturity

Page 109: New Era of Software with modern Application Security v1.0

If you don’t have one

you are saying

… I’m a good target to attack …

Page 110: New Era of Software with modern Application Security v1.0
Page 111: New Era of Software with modern Application Security v1.0
Page 112: New Era of Software with modern Application Security v1.0

G I T H U B

Page 113: New Era of Software with modern Application Security v1.0

G O O G L E

Page 114: New Era of Software with modern Application Security v1.0
Page 115: New Era of Software with modern Application Security v1.0

L E T ’ S H A C K ( A L I T T L E B I T ) H T T P : / / N E W S . B B C . C O . U K

H T T P : / / M A N I F E S T O . S O F T W A R E C R A F T S M A N S H I P. O R G /

Demo

Page 116: New Era of Software with modern Application Security v1.0

…..basically…..

Page 117: New Era of Software with modern Application Security v1.0
Page 118: New Era of Software with modern Application Security v1.0

…..but…..

Page 119: New Era of Software with modern Application Security v1.0

D O N T PA N I C

Page 120: New Era of Software with modern Application Security v1.0

Unless you are directly targeted …

Page 121: New Era of Software with modern Application Security v1.0

…the probability of you, your company or your apps

being attacked

is still low

Page 122: New Era of Software with modern Application Security v1.0

… not because you are secure

Page 123: New Era of Software with modern Application Security v1.0

… but because there are not enough attackers

Page 124: New Era of Software with modern Application Security v1.0

… and the business model of the current attackers has not evolved to the next level

(where they find a way to make money with your assets)

Page 125: New Era of Software with modern Application Security v1.0

N E W G E N E R AT I O N O F A P P L I C AT I O N S E C U R I T Y T H I N K I N G

Page 126: New Era of Software with modern Application Security v1.0

1.TDD with Code Coverage

2.Threat Models

3.Docker and Containers

4.Test Automation

5.SAST/DAST/IAST/WAF

6.Clever Fuzzing

7.JIRA Risk workflows

8.Kanban for Quality fixes

9.Web Services visualisation

10.ELK

Page 127: New Era of Software with modern Application Security v1.0

These tools/techniques are designed to

A) Improve code Quality

B) Make AppSec possible

Page 128: New Era of Software with modern Application Security v1.0

1 ) T D D W I T H C O D E C O V E R A G E

• All code changes must have tests

• Code Coverage is key to understand the impact of those changes

• Devs, QA and Security teams should be communicating using tests

Page 129: New Era of Software with modern Application Security v1.0

2 ) T H R E AT M O D E L S

Page 130: New Era of Software with modern Application Security v1.0

2 ) T H R E AT M O D E L S

• Are ‘technical briefs’ (i.e. better briefs)

• Should be the ‘source of truth’ in an organisation about their apps and code

• Should be done for:

• Applications

• Components

• Features

Page 131: New Era of Software with modern Application Security v1.0

3 ) D O C K E R A N D C O N TA I N E R S

Page 132: New Era of Software with modern Application Security v1.0

3 ) D O C K E R A N D C O N TA I N E R S

• Provide repeatable and destroyable QA environments

• Enable DevOps

• Next paradigm of Secure Applications

• Dramatically improve the quality and resilience of Tests

Page 133: New Era of Software with modern Application Security v1.0

4 ) S A S T / D A S T / I A S T / W A F

• SAST - Static Application Security Testing

• DAST - Dynamic Application Security Testing

• IAST - Interactive Application Security Testing

• WAF - Web Application Security Firewall

Page 134: New Era of Software with modern Application Security v1.0

5 ) T E S T A U T O M AT I O N

• Tests must run automatically on all commits of all branches

• AppSec tests must be used to ‘identify changes to attack surface’

• Empower two CI pipelines

• Super fast - push to production

• Pause - needs review

Page 135: New Era of Software with modern Application Security v1.0

5 ) C L E V E R F U Z Z I N G

Page 136: New Era of Software with modern Application Security v1.0

6 ) J I R A R I S K W O R K F L O W S

Page 137: New Era of Software with modern Application Security v1.0

7 ) K A N B A N F O R Q U A L I T Y F I X E S

• SCRUM tends to be more of a Religion than Agile

• Kanban WIP (Work in Progress) is key for Application Security Fixes

Page 138: New Era of Software with modern Application Security v1.0

8 ) W E B S E R V I C E S V I S U A L I S AT I O N

Page 139: New Era of Software with modern Application Security v1.0

9 ) E L K

• ElasticSearch + LogStash + Kibana • Use it everywhere and everybody customises it • Also for developers (not just Ops)

Page 140: New Era of Software with modern Application Security v1.0

Just to say it again ….

These tools/techniques are designed to

A) Improve code Quality

B) Make AppSec possible

Page 141: New Era of Software with modern Application Security v1.0

Without them you are not really doing

Application Security

Page 142: New Era of Software with modern Application Security v1.0

… and you have a

Development Problem

not an

Application Security Problem

Page 143: New Era of Software with modern Application Security v1.0

A P P S E C A N D Q U A L I T Y

Page 144: New Era of Software with modern Application Security v1.0

Software Craftsmanship is about

Software Quality

Page 145: New Era of Software with modern Application Security v1.0

“I like my code to be elegant and efficient" Bjarne Stroustup, inventor of C++

“Clean code is simple and direct. Clean code reads like well-designed prose”

Grady Booch, author

“Clean code can be read, and enhanced by a developer other than its original author”

”Big” Dave Thomas, founder of OTI

“Clean code always looks like it was written by someone that how cares”

Michael Feathers, author

“You know you are working on clean code when each routine you read turns out to be pretty much what you expected”

Ward Cunningham, inventor of Wiki

Page 146: New Era of Software with modern Application Security v1.0

a big problem with the previous comments and the Software Craftsmanship concept is

‘How to define Quality?’

Page 147: New Era of Software with modern Application Security v1.0

Everybody knows that Quality is key

… but …

‘how to measure Quality?’

Page 148: New Era of Software with modern Application Security v1.0

My thesis is that

Application Security can be used to define and measure Software Quality

Page 149: New Era of Software with modern Application Security v1.0

Not all Software Quality issues are Application Security issues

But all Application Security issues are

Software Quality issues

S h e r i f M a n s o u r, E x p e d i a

Page 150: New Era of Software with modern Application Security v1.0

Application Security is all about the

non-functional requirements of software*

* s o f t w a r e = a p p s , w e b s i t e s , w e b s e r v i c e s , a p i s , t o o l s , b u i l d s c r i p t s = c o d e

Page 151: New Era of Software with modern Application Security v1.0

Application Security is all about understanding

HOW the software works*

* v s h o w s o f t w a r e b e h a v e s

Page 152: New Era of Software with modern Application Security v1.0

Using Application Security

I can measure the quality of software

Page 153: New Era of Software with modern Application Security v1.0

Because Application Security

measures the unintended side effects of coding

Page 154: New Era of Software with modern Application Security v1.0

T H E P O L L U T I O N A N A L O G Y

Page 155: New Era of Software with modern Application Security v1.0

T E C H N I C A L D E B T I S A B A D A N A L O G Y

• The developers are the ones who pays the debt

• Pollution is a much better analogy

• The key is to make the business accept the risk (i.e the debt)

• Which is done using the JIRA RISK Workflows

Page 156: New Era of Software with modern Application Security v1.0

W R I T I N G S E C U R E C O D E M Y T H

Page 157: New Era of Software with modern Application Security v1.0

“If only software developers had security knowledge they would be able write secure code”

Page 158: New Era of Software with modern Application Security v1.0

This is a myth because secure code has little to do with developer’s skills and craftsmanship

Page 159: New Era of Software with modern Application Security v1.0

Software security (or insecurity) is a consequence of the Software development environment

(namely the business and managers focus)

Page 160: New Era of Software with modern Application Security v1.0

And I know that this is a myth because

I cannot write ‘secure code’

when I’m programming

Page 161: New Era of Software with modern Application Security v1.0

J I R A R I S K W O R K F L O W

Page 162: New Era of Software with modern Application Security v1.0

http://blog.diniscruz.com/2016/03/updated-jira-risk-workflow-now-with.html

Page 163: New Era of Software with modern Application Security v1.0

‘ F I X I N G ’ F L O W

Page 164: New Era of Software with modern Application Security v1.0

`

‘ R I S K A P P R O VA L’ F L O W

Page 165: New Era of Software with modern Application Security v1.0

F U L L W O R K F L O W ( f r o m D e v p o i n t o f v i e w )

1. Vulnerability/issue is found (RISK ticket opened) 

2. Dev understands the issue, writes test that replicates the issue, opens ticket in his project’s JIRA and tries to figure out the best way to fix it 

3. Dev asks for guidance to AppSec team

4. AppSec team points to WIKI page (existing or newly created)

5. Dev uses guidance to fix it (and updates test so that is is now a regression test)

6. Commit(s) are made, RISK ticket is updated with link to commit(s)

7. Dev asks AppSec to review fix

8. AppSec reviews fix, and if all looks ok, close the RISK ticket

Page 166: New Era of Software with modern Application Security v1.0

M A P P I N G T O I N F O S E C R I S K S

Labels for reporting

and filters

Page 167: New Era of Software with modern Application Security v1.0

M A P P I N G J I R A T I C K E T S T O T E S T S

Page 168: New Era of Software with modern Application Security v1.0

J I R A D A S H B O A R D S

Page 169: New Era of Software with modern Application Security v1.0

W E E K LY E M A I L S W I T H R I S K S TAT U S

Page 170: New Era of Software with modern Application Security v1.0

K E Y C O N C E P T S O F T H I S W O R K F L O W

• All tests should pass all the time

• Tests that check/confirm vulnerabilities should also pass

• The key to make this work is to: Make business owners understand the risks of their decisions (and click on the ‘accept risk’ button)

Page 171: New Era of Software with modern Application Security v1.0

You have to make sure that it is your boss that gets fired

Page 172: New Era of Software with modern Application Security v1.0

… he/she should make sure that it is his/hers boss that gets fired …

Page 173: New Era of Software with modern Application Security v1.0

… all the way to the CTO

(i.e. Board level responsibility)

Page 174: New Era of Software with modern Application Security v1.0

T E S T I N G

Page 175: New Era of Software with modern Application Security v1.0

If you make a change and don’t have a test

You are making random changes

Page 176: New Era of Software with modern Application Security v1.0

http://blog.kj187.de/how-do-i-convince-my-manager-that-unittests-are-important/

How to solve this problem?

Page 177: New Era of Software with modern Application Security v1.0

You don’t

You sack your manager

Page 178: New Era of Software with modern Application Security v1.0

As a developer you need to have pressure from management to deliver code that is:

Solid Secure

Testable Provable Readable

Maintainable

Basically, deliver Quality Code

Page 179: New Era of Software with modern Application Security v1.0

9 9 % C O D E C O V E R A G E

…is not the destination

…it is ‘base camp’

Page 180: New Era of Software with modern Application Security v1.0

With 99% code coverage you are here

Page 181: New Era of Software with modern Application Security v1.0

Without 99% code coverage

you have not solved really hard problems in the testability of your

code

Page 182: New Era of Software with modern Application Security v1.0

Import note:

If 99% code coverage is just an ‘management requirement’

… and is being gamed by devs

… and you have LOTS of stupid ‘Unit tests’

i.e. 99 x 1% code coverage or999 x 0.1 % code coverage

Page 183: New Era of Software with modern Application Security v1.0

then you also need to sack your manager

Page 184: New Era of Software with modern Application Security v1.0

You manager’s job is to help you to deliver:

Solid Secure

Testable Provable Readable

Maintainable

Code

Page 185: New Era of Software with modern Application Security v1.0

To make testing effective …

…testing (from Unit Testing to Integration tests) needs to done in

the IDE with real-time execution and Code coverage

Page 186: New Era of Software with modern Application Security v1.0

Q A , R E G R E S S I O N A N D S E C U R I T Y T E S T S

Page 187: New Era of Software with modern Application Security v1.0

Wallaby’s realtime Unit test Execution

and Code Coverage

Page 188: New Era of Software with modern Application Security v1.0

M I S S I N G T E S T S ( a n d 1 0 0 % c o d e c o v e r a g e )

Page 189: New Era of Software with modern Application Security v1.0
Page 190: New Era of Software with modern Application Security v1.0
Page 191: New Era of Software with modern Application Security v1.0
Page 192: New Era of Software with modern Application Security v1.0
Page 193: New Era of Software with modern Application Security v1.0
Page 194: New Era of Software with modern Application Security v1.0
Page 195: New Era of Software with modern Application Security v1.0
Page 196: New Era of Software with modern Application Security v1.0
Page 197: New Era of Software with modern Application Security v1.0
Page 198: New Era of Software with modern Application Security v1.0
Page 199: New Era of Software with modern Application Security v1.0
Page 200: New Era of Software with modern Application Security v1.0
Page 201: New Era of Software with modern Application Security v1.0

R E A L W O R L D M U TAT I O N T E S T I N G

• http://pitest.org/

Page 202: New Era of Software with modern Application Security v1.0

W H Y D O A P P L I C AT I O N S E C U R I T Y ?

Page 203: New Era of Software with modern Application Security v1.0

Because you care about:

your usersgood engineering your application your company

Page 204: New Era of Software with modern Application Security v1.0

You have been lucky so far due to lack of commercially focused

attackers

Page 205: New Era of Software with modern Application Security v1.0

This has been a

Blessing and Curse

Page 206: New Era of Software with modern Application Security v1.0

You are making an

Hedged bet

Page 207: New Era of Software with modern Application Security v1.0

the

Security of your code vs

Skill and motivation of attacks

will not change in next 2 years

Your hedge bet is that :

Page 208: New Era of Software with modern Application Security v1.0

Most of you are creating the perfect storm ….

Page 209: New Era of Software with modern Application Security v1.0

User personalisation +

Digital Payments +

APIs

Page 210: New Era of Software with modern Application Security v1.0

How insecure is your code?

How many risks/vulnerabilities are you aware of?

And have Accepted?

Page 211: New Era of Software with modern Application Security v1.0

How long does it take you to

Fix Security/Quality

issues?

Page 212: New Era of Software with modern Application Security v1.0

E X T E R N A L S I G N S O F L A C K O F F O C U S & L A C K O F A P P S E C P O W E R

• Not 100% SSL (with HSTS and Secure Cookies)

• No consolidation of Javascripts, which implies No CI (Continuous Integration)

• Cookie Salad (caused by lack of State Service in back end)

• Easy DoS by normal business activities

• “We’re hiring for AppSec” jobs posts

• Easy-to-find vulnerabilities (low-hanging-fruit)

• No public bug bounty

Page 213: New Era of Software with modern Application Security v1.0

D O E S Y O U R C O M PA N Y / T E A M H AV E :

• AppSec team/person

• Security Champion

• Secure coding standards

• Threat Models

• OWASP contributors

• Secure code reviews

Page 214: New Era of Software with modern Application Security v1.0

If your answer was not YES to all of them...

then

Your Application WILL have a high number of Security Vulnerabilities

Page 215: New Era of Software with modern Application Security v1.0

And you need to invest in Application Security

Which if done correctly will improve the Quality of your code

Page 216: New Era of Software with modern Application Security v1.0

M A N A G E R S A N D B U S I N E S S O W N E R S

Page 217: New Era of Software with modern Application Security v1.0

S E N I O R M A N A G E M E N T O V E R S I G H T

• ‘Security Memo’ (from God)

• Incident response plans

• Emergency response exercises (can you detect them?)

• Cyber Insurance

• Enterprise Cyber Risk management

• Which C-level executive will get fired?

Page 218: New Era of Software with modern Application Security v1.0

6 M O N T H A P P S E C I N V E S T M E N T

What Description Cost

Head Of Appsec 1 x person £100K

Senior Developers 2 x persons £120K

Appsec Ops 2 x persons £80K

External Security Company 100 x days £100K

Security ToolsStatic, Dynamic, Interactive

Scanners£100K

Dev App Sec ToolsCI , Collaboration, Cloud,

IDE plugins £50K

EducationTraining, Conferences, Bug

Bounties, £50K

Total £600K

Page 219: New Era of Software with modern Application Security v1.0

W E H AV E S O L U T I O N S

Page 220: New Era of Software with modern Application Security v1.0

O W A S P ! ! ! !

Page 221: New Era of Software with modern Application Security v1.0

G R E AT P R E S E N TAT I O N O N S E C D E V O P S

https://www.youtube.com/watch?v=jQblKuMuS0Y

Page 222: New Era of Software with modern Application Security v1.0

O p e n S A M M ( S e c u r i t y A s s u r a n c e S e c u r i t y M o d e l )

https://www.owasp.org/index.php/Category:Software_Assurance_Maturity_Model

Page 223: New Era of Software with modern Application Security v1.0

B S I M M ( B u i l d i n g S e c u r i t y i n M a t u r i t y M o d e l )

Page 224: New Era of Software with modern Application Security v1.0

S E C U R I T Y D E V E L O P M E N T L I F E C Y C L E

https://www.microsoft.com/en-us/sdl/process/design.aspx

Page 225: New Era of Software with modern Application Security v1.0

T I P S F O R B U I L D I N G A M O D E R N S E C U R I T Y E N G I N E E R I N G O R G A N I S AT I O N

https://georgianpartners.com/tips-for-building-a-modern-security-engineering-organization

Page 226: New Era of Software with modern Application Security v1.0

H O W T O B U I L D S E C U R E W E B A P P L I C AT I O N

http://blog.knoldus.com/2016/02/03/how-to-build-secure-web-application/

Page 227: New Era of Software with modern Application Security v1.0

N E W S E C U R I T Y S E R V I C E S - 2 FA

Page 228: New Era of Software with modern Application Security v1.0

D E P L O Y, D E P L O Y, D E P L O Y

• Push to production and refactor without fear

• Be like GitHub and use CI/CD to deploy 175 times in one day and 12,602 times in one year

https://github.com/blog/1241-deploying-at-github

Page 229: New Era of Software with modern Application Security v1.0

• https://labs.spotify.com/2014/03/27/spotify-engineering-culture-part-1/

Page 230: New Era of Software with modern Application Security v1.0

• https://labs.spotify.com/2014/09/20/spotify-engineering-culture-part-2/

Page 231: New Era of Software with modern Application Security v1.0

F I N A L T H O U G H T S

Page 232: New Era of Software with modern Application Security v1.0

U N W R I T T E N R U L E S O F A P I S

“Every API is destined to be connected to the internet”

Page 233: New Era of Software with modern Application Security v1.0

U N W R I T T E N R U L E S O F A P I S

“All API data wants to be exposed in a Web Page”

Page 234: New Era of Software with modern Application Security v1.0

“Would you fly in a plane that has the code quality of your APIs”

Page 235: New Era of Software with modern Application Security v1.0

Application Security

can be used to

define and measure

Software Quality

Page 236: New Era of Software with modern Application Security v1.0

Thanks, any questions?