security bootcamp for startups and small businesses

82
Alison Gianotto @snipeyhead SECURITY BOOTCAMP FOR STARTUPS (and Small Businesses)

Upload: alison-gianotto

Post on 09-Apr-2017

188 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Security Bootcamp for Startups and Small Businesses

Alison Gianotto @snipeyhead

SECURITY BOOTCAMP FOR STARTUPS

(and Small Businesses)

Page 2: Security Bootcamp for Startups and Small Businesses

Alison Gianotto (aka “snipe”)WHO AM I?• FormeragencyCTO/CSO•CTOofAnysha.re•CreatorofSnipe-ITFOSSproject• Security&privacyadvocate•20yearsinITandsoftwaredev•Co-authorofafewPHP/MySQLbooks•@snipeyheadonTwitter

2DomCode2016-Utrecht-#DomCode16

Page 3: Security Bootcamp for Startups and Small Businesses

3

Page 4: Security Bootcamp for Startups and Small Businesses

WHAT IS RISK?

4DomCode2016-Utrecht-#DomCode16

Risk is the combination of threat, vulnerability, and mission impact.

Page 5: Security Bootcamp for Startups and Small Businesses

WHAT KINDS OF THREATS?

5DomCode2016-Utrecht-#DomCode16

•Notalwayshackers•Physicalthreats:naturaldisasters,suchasflood,fire,earthquakes,etc• Logicalthreats:bugsinhardware,powerfailures•Humanthreats:non-maliciousandmaliciousthreats,suchasdisgruntledemployeesandhackers

Page 6: Security Bootcamp for Startups and Small Businesses

RISK TOLERANCE

6DomCode2016-Utrecht-#DomCode16

If vulnerability is high, but mission impact is low, you can probably tolerate that risk.

Page 7: Security Bootcamp for Startups and Small Businesses

ONE SIZE DOES NOT FIT ALL

7DomCode2016-Utrecht-#DomCode16

Risk looks different for each organization.

Page 8: Security Bootcamp for Startups and Small Businesses

IT IS IMPOSSIBLE TO ANTICIPATE OR MITIGATE EVERY RISK.

8DomCode2016-Utrecht-#DomCode16

Page 9: Security Bootcamp for Startups and Small Businesses

WHY SHOULD YOU CARE?

9DomCode2016-Utrecht-#DomCode16

Security breaches cost a company reputation, money, time & trust.

Page 10: Security Bootcamp for Startups and Small Businesses

WHY SHOULD YOU CARE?

10DomCode2016-Utrecht-#DomCode16

Identity theft and security vulnerabilities affect the lives of real people - your users.

Page 11: Security Bootcamp for Startups and Small Businesses

WHY SHOULD YOU CARE?

11DomCode2016-Utrecht-#DomCode16

Source:ForbesMagazine,Aug3,2013

Page 12: Security Bootcamp for Startups and Small Businesses

WHY SHOULD YOU CARE?

12DomCode2016-Utrecht-#DomCode16

Source:BoingBoing-Nov3,2016

Page 13: Security Bootcamp for Startups and Small Businesses

WHY SHOULD YOU CARE?

13DomCode2016-Utrecht-#DomCode16

Even if your product can’t be weaponized, the data you store and the trust your users have in you can be.

Page 14: Security Bootcamp for Startups and Small Businesses

14DomCode2016-Utrecht-#DomCode16

GDPR•Goesintoeffect2018•Couldresultinfinesof€20mor4%ofyourannualturnover,whicheverisGREATER

(General Data Protection Regulation)

Page 15: Security Bootcamp for Startups and Small Businesses

In 2013, 61% of reported attacks targeted small and medium businesses, UP from 50% in 2012.

15DomCode2016-Utrecht-#DomCode16

Source:VerizonCommunications2013DataBreachInvestigationsReport

Page 16: Security Bootcamp for Startups and Small Businesses

One study found that compromises of mid-size firms rose 64% from 2013 to 2014.

16DomCode2016-Utrecht-#DomCode16

Source:GlobalStateofInformationSecuritySurvey2015

