COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9:...

34
COMS E6998-9: COMS E6998 9: Software Security and Exploitation Lecture 2: Hackernomics and Design Hugh Thompson, Ph.D. © Hugh Thompson 2009 [email protected]

Transcript of COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9:...

Page 1: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

COMS E6998-9:COMS E6998 9:

Software Security and yExploitation

Lecture 2: Hackernomics and Design

Hugh Thompson, Ph.D.

© Hugh Thompson 2009

[email protected]

Page 2: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

Hackernomics (noun)Hackernomics (noun)

A social science concerned chiefly with description andA social science concerned chiefly with description and analysis of attacker motivations, economics, and 

business risk. Characterized  by y

5 fundamental immutable laws and 6 corollaries

© Hugh Thompson 2009

Page 3: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

L 1Law 1

Most attackers aren’t evil or insane; they justMost attackers aren t evil or insane; they just want something

Corollary 1.a.:

Companies don’t have the budget to protect against evil people but we cant t i t l th t ill l k f k t tprotect against people that will look for weaker targets

Corollary 1.b.:

Security Theatre can sometimes be good…assuming that the cost to test it $does not approach $0

© Hugh Thompson 2009

Page 4: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

Law 2Law 2

The type of data that attackers care about isThe type of data that attackers care about is changing

Corollary 2.a.:

When new data suddenly becomes important we have a big archival problemproblem

© Hugh Thompson 2009

Page 5: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

L 3Law 3

In the absence of metrics we tend to overIn the absence of metrics, we tend to over focus on risks that are either familiar or 

recentrecent.

© Hugh Thompson 2009

Page 6: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

Law 4Law 4

In the absence of security education orIn the absence of security education or experience, people (customers, managers, 

developers, testers, designers) naturally make developers, testers, designers) naturally makepoor security decisions with technology

Corollary 4.a.:

Software needs to be easy to use securely and difficult to use insecurely

© Hugh Thompson 2009

Page 7: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

L 5Law 5

Most costly breaches come from simpleMost costly breaches come from simple failures, not from attacker ingenuity

Corollary 5.a.:

Bad guys can, however, be VERY creative if properly incentivized.

© Hugh Thompson 2009

Page 8: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

The CAPTCHA DilemmaThe CAPTCHA Dilemma

CompletelyCompletely

Automated 

bliPublic 

Turing test to tell

Computers and

HumansHumans

Apart

© Hugh Thompson 2009

Page 9: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

© Hugh Thompson 2009Source: Trend Micro http://blog.trendmicro.com/captcha-wish-your-girlfriend-was-hot-like-me/

Page 10: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

Software Security in an Evolving Environment

© Hugh Thompson 2009

Page 11: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

Gateway Data (noun) – Data that seemsGateway Data (noun)  Data that seems harmless but, when used properly, can facilitate access to highly sensitivefacilitate access to highly sensitive information. 

© Hugh Thompson 2009

Page 12: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

CollectiveDirect Use

Conversion of public data to

Amplification

Conversion of public data to private data

Collective Intelligence

Correlating employee behavior to uncover p

access through defined rules

pby bouncing it off a

personsensitive corporate

information

© Hugh Thompson 2009

Page 13: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

Direct Use Gateway Data: Data directlyDirect Use Gateway Data: Data directly convertible into access through rules

© Hugh Thompson 2009

Page 14: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

What is your pet's name?Where were you born?What was your first teacher's name?What is the mascot of your favorite team?What was your first phone number?What is your favorite restaurant?Wh i f it i ?Who is your favorite singer?Where was your first job?

© Hugh Thompson 2009

Page 15: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

© Hugh Thompson 2009

Page 16: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

Old resumes, LinkedIn, Twitter, Facebook, blogs, friends/family blogs, public online 

Step 1: Reconnaissance g , / y g , p

records, etc. Reconnaissance

Cli k “F t d?”Step 2: 

Attempt Resets

Click on “Forgot your password?” or similar links. What do they ask for? What do they reveal?do they reveal?

Step 3:  Most people’s online identities have a lIdentify 

Dependenciescommon root. Is it one email address? A mobile phone? 

Step 4: Secure the Root

Once you’ve identified core dependencies, do what you can to strengthen the 

© Hugh Thompson 2009

Secure the Root common root.

Page 17: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

© Hugh Thompson 2009

Page 18: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

© Hugh Thompson 2009

Page 19: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

Amplification Gateway Data: data that can be amplified when bounced off a person.person. 

© Hugh Thompson 2009

Page 20: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

xxxx

© Hugh Thompson 2009

Page 21: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

Credit Card First 4 Digits Total Digits

American Express 34xx or 37xx 15p

VISA 4xxx 13 or 16

M t C d 51 55 16MasterCard 51xx‐55xx 16

Discover 6011 16

© Hugh Thompson 2009

Page 22: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

Collective Intelligence Gateway Data: Seemingly innocuous data that can be g ycombined with other data across time, a company or a group to reveal somethingcompany, or a group to reveal something sensitive. 

© Hugh Thompson 2009

Page 23: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

Some Potential Direct DisclosuresSome Potential Direct Disclosures

Information about customers  Disclosure of legally protected or sales

Information about the health f

g y pdata 

Creation of a legally protected “ d” i bli lof a company

New policies or policy changes

“record” in a public place

Mergers and acquisitions

Potential strikesg

Ethics issues internally

Hiring or firing

Potential strikes

Trade secrets disclosed 

New features in a product or Company violated a law

pproduct changes

© Hugh Thompson 2009

Page 24: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

Company NameCompany Name

© Hugh Thompson 2009

Page 25: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

Telegraphed InformationTelegraphed Information

• Location – services like Loopt append locationLocation  services like Loopt append location information

• Job seeking behavior LinkedIn• Job seeking behavior – LinkedIn recommendation requests, resume distribution etcdistribution, etc.

• Linkages/Relationships – new contacts or f i d dd d i l kfriends added to social networks

© Hugh Thompson 2009

Page 26: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

© Hugh Thompson 2009

Page 27: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

© Hugh Thompson 2009

Page 28: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

John Smith

© Hugh Thompson 2009

Page 29: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

© Hugh Thompson 2009

Page 30: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

Overview of Security Design Principles

© Hugh Thompson 2009

Page 31: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

Design PrinciplesDesign Principles

1. Defense in depth – Always set up multiple lines of defense for high value assets.

2. Least privilege – Software should only operate with the privileges it needs to get a task done, no more and no less.

3 Input validation – We need to make sure that assumptions3. Input validation We need to make sure that assumptions about user input are also enforced in code.

4. Compartmentalization – Need to ensure that if an attacker compromises one system they can’t compromise them all.

© Hugh Thompson 2009

Page 32: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

© Hugh Thompson 2009 Photos courtesy of Matt Blaze

Page 33: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

Class Break: “Bump Key”Class Break:  Bump Key

© Hugh Thompson 2009

Page 34: COMS E6998-9: Software Security and Exploitationhthompson/Lecture_b_2_print.pdf · COMS E6998-9: Software Security and Exploitation Lecture 2: ... The CAPTCHA Dilemma ... Lecture_b_2_print.pptx

BUG OF ZENBUG OF ZEN

© Hugh Thompson 2009