Top Banner
Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev @SheHacksPurple Creating Secure Software
45

Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

Jun 02, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

Application Security 101

Tanya JancaSecurity Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

Creating Secure Software

Page 2: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

Page 3: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

What DevSecOps?

“AppSec in a DevOps environment.”

@SheHacksPurple

-Imran A. Mohammed

Page 4: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

What is “Pushing Left”?

@SheHacksPurple

If you imagine the SDLC written out on a piece of

paper, the further left you go, the earlier you are in the

System Development Life Cycle.

’Pushing Left’ means the security team wants to be

invited to the party earlier, and stay until the end.

Requirements Design Code Testing Release

Page 5: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

Application_____________________________________

Security

@SheHacksPurple

Page 6: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

How to ensure that

you are creating

secure software

@SheHacksPurple

Page 7: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

The mandatory “about me” slide.

I’m Tanya Janca.AKA: @SheHacksPurple

WoSEC

Security Trainer atSheHacksPurple.dev

Page 8: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

Page 9: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

The current state: Everyone is “getting hacked”

Page 10: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

Software Vulnerabilities Cause 29-40%~ of Breaches!Verizon Data Breach Investigation Report (DBIR) for 2016, 2017, 2018, 2019.

Page 11: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

AppSec is not covered in most post-secondary Comp-Sci and Soft-Eng programs

@SheHacksPurple

Page 12: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

Photo: #WOCTechChat @SheHacksPurple

Page 13: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

Dev / Ops / Sec

100 / 10 / 1

@SheHacksPurple

Page 14: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

The current state: We’re looking the wrong way.

Page 15: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

Page 16: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

The current state: Penetration Testing

Page 17: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

The current state: CIA

Page 18: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

What is “Pushing Left”?

@SheHacksPurple

If you imagine the SDLC written out on a piece of

paper, the further left you go, the earlier you are in the

System Development Life Cycle.

’Pushing Left’ means the security team wants to be

invited to the party earlier, and stay until the end.

Requirements Design Code Testing Release

Page 19: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

Fixing costs of quality & security issues rises significantly as the

development cycle advances

CODING PRODUCTIONQA & UATBUILD

Source: Ponemon Institute Research

$80/defect $240/defect $960/defect $7,600/defect

DevOps and the “Shift Left” principal

Page 20: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev
Page 21: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

An AppSec Program: Main Course

Page 22: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

• Vulnerability (VA) Scans and Assessments

• Threat Modeling

• Secure Code Reviews (Static Code Analysis)

• Penetration Tests (PenTests)

• This applies to both Custom Apps and COTS

An AppSec Program: Main Course

Page 23: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

An AppSec Program: The Gravy

Page 24: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

• Educating Developers on Secure Coding

Practices with workshops, talks, lessons

• Secure Coding Standards

• Responsible/Coordinated Disclosure

• Secure code library and other reference

materials, creating custom tools

An AppSec Program: The Gravy

Page 25: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

An AppSec Program: Dessert!

Page 26: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

• Bug Bounty Programs• Capture The Flag (CTF) contests• Red Team Exercises

@SheHacksPurple

An AppSec Program: Dessert!

Page 27: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

How can YOU be part of AppSec?

The Big Question…

Page 28: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

Learn all there

is to learn

Help every

time you can

Encourage

others to do

the right thing

Photo: #WOCTechChat

Page 29: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

YOU Pushing Left: Testing Your Code

Page 30: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

• Most people use a web proxy security scanner to test their web applications

• It sits between your browser and the internet

• It will automate tests for you, tell you what to fix, and, if it's a good one, HOW to fix the issues

• There are paid and free options available• Don't use a scanner on an app you don't

have permission to test, it's illegal@SheHacksPurple

YOU Pushing Left: Testing Your Code

Page 31: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

YOU Pushing Left: Testing Your Code

Caution

Page 32: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

• Ensure you have permission from your boss before you start, there may be policies against it (ask the security team too!)

• Be considerate, scanners can hog resources• Be careful, scanners can be destructive• Back up your data before hand• This is an activity that requires some learning

before you can start, to ensure you don't cause any damage or tick anyone off

• Inform security when you start and finish

YOU Pushing Left: Testing Your Code

Caution

Page 33: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

YOU Pushing Left: Threat Modelling

Page 34: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

• Figuring out negative use cases, and ways to defend against them

• Basically a brainstorming session with programmers and security to figure out how someone may try to abuse your app

• Search your code for these threats• Thinking like an adversary can not only

uncover potential issues, it can be fun and educational.

YOU Pushing Left: Threat Modelling

Page 35: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

YOU Pushing Left: Reviewing your code

Page 36: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

• Most people use a static code analyzer, but this can also be done manually

• Search for your threat models• Even the most expensive tool produces

many false positives, the 'work' in this exercise is figuring out what is a real issue and what is not

• OWASP Dependancy check• You can find more than just security bugs

YOU Pushing Left: Reviewing your code

Page 37: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

YOU Pushing Left: Writing better code

Page 38: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

YOU Pushing Left: Writing better code

• Train yourself on secure coding practices• There are many quality online resources,

free and paid, as well as courses and conferences

• Check online for the best and most secure way to do things, before you start coding

• Become the security expert on your dev team, and help the rest of your team learn

@SheHacksPurple

Page 39: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev
Page 40: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

Open Web Application Security Project

@SheHacksPurple

#OWASPlovehttps://owasp.org

meetup.com/OWASP-Victoria-Chapter/

Page 41: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple@WoSECtweets

Canada, France, USA, India,

Switzerland, Kenya, South

Africa, Sweden, Spain,

Australia, New Zealand,

Singapore, Bangladesh,

United Kingdom, Panama

www.meetup.com/

WoSEC-Victoria-Women-

of-Security-Victoria-BC/

Page 42: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

#MentoringMonday

EVERY MONDAY

Page 43: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

www.SheHacksPurple.dev

Twitter: @SheHacksPurple

https://dev.to/SheHacksPurple

https://YouTube.com/SheHacksPurple

Page 44: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

Page 45: Application Security 101web.uvic.ca/~garyperkins/Lecture 08 - Application Security 101.pdf · Application Security 101 Tanya Janca Security Trainer and Coach at SheHacksPurple.dev

@SheHacksPurple

Thank You

Security Training and Coaching

www.SheHacksPurple.dev

Tanya Janca

@SheHacksPurple

Slides: http://bit.ly/AppSec101