31
Stealing Webpages Rendered on Your Browser by Exploiting GPU Vulnerabilities 2014 IEEE Symposium on Security and Privacy Sangho Lee , Youngsok Kim, Jangwoo Kim, Jong Kim POSTECH, Korea 2014-5-19

Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Stealing Webpages Rendered on Your Browser by Exploiting GPU

Vulnerabilities

2014 IEEE Symposium on Security and Privacy

Sangho Lee, Youngsok Kim, Jangwoo Kim, Jong Kim

POSTECH, Korea

2014-5-19

Page 2: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Graphics Processing Unit (GPU)

•An essential component of modern computers• Graphics APIs (DirectX, OpenGL)

• Computing APIs (CUDA, OpenCL)

•Various applications• Game/graphics applications

• Data analysis tools

• Security applications• Cryptographic engines

• Intrusion detection systems

2014 IEEE Symposium on Security and Privacy 2

Is GPU

secure?

Page 3: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

GPU Can Be Shared

•GPU cluster• Multiple users can use GPUs to perform computing

tasks in a time-sharing fashion.

•Personal computer/workstation• A foreground user solely uses a GPU for graphics

tasks.

• Background users can use the GPU for computing tasks.

2014 IEEE Symposium on Security and Privacy 3

Can attacker access other’s data

remaining in GPU memory?

Page 4: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Isn’t It Familiar?

2014 IEEE Symposium on Security and Privacy 4

It’s me!

A GPU memory dump obtained

after visiting google.com

Sensitive data

are leaked!

Page 5: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Motivation and Research Goal

•Motivation• Lack of an in-depth study of GPU security problems

• Sensitive data leakage through a disclosed GPU memory

•Research goal• Establish and emphasize GPU security problems

• Discover and specify the security problems of GPUs

• Develop widely-applicable security attacks on GPUs

2014 IEEE Symposium on Security and Privacy 5

Page 6: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Contents

• Introduction

•GPU Basics and Concerns

•Disclosing GPU Memory

• Inferring Browsing History from GPUs

•Discussion

•Conclusion

2014 IEEE Symposium on Security and Privacy 6

Page 7: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

High-level Architecture of GPU

2014 IEEE Symposium on Security and Privacy 7

Processing

Element

Private

Memory

Processing

Element

Local Memory

Private

Memory

Compute Unit

Processing

Element

Private

Memory

Processing

Element

Local Memory

Private

Memory

Compute Unit

Compute Device

Global/Constant Memory

CPU Memory

PCIe bus

Page 8: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Security Concerns about GPU

•Uninitialized memory• GPUs do not initialize the contents of newly allocated

memory pages.

•Unerasable memory• Some memory types cannot be deleted even

manually.• Constant memory, codes, call-by-value arguments

•Manually-managed memory• No isolation mechanism exists for the private and

local memories of GPUs.

2014 IEEE Symposium on Security and Privacy 8

Page 9: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Contents

• Introduction

•GPU Basics and Concerns

•Disclosing GPU Memory

• Inferring Browsing History from GPUs

•Discussion

•Conclusion

2014 IEEE Symposium on Security and Privacy 9

Page 10: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

System and Attack Models

•Target GPU system• Run both graphics and computing tasks

• Support multiple users

•Victim• Use GPU-accelerated programs

• Occupy the system’s screen to use graphics APIs

•Attacker• Have no root privilege (another normal user)

• Can access the GPU to use computing APIs

• Attempt to attack the victim by using the GPU

2014 IEEE Symposium on Security and Privacy 10

Page 11: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

GPU Execution Flow and Attack Points

•After kernel termination• Disclose private/local memories to obtain the results of a

kernel function

•After context destruction• Disclose global memory to obtain the final results, kernel

codes, arguments, …

2014 IEEE Symposium on Security and Privacy 11

Create

GPU

context

Allocate

GPU

memory

Copy data

from CPU

to GPU

Execute a

kernel*Copy data

from GPU

to CPU

Free GPU

memory

Destroy

GPU

context

* a function

written to run

on GPUs

kernel terminationcontext destruction

Page 12: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Recognizing Victim’s Activities

•Recognizing kernel termination• GPU queues kernels and executes them one at a time.

• By measuring the delay of kernel execution, attackers can identify whether a victim executes a kernel.

•Recognizing context destruction• By monitoring the available memory size, attackers

can identify the activities of a victim.

2014 IEEE Symposium on Security and Privacy 12

* 2687 MB in total

Page 13: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Contents

• Introduction

•GPU Basics and Concerns

•Disclosing GPU Memory

• Inferring Browsing History from GPUs

•Discussion

•Conclusion

2014 IEEE Symposium on Security and Privacy 13

Page 14: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

GPU-accelerated Webpage Rendering

• Textures uploaded to GPU memory are rearranged.• Recovering is almost impossible.

•Can we infer the original webpage from rearranged textures?• We compare the similarity between the victim’s dump

with some data of popular webpages.

2014 IEEE Symposium on Security and Privacy 14

webpage texturetexturetexture

Web browser

GPU

upload

result

convert

dump

texturetextureRearranged

texture

recoverable?inferable?

Page 15: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Attack Scenarios