Page 17: Security Bootcamp for Startups and Small Businesses

HOW?

17DomCode2016-Utrecht-#DomCode16

Sometimes an attacker will use your product to gain information, sometimes they’ll use YOU.

Page 18: Security Bootcamp for Startups and Small Businesses

HOW?

18DomCode2016-Utrecht-#DomCode16

And sometimes your users are the target, and sometimes your company is.

Page 19: Security Bootcamp for Startups and Small Businesses

WAYS THEY USE YOUR PRODUCT

19DomCode2016-Utrecht-#DomCode16

•ReflectedXSS•PersistentXSS•CSRF•SQLInjection•Remotefileinclusion•Localfileinclusion/directorytraversal

•DefacementforSEO(pharma,etc)•Privilegeescalation•Malwaredelivery•OtherstuffyouknowfromOWASP

Page 20: Security Bootcamp for Startups and Small Businesses

WAYS THEY USE YOU

20DomCode2016-Utrecht-#DomCode16

•Stealingcredentialsfromotherwebsites,hopingyoure-usepasswordsacrosssensitivesystems•Spear-phishing•Wateringholeattacks•Socialengineering•Malware• Insecurethird-partyvendors

Page 21: Security Bootcamp for Startups and Small Businesses

DEFENSE IN DEPTH

21DomCode2016-Utrecht-#DomCode16

•Mitigatessinglepointsoffailure.(“Busfactor”)•Requiresmoreeffortonthepartoftheattacker,theoreticallyexhaustingattackerresources.

Except...

Page 22: Security Bootcamp for Startups and Small Businesses

DEFENSE IN DEPTH CHALLENGES

22DomCode2016-Utrecht-#DomCode16

• Larger,morecomplicatedsystemscanbehardertomaintain:• Leadstomorecracksforbadguystopokeat•Moresurfacesthatcangetbeoverlooked

• Thebadguyshavenearlylimitlessresources.Wedon’t.•Attacksarecommoditizednow.Botnetsfor<$2/hourandInternetofShit(MiraiDynDNSattack)

Page 23: Security Bootcamp for Startups and Small Businesses

CIAConfidentiality, Integrity & Availability

Page 24: Security Bootcamp for Startups and Small Businesses

CONFIDENTIALITY IS A SET OF RULES THAT LIMITS ACCESS TO INFORMATION

24DomCode2016-Utrecht-#DomCode16

Page 25: Security Bootcamp for Startups and Small Businesses

CONFIDENTIALITY EXAMPLES

25DomCode2016-Utrecht-#DomCode16

•Passwords•Dataencryption(atrestandintransmission)•Two-factorauthenticationorbiometrics.

•CorporateVPN• IPWhitelisting•SSHkeys

Page 26: Security Bootcamp for Startups and Small Businesses

CONFIDENTIALITY RISKS

26DomCode2016-Utrecht-#DomCode16

• Nobrute-forcedetection• Novettingofhowthird-partyvendorsuse/storecustomerdata• Informationleakagefromloginmessages(timingattacks,etc.)• SQLinjection

• Privilegeescalationleadingtoadminaccess• Passwordssharedacrosswebsites• Improperdisposal/destructionofpersonaldata• Lost/stolendevices• InsiderThreats

Page 27: Security Bootcamp for Startups and Small Businesses

INTEGRITY IS THE ASSURANCE THAT THE INFORMATION IS TRUSTWORTHY & ACCURATE.

27DomCode2016-Utrecht-#DomCode16

Page 28: Security Bootcamp for Startups and Small Businesses

INTEGRITY RISKS

28DomCode2016-Utrecht-#DomCode16

• Datalossduetohardwarefailure(servercrash!)• Softwarebugthatunintentionallydeletes/modifiesdata• Dataalterationviaauthorizedpersons(humanerror)

•Dataalterationviaunauthorizedpersons(hackers)•Nobackupsornowaytoverifytheintegrityofthebackupsyouhave• Third-partyvendorwithinadequatesecurity• InsiderThreats

Page 29: Security Bootcamp for Startups and Small Businesses

