DEFCon: High-Performance Event Processing with Information Security - - PowerPoint PPT Presentation

defcon high performance event processing with information
SMART_READER_LITE
LIVE PREVIEW

DEFCon: High-Performance Event Processing with Information Security - - PowerPoint PPT Presentation

DEFCon: High-Performance Event Processing with Information Security Matteo Migliavacca, Ioannis Papagiannis, Peter Pietzuch Imperial College London David M. Eyers, Jean Bacon Cambridge Computer Laboratory Peter R. Pietzuch Brian Shand


slide-1
SLIDE 1

Peter R. Pietzuch

prp@doc.ic.ac.uk

DEFCon: High-Performance Event Processing with Information Security

Matteo Migliavacca, Ioannis Papagiannis, Peter Pietzuch

Imperial College London

David M. Eyers, Jean Bacon

Cambridge Computer Laboratory

Brian Shand

National Health Service, UK migliava@doc.ic.ac.uk

slide-2
SLIDE 2

Event Stream Processing Needs Strong Security

  • Event processing

– Stream of messages transformed in near real-time by processing units – Confidential information: healthcare, social networks, finance

  • Problem: incorrect event flows

– Lead to security violations – Within application , with the environment – Possible causes: bugs, security attacks, third party code, malicious code

1

log access control

1 2 1 2

slide-3
SLIDE 3

Financial Processing: Security and Latency

  • market data processing and local brokering
  • Security is important

– Data is valuable: banks fined for exploiting client information

  • Performance constraints

– Latency, Throughput

  • Shared Platform

– Processing near stock exchanges costly: share resources, reduce entry costs for small firms – Local brokering to avoid transaction fees and trade anonymously

2

Bank Investor Monitor monitor match

  • rder

Broker deal Stock Ticker tick Client Investor Monitor

1

log

2

slide-4
SLIDE 4

Security Approach: Information Flow Control

  • Protect data end-to-end: Information Flow Control (IFC):

– Don’t try to eliminate all bugs and (hard!) – Track and control information flows in application – Previously applied to operating systems and programming languages Goal: apply IFC to current high-performance event processing systems

3

Stock Ticker Bank Investor Client Investor Monitor Monitor Broker monitor match tick

  • rder

deal

1

log

2 2 1

slide-5
SLIDE 5

Contributions and Overview

  • Decentralized Event Flow Control (DEFC) model

– IFC applied to event processing

  • DEFCon high-performance implementation

– Safe and efficient event flows in Java

  • Practical isolation methodology

– Secure production-level language runtimes with low effort (OpenJDK 6)

  • Evaluation

– Throughput and latency overhead

4
slide-6
SLIDE 6

DEFCon

Event Processing in DEFC

5

Bank Investor Client Monitor Client Investor 77

name data S (confidentiality) … … {client77} … … {client77}

S:{client77} S:{}

Event parts name data command monitor stock IBM name data S (confidentiality) command monitor { } stock IBM {client77} 1

?

2

log S:{client77}

unit can output part iff S(unit) ⊆ S(part) unit can input part iff S(part) ⊆ S(unit)

slide-7
SLIDE 7

DEFC Privileges

Clearance privilege: receiving confidential information

– Allows units to add tag to its label

Declassification privilege: making confidential data public :

– Allows units to remove tag from its label

6

Bank Investor Client Monitor Client Investor 77 S:{client77} S:{} S:{client77}

can receive confidential information cannot receive confidential information

client77+ client77+ client77+ client77- client77+, client77-

cannot make confidential information public can make confidential information public

slide-8
SLIDE 8

An Example of Leaks to Avoid

  • Untainted unit tries to read tainted part

– First try: return access denied

7

… Client Monitor

name data S (confidentiality) … … {client77}

S:{client77} Access Denied S:{}

slide-9
SLIDE 9

An Example of Leaks to Avoid

  • Untainted unit tries to read tainted part

– First try: return access denied

  • Leaks name of secret parts
8

… Client Monitor

name data S (confidentiality) … … {client77}

S:{client77}

name data S (confidentiality) FirstLetterIsI … {client77}

Access Denied FirstLetter = I ?

stock=IBM

Bank Investor S:{}

FirstLetterIsI

S:{}

slide-10
SLIDE 10

An Example of Leaks to Avoid

  • Untainted unit tries to read tainted part

– First try: return access denied

  • Leaks name of secret parts

– Second try: update unit label to part label

9

… Client Monitor

name data S (confidentiality) … … {client77}

S:{client77}