•Attack using GPU memory dumps• Prepare the dumps of popular webpages by using

the same GPU that a victim uses

• Compare a victim’s dump with the prepared dumps

•Attack using webpage snapshots• Prepare the image snapshots of popular webpages

by using any systems

• Compare a victim’s dump with the prepared snapshots

2014 IEEE Symposium on Security and Privacy 15

Page 16: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Pixel Sequence Matching

•Extract non-black and non-white contiguous pixel sequences from GPU memory dumps• Black: cannot be distinguished with zero

• White: the default background color of webpages

•Compute Jaccard Index between pixel sequence sets

2014 IEEE Symposium on Security and Privacy 16

dump1 dump2

set1set2

𝑠𝑒𝑡1 ∩ 𝑠𝑒𝑡2𝑠𝑒𝑡1 ∪ 𝑠𝑒𝑡2

=2

7Jaccard Index:

Page 17: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Pixel Sequence Similarity

The similarity between the same pages is higher than that of different pages.

• The front pages of Alexa Top 1000 domains

• Visiting each page 10 times

2014 IEEE Symposium on Security and Privacy 17

Chrome/NVIDIA GPU Firefox/AMD GPU

0.865

0.014

0.888

0.060

Page 18: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

RGB Histogram Matching

•Derive non-black and non-white RGB histograms from GPU memory dumps• RGB histogram: a tuple of red, green, and blue channels

(256 values for each)

•Compute Euclidean distance between histograms• Divide each value by the sum of all 768 values

(normalization)

• Use a random projection for dimensionality reduction

2014 IEEE Symposium on Security and Privacy 18

pixel: (128,64,32)

r128g64 b32

+1 +1 +1

Page 19: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

RGB Histogram Distance

2014 IEEE Symposium on Security and Privacy 19

Chrome/NVIDIA GPU Firefox/AMD GPU

0.0040.210 0.004

0.150

The distance between the same pages is shorter than that of different pages.

Page 20: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Pixel Sequence vs. RGB Histogram

•Pixel sequence matching• Do not work when two dumps originate from

different generation/vendor GPUs

• Have slow matching speed• Take ~0.451s to compare two dumps

•RGB histogram matching• Work even when two dumps originate from different

generation/vendor GPUs

• Have fast matching speed• take ~0.002s to compare two dumps

2014 IEEE Symposium on Security and Privacy 20

* Measured at Intel Core i7-2600, 8 GB

Page 21: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Inference Accuracy

•Combined matching• Use pixel sequence matching to select top-k similar

dumps

• Apply RGB histogram matching on the selected dumps

• Inferring random 100 pages of Top 1000 domain• Best accuracy: 95.4% of Chromium with NVIDIA GPU

2014 IEEE Symposium on Security and Privacy 21

NVIDIA AMD

Page 22: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Attack using Webpage Snapshot

•Preparing webpage snapshots• Use PhantomJS to take image snapshots

•Histogram distance b/w dumps and snapshots

• Inference accuracy• Chrome: ~50%, Firefox: ~22%

2014 IEEE Symposium on Security and Privacy 22

Chrome/NVIDIA GPU Firefox/NVIDIA GPU

0.0640.214

~0.3

Dumps have many

non-texture data.

Page 23: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Contents

• Introduction

•GPU Basics and Concerns

•Disclosing GPU Memory

• Inferring Browsing History from GPUs

•Discussion

•Conclusion

2014 IEEE Symposium on Security and Privacy 23

Page 24: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Discussion

•Mitigation• Initialize newly allocated memory pages

• Delete the entire private and local memories at each GPU context switch

•Unavoidable performance degradation• GPU context switch cost: <25μs

• Clearing cost of the private/local memories: ~80μs

2014 IEEE Symposium on Security and Privacy 24

We need efficient solutions.

* Measured at NVIDIA GeForce GTX 780

Page 25: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Conclusion

•We analyze and emphasize the security problems of GPUs.• Conduct an in-depth study of GPU security problems

• Describe attacks to reveal sensitive data kept in GPU memory

• Apply the attacks on popular web browsers

•Effective countermeasures need to be developed.

2014 IEEE Symposium on Security and Privacy 25

Page 26: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Backup Slides

2014 IEEE Symposium on Security and Privacy 26

Page 27: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Regional Google’s

Have different time vs. memory usage patterns

2014 IEEE Symposium on Security and Privacy 27

Page 28: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Pixel Sequence Matching between Same Page Dumps from Different GPUs

The same webpage dumps from different GPUs are treated different.

2014 IEEE Symposium on Security and Privacy 28

Page 29: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Histogram Matching between Different GPUs

2014 IEEE Symposium on Security and Privacy 29

Dumps from different generation/vendor GPUs can be distinguished.

Page 30: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Two Tabs

2014 IEEE Symposium on Security and Privacy 30

Textures of the foreground tab remain.

Page 31: Stealing Webpages Rendered on Your Browser by Exploiting ...gpu-slides.pdf · •GPU queues kernels and executes them one at a time. •By measuring the delay of kernel execution,

Two Windows

Textures of the lastly opened window remain.

2014 IEEE Symposium on Security and Privacy 31