AVAILABILITY IS A GUARANTEE OF READY ACCESS TO THE INFO BY AUTHORIZED PEOPLE.

29DomCode2016-Utrecht-#DomCode16

Page 30: Security Bootcamp for Startups and Small Businesses

AVAILABILITY RISKS

30DomCode2016-Utrecht-#DomCode16

•DDoSattacks•Third-partyservicefailures•Hardwarefailures•Softwarebugs•Untestedsoftwarepatches

•Naturaldisasters•Man-madedisasters•InsiderThreats

Hmm… This looks familiar…

Page 31: Security Bootcamp for Startups and Small Businesses

31DomCode2016-Utrecht-#DomCode16

INSIDER THREATS

42%58%

• Employees(33%)• Ex-employees(7%)• Customers,partnersorsuppliers(18%)

Source:ClearswiftReport:TheEnemyWithin-PublishedMay2013

• Everythingelse

Page 32: Security Bootcamp for Startups and Small Businesses

32DomCode2016-Utrecht-#DomCode16

INSIDER THREATS

Source:ClearswiftReport:TheEnemyWithin-PublishedMay2013

•Oftenverylow-tech•Sometimesmalicious•Sometimesaccidental•Theft/destructionofconfidentialinformation•Sabotage

•Fraud•Defacement•DoSattacks•Sometimesmotivatedbyrevenge

Page 33: Security Bootcamp for Startups and Small Businesses

NOT ALL INSIDER THREATS ARE MALICIOUS, BUT THAT DOESN’T MAKE THEM LESS DANGEROUS.

33DomCode2016-Utrecht-#DomCode16

Page 34: Security Bootcamp for Startups and Small Businesses

34DomCode2016-Utrecht-#DomCode16

APPLICATION SECURITY

Page 35: Security Bootcamp for Startups and Small Businesses

77% OF LEGITIMATE WEBSITES HAD EXPLOITABLE VULNERABILITIES. 1-IN-8 HAD A CRITICAL VULNERABILITY.

35DomCode2016-Utrecht-#DomCode16

Source:SymantecInternetSecurityThreatReport2014::Volume19,PublishedApril2014

Page 36: Security Bootcamp for Startups and Small Businesses

BREACHGrowth• credit card info • birth dates • gov ID numbers • home addresses • medical records • phone numbers • financial information • email addresses • login • passwords

Data Stolen

36DomCode2016-Utrecht-#DomCode16

Iden**esStolenbyYear(inMillions)

275

550

825

1100

2011 2012 2013 2014 2015 2016*

554707

1,023

552

267412

Source:SymantecInternetSecurityThreatReport2014/2015

Page 37: Security Bootcamp for Startups and Small Businesses

2011 2012 2013 2014 2016

974,000

500,000570,000464,000

190,000

ATTACKS

37

Source:SymantecInternetSecurityThreatReport2014/2016

Per Day

DomCode2016-Utrecht-#DomCode16

Page 38: Security Bootcamp for Startups and Small Businesses

APPSEC STRATEGY

PICKTWO

38

COMPLETELYSCREWEDCOMPLETELYSCREWED

COMPLETELYSCREWED

DomCode2016-Utrecht-#DomCode16

Page 39: Security Bootcamp for Startups and Small Businesses

39DomCode2016-Utrecht-#DomCode16

WHAT CAN YOU DO?

Page 40: Security Bootcamp for Startups and Small Businesses

STOP:

40DomCode2016-Utrecht-#DomCode16

Believing the lie that you’re too small to be a target.

You’re not. I promise.

Page 41: Security Bootcamp for Startups and Small Businesses

START:

41DomCode2016-Utrecht-#DomCode16

Evaluating the value of your assets. You have to know what you’re protecting.

Page 42: Security Bootcamp for Startups and Small Businesses

42DomCode2016-Utrecht-#DomCode16

VENDOR MANAGEMENT

Page 43: Security Bootcamp for Startups and Small Businesses

START:

43DomCode2016-Utrecht-#DomCode16