name data S (confidentiality) FirstLetterIsI … {client77}

Access Denied FirstLetter = I ?

stock=IBM

Bank Investor S:{}

FirstLetterIsI

Ok, label change S:{} S:{client77}

slide-11
SLIDE 11

An Example of Leaks to Avoid

  • Untainted unit tries to read tainted part

– First try: return access denied

  • Leaks name of secret parts

– Second try: update unit label to part label

  • Secret inferred by absence of communication
10

… Client Monitor

name data S (confidentiality) … … {client77}

S:{client77}

name data S (confidentiality) FirstLetterIsI … {client77}

Access Denied FirstLetter = I ?

stock=IBM

Bank Investor S:{}

FirstLetterIsI

Ok, label change FirstLetter = J ? S:{} Not Found

FirstLetterIsNotJ

S:{} S:{client77}

slide-12
SLIDE 12

An Example of Leaks to Avoid

  • Untainted unit tries to read tainted part

– First try: return access denied

  • Leaks name of secret parts

– Second try: update unit label to part label

  • Secret inferred by absence of communication

– Solution: avoid implicit label changes, return part not found

  • Result: all unit label changes must be explicit

– First update label, then read part

11

… Client Monitor

name data S (confidentiality) … … {client77}

S:{client77}

name data S (confidentiality) FirstLetterIsI … {client77}

Access Denied FirstLetter = I ?

stock=IBM

Bank Investor S:{}

FirstLetterIsI

Ok, label change FirstLetter = J ? S:{} Not Found

FirstLetterIsNotJ

Not Found

???

S:{} S:{client77}

slide-13
SLIDE 13

Contributions and Overview

  • Decentralized Event Flow Control (DEFC) model

– IFC applied to event processing

  • DEFCon high-performance implementation

– Safe and efficient event flows in Java

  • Practical isolation methodology

– Secure production-level language runtimes with low effort (OpenJDK 6)

  • Evaluation

– Throughput and latency overhead

12
slide-14
SLIDE 14
  • DEFC assumes units communicate through labelled events
  • How to control communication between units?

– VM or OS processes: heavy, require copying of data – Use threads: sharing data in single address space – Java: mature, pervasive, good performance

  • How to control communication between Java threads?

DEFCon: Controlling Event Flows

DEFCon Bank Investor Client Monitor Client Investor

DEFCon

label check

1 2

13

?

slide-15
SLIDE 15

Communication: Threads Share Immutable Data

  • Unit Threads create new objects to put in events
  • Problem: how to deliver them to receiving units?

– Copy objects in events

  • Slow
14

DEFCon

Stock:IBM Bank Investor Client Monitor Stock:IBM S:{} S:{}

slide-16
SLIDE 16

Communication: Threads Share Immutable Data

  • Unit Threads create new objects to put in events
  • Problem: how to deliver them to receiving units?

– Copy objects in events

  • Slow

– Transfer references to shared objects

15

DEFCon

Stock:IBM Bank Investor Client Monitor S:{} S:{}

slide-17
SLIDE 17

Communication: Threads Share Immutable Data

  • Unit Threads create new objects to put in events
  • Problem: how to deliver them to receiving units?

– Copy objects in events

  • Slow

– Transfer references to shared objects

  • Problem if unit labels change
16

DEFCon

Stock:IBM Bank Investor Client Monitor S:{} S:{} S:{client77}

?

slide-18
SLIDE 18

Communication: Threads Share Immutable Data

  • Unit Threads create new objects to put in events
  • Problem: how to deliver them to receiving units?

– Copy objects in events

  • Slow

– Transfer references to shared objects

  • Problem if unit labels change
  • Shared state allows unrestricted communication

– Solution: only allow immutable objects in event parts

17

DEFCon

Bank Investor Client Monitor ImmutableStock:IBM S:{} S:{}

slide-19
SLIDE 19

Class Library

Communication: Shared State in Runtimes

18

JVM Client Monitor Client Investor Bank Investor

DEFCon

static fields native methods Native OS ~4000 ~2000 OpenJDK 6

slide-20
SLIDE 20

Isolation Methodology Overview

  • Goal

– Provide isolation between Java Threads – Secure potentially dangerous targets: static fields and native methods

  • Previous Java isolation approaches

– Do not support fast message passing between isolates (MVM) – Use custom Class Libraries and/or JVMs (I-JVM) – Require extensive analysis of Class Library (KaffeOS, Joe-E)

  • Our approach

1. Identify potentially dangerous targets using static analysis 2. Modify runtime behaviour of targets using aspect oriented programming (AOP) 3. White-list safe targets

