29
Confidentiality/date line: 13pt Arial Regular, white Maximum length: 1 line Information separated by vertical strokes, with two spaces on either side Disclaimer information may also be appear in this area. Place flush left, aligned at bottom, 8-10pt Arial Regular, white IBM logo must not be moved, added to, or altered in any way. Indications in green = Live content Indications in white = Edit in master Indications in blue = Locked elements Indications in black = Optional elements Copyright: 10pt Arial Regular, white © 2002 IBM Corporation Template release: Oct 02 For the latest, go to http://w3.ibm.com/ibm/presentations IBM Research Security Research: Hardware Foundations David Safford [email protected]

Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

• Confidentiality/date line: 13pt Arial Regular, whiteMaximum length: 1 line

• Information separated by vertical strokes,with two spaces on either side

• Disclaimer information may also be appear in this area. Place flush left, aligned at bottom, 8-10pt Arial Regular, white

• IBM logo must not be moved, added to, or altered in any way.

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional elements

• Copyright: 10pt ArialRegular, white

© 2002 IBM Corporation

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

IBM Research

Security Research: Hardware Foundations

David [email protected]

Page 2: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

Outline

Software security impossible

Hardware Root of Trust to Detect compromise

Authenticate without passwords

Hardware ChallengesBadly Designed Hardware (SMM)

Buggy Hardware (Errata)

Malleable Hardware (microcode patches)

Malicious Hardware (underhanded/State sponsored)

Page 3: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

3

Introduction: State of Computer Security

“The sky isn't falling ... it fell a few years ago.”Roger Grimes, Infoworld Security Advisor, 2006

Page 4: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008*

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

Vulnerabilities Discovered Per Year (CERT)

1999 2000 2001 2002 2003 2004

0

50

100

150

200

250

300

350

Days from Patch to Exploit (Information Security, July 2004)

More and More Vulnerabilities(roughly 20 per day)

Less and Less Time to Patch(zero day exploits)

1. We've Lost the Software Vulnerability War

Page 5: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

Secure Software is HARD

So far, every software system has failedApollo Command Module Computer (16K words) failed on every flight

Studies shows at least 1 bug per K lines of code (LOC)IBM internal study, 2000

Information Week Jan 21 2002, p23

Reasoning, Inc 2003

coverity.com 2008

Linux and WinXP with Office each have > 200MLOC400K bugs would take 80 years @ 5000/year to fix

But we are writing roughly 50K new ones per year!

Can model this as an infinite supply of security bugs.Must design our systems to confine compromise

Page 6: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

The Ease of Application Hacking

Attacking Servers:97% web sites vulnerable to SQL injection or XSS.

IBM ISS

Attacking Clients:Chinese Hacking

Spear phishing with Word and PDF exploits1,295 (known) PC's in 103 CountriesHigh value targetsRemarkably simple, effective attacks

Page 7: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

The Failure of Secrecy

“Three may keep a secret, if two of them are dead.”Benjamin Franklin, 1735

Benjamin was a hopeless optimist.Individuals seem delighted to give away their secrets.

Phishing/pharming

Gartner: $3.2B losses, 3.6M victims of phishing in 2007

“One may keep a secret, if he doesn't know what it is.”Dave Safford, 2004

TPM

Page 8: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

Hardware

Page 9: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

IBM PCI-X Cryptographic Coprocessor (PCIXCC)

Basic text slide

Announced in September, 2003

Greatly improved performance

PCI-X and network interface

Same physical / logical security feature set as 4758

Received FIPS 140-2 Level 4 validation

Support for IBM zSeries (mainframes) today

Page 10: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

Trusted Platform Module (TPM)

RSA cryptokey generation, signature, encrypt, decrypt

Secure storageprivate keys

master keys (eg loopback)Integrity measurement

Platform Configuration Registers (PCR)

compromise detection

Tie key use to uncompromised environmentAttestation

host based integrity/membership reporting

(RSA 2004 Demo)

IDC: “by 2010, all pc's will come with a TPM”http://trustedcomputinggroup.org

Page 11: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

A Blatant Plug

Programming– BIOS

– Device Driver

– TPM

– TSS

Applications– Trusted Boot

– Key Management

– Authentication

– Attestation

Page 12: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

TPM as a Root of Trust

Static Root of Trust (SRTM)Immutable BIOS measures mutable BIOS

Each step thereafter measures the next stage

Dynamic Root of Trust (DRTM)Atomic measure/load/execute bootstrap

Not dependent on BIOS

But: Rutkowska, “Attacking Intel's Trusted Execution Technology” Blackhat 2009 (See later slide)

Page 13: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

Integrity Measurement Architecture (IMA)

Trusted Computing Group Trust Architecture

– Chain of trust – measure files before accessed/executed

– Store measurements in kernel list

– Extend measurements into TPM/vTPM PCR

– Attest all measurements to third party, signed by TPM/vTPM

– Malware cannot take measurements back from TPM/vTPM

IMA is linux kernel module which implements this model

– Policy based for which files to measure