Documenting ALL of your third-party vendors. Assess risk, and start a vendor management program.

Page 44: Security Bootcamp for Startups and Small Businesses

START:

44DomCode2016-Utrecht-#DomCode16

Giving preference to third-party vendors that integrate with LDAP/AD/SSO.

Page 45: Security Bootcamp for Startups and Small Businesses

START:

45DomCode2016-Utrecht-#DomCode16

Developing a risk matrix for every project. Keep it updated as new features are added.

Page 46: Security Bootcamp for Startups and Small Businesses

RISK MATRIX:

46DomCode2016-Utrecht-#DomCode16

• Type• Third-Party• ServiceDescription• TriggeringAction• ConsequenceofServiceFailure• RiskofFailure• ProbabilityofFailure• UserImpactofFailure

• Methodusedformonitoringthisrisk• EffortstoMitigateinCaseofFailure• Contactinfo

Grabastartertemplatehere!http://snipe.ly/risk_matrix

Page 47: Security Bootcamp for Startups and Small Businesses

START:

47DomCode2016-Utrecht-#DomCode16

Giving preference to systems that allow you to show due diligence in the event of a breach.

Page 48: Security Bootcamp for Startups and Small Businesses

48DomCode2016-Utrecht-#DomCode16

POLICIES & PROCESS

Page 49: Security Bootcamp for Startups and Small Businesses

START:

49DomCode2016-Utrecht-#DomCode16

Implementing policies of “least-privilege”.

Page 50: Security Bootcamp for Startups and Small Businesses

START:

50DomCode2016-Utrecht-#DomCode16

Developing a Disaster Recovery Plan. TEST IT. (No, really, test it. Often.)

Page 51: Security Bootcamp for Startups and Small Businesses

START:

51DomCode2016-Utrecht-#DomCode16

Developing an Incident Response Plan. Test it, and keep it updated.

Page 52: Security Bootcamp for Startups and Small Businesses

START:

52DomCode2016-Utrecht-#DomCode16

Enabling (and requiring) two-factor authentication for everything.

Page 53: Security Bootcamp for Startups and Small Businesses

START:

53DomCode2016-Utrecht-#DomCode16

Thinking about any ways a new security measure could actually weaken your security.

Page 54: Security Bootcamp for Startups and Small Businesses

REMEMBER:

54DomCode2016-Utrecht-#DomCode16

If your new security policies get in the way of people getting work done, they will find a way around them.

Page 55: Security Bootcamp for Startups and Small Businesses

START:

55DomCode2016-Utrecht-#DomCode16

Developing a formal procedure for handling exiting employees.

Page 56: Security Bootcamp for Startups and Small Businesses

56DomCode2016-Utrecht-#DomCode16

DATA HANDLING

Page 57: Security Bootcamp for Startups and Small Businesses

STOP:

57DomCode2016-Utrecht-#DomCode16

Collecting data about users that you don’t ABSOLUTELY need right now.

Page 58: Security Bootcamp for Startups and Small Businesses

START:

58DomCode2016-Utrecht-#DomCode16

Logging (almost) everything. Use a central logging server if you can.

Page 59: Security Bootcamp for Startups and Small Businesses

START:

59DomCode2016-Utrecht-#DomCode16

Getting to know what “normal” user behavior looks like. Flag anything out of the ordinary.

Page 60: Security Bootcamp for Startups and Small Businesses

START:

60DomCode2016-Utrecht-#DomCode16

Storing offline backups. Make sure you can restore from them successfully.

Page 61: Security Bootcamp for Startups and Small Businesses

START:

61DomCode2016-Utrecht-#DomCode16

Encrypting EVERYTHING (where feasible.) in transit and at rest. HTTPS ALL THE THINGS.

Page 62: Security Bootcamp for Startups and Small Businesses

START:

62DomCode2016-Utrecht-#DomCode16

Testing that your deployment system can work if Github (or other third-party) is down.

Page 63: Security Bootcamp for Startups and Small Businesses

63DomCode2016-Utrecht-#DomCode16

DEV & OPS

Page 64: Security Bootcamp for Startups and Small Businesses