19
slide-21
SLIDE 21

Class Library

  • 1. Static Analysis
20

Client Monitor Client Investor Bank Investor

DEFCon

JVM Native OS static fields native methods ~4000 ~2000 OpenJDK 6

slide-22
SLIDE 22

Class Library

  • 1. Static Analysis
21

Client Monitor Client Investor Bank Investor

DEFCon

JVM Native OS removed static fields native methods ~4000 ~2000 ~2000 ~1000 OpenJDK 6

slide-23
SLIDE 23

Class Library

  • 1. Static Analysis
22

Client Monitor Client Investor Bank Investor

DEFCon

reachable JVM Native OS removed static fields native methods ~4000 ~2000 ~2000 ~900 ~1000 ~300 OpenJDK 6

slide-24
SLIDE 24

Class Library

  • 2. AOP Runtime Injection
23

Client Monitor Client Investor Bank Investor

DEFCon

removed reachable JVM Native OS static fields native methods ~4000 ~2000 ~2000 ~900 ~1000 ~300 transparent duplication security checks OpenJDK 6

slide-25
SLIDE 25

Class Library

  • 3. White-listing
24

Client Monitor Client Investor Bank Investor

DEFCon

removed reachable JVM Native OS static fields native methods ~4000 ~2000 ~2000 ~900 ~1000 ~300 transparent duplication security checks white-listing OpenJDK 6

slide-26
SLIDE 26

Class Library

  • 3. White-listing
25

Client Monitor Client Investor Bank Investor

DEFCon

removed reachable JVM Native OS static fields native methods ~4000 ~2000 ~2000 ~900 ~1000 ~300 transparent duplication security checks white-listing

Target type Manually white-listed for unit execution for performance static fields 27 6 native methods 15 9

OpenJDK 6

slide-27
SLIDE 27

Isolation Summary

  • What we achieved

– Secured OpenJDK 6 for running financial scenario – Required few days of manual work – Easily applicable to new versions/different JDKs

  • Limitations

– Assumes knowledge of unit bytecode for static analysis

  • Might need additional effort for new units

– Manual code auditing subject to human errors

26
slide-28
SLIDE 28

Contributions and Overview

  • Decentralized Event Flow Control (DEFC) model

– IFC applied to event processing

  • DEFCon high-performance implementation

– Safe and efficient event flows in Java

  • Practical isolation methodology

– Secure production-level language runtimes with low effort (OpenJDK 6)

  • Evaluation

– Throughput and latency overhead

27
slide-29
SLIDE 29

Evaluation: Performance Overhead

  • Overhead of security (labels and isolation
  • Measure overhead

– Rate of processed ticks – Latency of produced deals

  • Synthetic traces on 6k stock symbols

– Prices set to trigger a deal every 10 ticks

  • Experiments on dual Intel Xeon E5540 2.53GHz
28

DEFCon Stock Ticker Client Investor Bank Investor Monitor Monitor Broker monitor match tick

  • rder

deal

slide-30
SLIDE 30

Acceptable Reduction on Throughput

  • Label checks: marginal overhead
  • Isolation: ~20% overhead
29
slide-31
SLIDE 31

Low Impact on Latency

  • Label checks: ~0.5 ms overhead
  • Isolation: ~1ms overhead
30
slide-32
SLIDE 32

JVM2 JVM1

Isolation with Separate JVMs

  • Comparison with Marketcetera (Open Source trading platform)

– One JVM per investor

  • Throughput:

– Comparable with DEFCon with few investors – Does not scale

  • Latency: around 8 ms
31

Stock Ticker Client Investor Bank Investor Monitor Monitor Broker monitor match tick

  • rder

deal

slide-33
SLIDE 33

Future Work

  • Distribution

– Performance limited by number of cores – Scale DEFCon to multiple engines

  • Usability

– Correctly assigning labels is hard – Tools to help design and automatically check labelling

  • Performance isolation

– Units compete for resources – Prevent uncooperative behaviours

32
slide-34
SLIDE 34

Conclusion

  • Event processing requires security and low latency
  • DEFC model

– Provides strong and fine-grained security by applying Information Flow Control to event processing

  • DEFCon implementation

– Processes events in single address space for performance – Provides isolation on production-level language runtimes

Tracking and enforcing security of event flows can be done with reasonable overhead

  • Thank You! … Questions?
  • (migliava@doc.ic.ac.uk)
33
slide-35
SLIDE 35

END

  • END
34