+ All Categories
Home > Documents > Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of...

Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of...

Date post: 23-Dec-2015
Category:
Upload: george-eaton
View: 214 times
Download: 0 times
Share this document with a friend
Popular Tags:
34
Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin
Transcript
Page 1: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Memento: Learning Secrets from Process FootprintsSuman Jana and Vitaly Shmatikov

The University of Texas at Austin

Page 2: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Trends in software design

• Applications rely on OS abstractions to improve their safety and reliabilityo “Process”o “User”

• Case study: Web browsers

www.xbank.com www.quickdate.com

Fork a new process

OS isolation

Fork a new process

Page 3: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Unintended consequences

Good

• Better isolation

• Better reliabilityo Others not affected if

one process crashes

• Better safety

BadLeaks more info to

concurrent processes

Topic of this talk

Page 4: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

ProcFS: Process info in multi-user OS

introduced in the 1980s

Tom Killian"Processes as Files" (1984)

cat /proc/1/st

atus

ps

top –p 1

Page 5: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

What can one learn from ProcFS?

• IP addrs of websites other users are visiting

Page 6: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Side channels through /proc

• "Peeping Tom in the Neighborhood: Keystroke Eavesdropping on Multi-User Systems" - Usenix Security 2009o Keystroke timing leak through ESP/EIP values from

/proc/<pid>/stat

XiaoFeng Wang Kehuan Zhang

Page 7: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

The story of "Peeping Tom"

NDSS '09 program committee:

"Nobody uses multi-user computers anymore"

Shout-out toXiaoFeng ;)

Page 8: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

The story of "Peeping Tom"

Oakland '09 program committee:

"Nobody uses multi-user computers anymore"

Shout-out toXiaoFeng ;)

Page 9: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Nobody uses multi-user computers anymore???

Page 10: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Android sandboxing =UNIX multi-user isolation

UNIX multi-users in the 1980s

cat /proc/1/st

atus

ps

top –p 1

Page 11: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Android sandboxing =UNIX multi-user isolation

Android “multi-users” in 2012

cat /proc/1/st

atus

ps

top –p 1

Page 12: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

• Different apps run as different users

Android sandboxing =UNIX multi-user isolation

Android uses OS “user” abstraction to isolate applications

Page 13: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Android “multi-users” in 2012

cat /proc/1/st

atus

ps

top –p 1

ProcFS API is still unchanged!!

Android sandboxing =UNIX multi-user isolation

Page 14: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

What can a zero-permission app do?

• Can read all world-readable files in /proc

• … but “Peeping Tom” attack does not work o ESP/EIP too unpredictable - JVM, GUI etc.

• Introducing “Memento” attackso Works on all major OSs (except iOS)

Page 15: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

This is not just about Android!

Page 16: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Process resource usage =big-time side channel

• Memory usage leaks inputs and user actionso Reveals webpages visited in Chrome, Firefox,

Android browser, any WebKit-based browsero Reveals state of Web applications

Membership in dating sites, specific interests on medical sites, etc.

• CPU usage leaks keystroke timingo For bash, ssh, Android on-screen keyboard handlero Yields a better, much more robust “Peeing Tom”

Completelynew attack!

Page 17: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

“Memento” (2000): putting together “memory streams”

Page 18: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

“Memento” (2000): putting together “memory streams”

Page 19: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Memprint: stream of memory usage

10568 KB15976 KB

11632 KB65948 KB

49380 KB

48996 KB

60280 KB 60820 KB 59548 KB

Page 20: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

2050

Sniffing memory footprints

zero-permission malicious process

OS isolation

browser process

alloc 1 alloc 2

OS free page pool

used page countmemprint

2050

Page 21: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

2056

Sniffing memory footprints

zero-permission malicious process

OS isolation

browser process

alloc 1 alloc 2

OS free page pool

used page countmemprint

brk/mmap

2050 2056

Page 22: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

2080

Sniffing memory footprints

zero-permission malicious process

OS isolation

browser process

alloc 1 alloc 2

OS free page pool

used page countmemprint

brk/mmap

20562050 2080

Page 23: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Memprint for Chrome loading benaughty.com

Page 24: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Memprint for Chrome loading benaughty.com

Page 25: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Memprint for Chrome loading benaughty.com

Page 26: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Full attack

OS isolation

browserzero-permission

app

/proc/pid/statm

memprint

memprint database

Page 27: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Why the attack works

• Memprints are unique (for up to 43% of webpages)

• Can tune recognition to achieve zero false positives

• Memprints are stable• … across repeated visits to the same page

memprints are OS/browser-

dependent but machine-

independent

Page 28: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Cross-page similarity for 100 random pages out of Alexa top 1000

Different from others

Similar tothemselves

web

pag

e ID

web page ID

similarity = Jaccard index of memprints

Page 29: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Fine-grained info leak: OkCupid

is login successful

?

no

yes

memory usage increases by

1-2 MB

is a paidcustomer ?

no

memory usage increases by

27-36 MB

no new flash player plugin

process

new flash player plugin process to display ads

yes

Page 30: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Concurrent processes don't hurt, sometimes make it even better!!

Page 31: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Memento attacks: CPU usage info

• Monitor /proc/<pid>/status for number of context switches

• Infer inter-keystroke timing for bash, ssh, Android on-screen keyboard handler etc. o Processing each keystroke requires a predictable

number of context switcheso Keystroke processing time << keystroke interval

sufficient to reconstruct typed text

[Zhang and Wang]

Page 32: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Keystroke timing (Android MMS app)

Page 33: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

Solutions?

• Increasing reliance on OS isolation makes these attacks easier o OS problem, not an application problem

• Disable /proco FreeBSD: no /proc, but attacker can still measure

victim's memory footprint via kvm_getprocs

• Stop reporting fine-grained resource usage across “user” boundaryo Only report info for user's own processeso Breaks tools like ps, top etc.

Page 34: Memento: Learning Secrets from Process Footprints Suman Jana and Vitaly Shmatikov The University of Texas at Austin.

does NOT need the API

needed the API

• Process info API o A legacy of the 1980so Reveals process's resource usage - CPU, mem, netwo A single measurement is harmless (most of the time)o Dynamics of processes’ resource usage =

high-bandwidth side channel

• Memento attacks o OS designers must rethink

process info API

Summary


Recommended