START:

64DomCode2016-Utrecht-#DomCode16

Leveraging the built-in data sanitation/CSRF of your language frameworks.

Page 65: Security Bootcamp for Startups and Small Businesses

START:

65DomCode2016-Utrecht-#DomCode16

Using prepared statements for your SQL. It’s 2016 already!

Page 66: Security Bootcamp for Startups and Small Businesses

START:

66DomCode2016-Utrecht-#DomCode16

Checking for debugging output that can disclose information that can make an attacker’s job easier.

Page 67: Security Bootcamp for Startups and Small Businesses

STOP:

67DomCode2016-Utrecht-#DomCode16

Using MD5 for passwords!!!! Use a secure salt+hash like bcrypt.

Page 68: Security Bootcamp for Startups and Small Businesses

START:

68DomCode2016-Utrecht-#DomCode16

Looking critically at the complexity of your systems.

Page 69: Security Bootcamp for Startups and Small Businesses

START:

69DomCode2016-Utrecht-#DomCode16

Implementing brute-force detection everywhere you can.

Page 70: Security Bootcamp for Startups and Small Businesses

STOP:

70DomCode2016-Utrecht-#DomCode16

Using production data in your test environments!

Page 71: Security Bootcamp for Startups and Small Businesses

START:

71DomCode2016-Utrecht-#DomCode16

Getting your dev teams involved in Capture the Flag events. (They’re fun!)

Page 72: Security Bootcamp for Startups and Small Businesses

START:

72DomCode2016-Utrecht-#DomCode16

Getting penetration tests and vulnerability assessments done.

Page 73: Security Bootcamp for Startups and Small Businesses

START:

73DomCode2016-Utrecht-#DomCode16

Building automated scanners into your testing/Continuous Integration pipeline.

Page 74: Security Bootcamp for Startups and Small Businesses

74DomCode2016-Utrecht-#DomCode16

COMPANY CULTURE

Page 75: Security Bootcamp for Startups and Small Businesses

START:

75DomCode2016-Utrecht-#DomCode16

Building a security-first culture. Make it part of your DNA.

Page 76: Security Bootcamp for Startups and Small Businesses

START:

76DomCode2016-Utrecht-#DomCode16

Creating a company culture where your employees are encouraged to ask if they are suspicious.

Page 77: Security Bootcamp for Startups and Small Businesses

REMEMBER:

77DomCode2016-Utrecht-#DomCode16

“The security team says no because they are incorrectly held accountable for all flaws.”

— Michael Coates CISO at Twitter, OWASP Global Board Member

Page 78: Security Bootcamp for Startups and Small Businesses

START:

78DomCode2016-Utrecht-#DomCode16

Educating employees about social engineering tactics that can be used to gather data about your company.

Page 79: Security Bootcamp for Startups and Small Businesses

STOP:

79DomCode2016-Utrecht-#DomCode16

Utilizing policies that punish employees for reporting incidents.

Page 80: Security Bootcamp for Startups and Small Businesses

START:

80DomCode2016-Utrecht-#DomCode16

Becoming a passionate security ambassador for your users and your co-workers.

Page 81: Security Bootcamp for Startups and Small Businesses

Alison Gianotto (aka “snipe”)THANK YOU!•@snipeyheadonTwitter• [email protected]

81DomCode2016-Utrecht-#DomCode16

Likedthistalk?Leavefeedbackathttp://snipe.ly/domcode16

Page 82: Security Bootcamp for Startups and Small Businesses

CAPTURE ALL THE FLAGS!

82DomCode2016-Utrecht-#DomCode16

• NotSoSecureCTF:http://ctf.notsosecure.com• SecurityShepherd:https://www.owasp.org/index.php/OWASP_Security_Shepherd• http://hax.tor.hu/• https://pwn0.com/• http://www.smashthestack.org/• http://www.hellboundhackers.org/• http://www.overthewire.org/wargames/• http://counterhack.net/Counter_Hack/Challenges.html• http://www.hackthissite.org/• http://exploit-exercises.com/• http://vulnhub.com/