– High performance with measurement caching

– In Linus' git tree for 2.6.30

Page 14: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

Secure Hardware

Originally developed for network communications

With “almost free” integrityUse “whitening” with pairwise independence

Builds “location sensitivity” into ciphertext

Processed in parallel and/or pipelined engines

Both encryption & decryptionSubmitted to NIST for evaluation as a block cipher mode

AESFwd‘K’

AESFwd‘K’

AESFwd‘K’

W

P0 P1 PN-1

C0 C1 CN-1

1*W 2*W N*W

AESInv‘K’

AESInv‘K’

AESInv‘K’

P0 P1 PN-1

W 1*W 2*W N*W

Integrity Aware Parallelizable Mode (IAPM)

Page 15: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

NetTop/HAP 1 Architecture: Client Consolidation

Hypervisor

Guests

WinXP

emu

TS app

WinXP

emu

SEC app

WinXP

emu

Unclass app

RHEL 4VMWare Workstation

Sel

inu

x

Sel

inu

x

NSA 2000

Page 16: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

Adding TPM based Attestation to HAP

Key Research Components: PTS, IMA, vTPM, vBoot, Provision, 802.1x-PTS, Vmware/KVM configuration

Page 17: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

Attestation 802.1x-TNC-PTS

Page 18: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

Hardware Challenges

Page 19: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

The modern threat

“Nation states, however, have the technical and operational capabilities to orchestrate the full range of adversarial cyber operations through a combination of such means as recruiting insiders, setting up front companies, establishing signals collections systems, implanting damaging hardware or software in communications networks and subverting telecommunications, cryptographic defenses and supply chains.”

National Science and technology Council, “Federal Plan for Cyber Security and Information Assurance Research and Development”, April 2006.

How do you know your hardware doesn't have a back door?

Page 20: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

How “Hard” is Hardware?

Firmware

microcode/patches

FPGA

BIOS

SMI/SMM

All of these can be attacked

Page 21: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

How many gates in an undetectable CPU backdoor?

Underhanded Hardware competition http://isis.poly.edu/csaw/embedded

Page 22: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

How many gates in an undetectable CPU backdoor?

Underhanded Hardware competition http://isis.poly.edu/csaw/embedded

1341 (mainly for cryptographic triggering)Samuel King, Designing and Implementing Malicious Hardware, leet08

Page 23: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

How many gates in an undetectable CPU backdoor?

Underhanded Hardware competition http://isis.poly.edu/csaw/embedded

1341 (mainly for cryptographic triggering)Samuel King, Designing and Implementing Malicious Hardware, leet08

0 (just exploit design errors) Loic DuFlot, Using CPU System Management Mode to Circumvent Operating System Security Functions, Cansecwest 2009

Page 24: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

How many gates in an undetectable CPU backdoor?

Underhanded Hardware competition http://isis.poly.edu/csaw/embedded

1341 (mainly for cryptographic triggering)Samuel King, Designing and Implementing Malicious Hardware, leet08

0 (just exploit design errors - SMM) Loic DuFlot, Using CPU System Management Mode to Circumvent Operating System Security Functions, Cansecwest 2009

0 (just use the existing errata)Kris Kaspersky, Remote Code Execution through Intel CPU Bugs, HITBSecConf2008

Page 25: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

How many gates in an undetectable CPU backdoor?

Underhanded Hardware competition http://isis.poly.edu/csaw/embedded

1341 (mainly for cryptographic triggering)Samuel King, Designing and Implementing Malicious Hardware, leet08

0 (just exploit design errors) Loic DuFlot, Using CPU System Management Mode to Circumvent Operating System Security Functions, Cansecwest 2009

0 (just use the existing errata)Kris Kaspersky, Remote Code Execution through Intel CPU Bugs, HITBSecConf2008

0 (just steal Intel's microcode patch signing key)

Page 26: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

How many gates in an undetectable CPU backdoor?

Underhanded Hardware competition http://isis.poly.edu/csaw/embedded

1341 (mainly for cryptographic triggering)Samuel King, Designing and Implementing Malicious Hardware, leet08

0 (just exploit design errors) Loic DuFlot, Using CPU System Management Mode to Circumvent Operating System Security Functions, Cansecwest 2009

0 (just use the existing errata)Kris Kaspersky, Remote Code Execution through Intel CPU Bugs, HITBSecConf2008

0 (just steal Intel's microcode patch signing key)

0 (force the microcode signature verification – who's going to check?)

Page 27: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

SMM Attack on DRTM (Rutowska, Blackhat 2009)

Page 28: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

Summary

Page 29: Security Research: Hardware Foundationscarch/carchday2009/safford.pdf · Badly Designed Hardware (SMM) Buggy Hardware (Errata) ... – High performance with measurement caching –

Summary

Software security impossible

Hardware Root of Trust to Detect compromise

Authenticate without passwords

Hardware ChallengesBadly Designed Hardware (SMM)

Buggy Hardware (Errata)

Malleable Hardware (microcode patches)

Malicious Hardware (underhanded/State sponsored)