45
Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran, Zhen Ni, Harpreet Singh Chawla, Neel Shah, Timothy Wood and Emery Berger †. The George Washington University University of Massachusetts, Amherst 1

Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

  • Upload
    others

  • View
    18

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Scalable Cloud Security via Asynchronous Virtual Machine Introspection

Sundaresan (sunny) Rajasekaran, Zhen Ni, Harpreet Singh Chawla, Neel Shah, Timothy Wood and Emery Berger†.

The George Washington University †University of Massachusetts, Amherst

1

Page 2: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Introduction• Software will always be vulnerable to attacks.

• Existing techniques for prevention are slow to detect attacks.

• Need a way for cloud platforms to provide security functionality as a service.

2

Page 3: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Introduction• Software will always be vulnerable to attacks.

• Existing techniques for prevention are slow to detect attacks.

• Need a way for cloud platforms to provide security functionality as a service.

How can the cloud detect attacks inside a VM?How to provide strong security guarantees at low cost?

2

Page 4: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

ScaaS• Scanning as a Service framework for security in

cloud data centers.

• Scans for a wide range of attacks within both application and the operating system.

• Uses an asynchronous checkpointing mechanism to replicate a VM’s memory onto a Scanner host for analysis.

• Uses VM introspection techniques to study the memory of the virtual machine.

3

Page 5: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Where do we stand?

4

Ove

rhea

d

window for vulnerability

Page 6: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Where do we stand?

4

Ove

rhea

d

window for vulnerability

MemorySafety toolseg: valgrind

Page 7: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Where do we stand?

4

Ove

rhea

d

window for vulnerability

MemorySafety toolseg: valgrind

VirusScanners.eg: McAfee

Page 8: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Where do we stand?

4

Ove

rhea

d

window for vulnerability

MemorySafety toolseg: valgrind

VirusScanners.eg: McAfee

ScaaS

Page 9: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Scanner Host

ScaaS Architecture

• VMs periodically send checkpoints to the Scanners for analysis.

• A Scanner host uses VM introspection techniques to search for evidence of vulnerabilities.

• Ensures integrity of Key Kernel data structures.

Primary Hosts

VMVM

ScaaS Agent

ScaaS Agent

5

Page 10: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Scanner Host

ScaaS Architecture

• VMs periodically send checkpoints to the Scanners for analysis.

• A Scanner host uses VM introspection techniques to search for evidence of vulnerabilities.

• Ensures integrity of Key Kernel data structures.

Primary Hosts

VMVM

ScaaS Agent

ScaaS Agent Check

points

5

VM VM VM VMCP

HistoryCP

HistoryCP

HistoryCP

History

Page 11: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Scanner Host

ScaaS Architecture

• VMs periodically send checkpoints to the Scanners for analysis.

• A Scanner host uses VM introspection techniques to search for evidence of vulnerabilities.

• Ensures integrity of Key Kernel data structures.

Primary Hosts

VMVM

ScaaS Agent

ScaaS Agent Check

points

Introspected VM

UnmodifiedKernel

AppApp

Syscall Table Slab

5

VM VM VM VMCP

HistoryCP

HistoryCP

HistoryCP

History

Page 12: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

VM Checkpointing

VM execution timeline

Checkpoints

6

interval10 - 100 ms

VM

VM’s Memory is clean

t0

Page 13: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

VM Checkpointing

VM execution timeline

Checkpoints

6

interval10 - 100 ms

VM

VM’s Memoryis dirtied

t0

Page 14: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

VM Checkpointing

VM execution timeline

Checkpoints

6

interval10 - 100 ms

VM

VM’s Memoryis dirtied

Send dirty pages

..

t0

Page 15: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

VMI Scanner

Replica RAM

VM Checkpointing

VM execution timeline

Checkpoints

6

interval10 - 100 ms

VM

VM’s Memoryis dirtied

Send dirty pages

..

t0

Page 16: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

VMI Scanner

Replica RAM

VM Checkpointing

VM execution timeline

Checkpoints

6

interval10 - 100 ms

VM

VM’s Memoryis dirtied

Send dirty pages

..Kernel

Apachesshd

t0

Page 17: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

VM Checkpointing

VM execution timeline

Checkpoints

6

interval10 - 100 ms

VM

VM’s Memoryis dirtied

t0

Page 18: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

VM Checkpointing

VM execution timeline

Checkpoints

6

interval10 - 100 ms

VM

VM’s Memoryis dirtied

Send dirty pages

..

t0

Page 19: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

VM Checkpointing

VM execution timeline

Checkpoints

6

interval10 - 100 ms

VM

VM’s Memoryis dirtied

Send dirty pages

..

VMI Scanner

t0

Page 20: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

VM Checkpointing

VM execution timeline

Checkpoints

6

interval10 - 100 ms

VM

VM’s Memoryis dirtied

Send dirty pages

..

VMI Scanner

Kernel

Apachesshd

t0

Page 21: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Primary HostNetwork Buffer

VM

Client

Network buffering using Remus in Xen

• All network packets are buffered for each interval.

• The buffer content is released only at the end of the interval.

ith interval

7

ti-1 ti

Page 22: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Primary HostNetwork Buffer

VM

Client

Network buffering using Remus in Xen

• All network packets are buffered for each interval.

• The buffer content is released only at the end of the interval.

RX

ith interval

7

ti-1 ti

Page 23: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Primary HostNetwork Buffer

VM

Client

Network buffering using Remus in Xen

• All network packets are buffered for each interval.

• The buffer content is released only at the end of the interval.

TX

RX

ith interval

7

ti-1 ti

Page 24: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Primary HostNetwork Buffer

VM

Client

Network buffering using Remus in Xen

• All network packets are buffered for each interval.

• The buffer content is released only at the end of the interval.

TX

RX

TX

ith interval

7

ti-1 ti

Page 25: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Primary HostNetwork Buffer

VM

Client

Network buffering using Remus in Xen

• All network packets are buffered for each interval.

• The buffer content is released only at the end of the interval.

TX

RX

TX

ith interval

RX

7

ti-1 ti

Page 26: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Primary HostNetwork Buffer

VM

Client

Network buffering using Remus in Xen

• All network packets are buffered for each interval.

• The buffer content is released only at the end of the interval.

TX

RX

TX TXith interval

RX

7

ti-1 ti

Page 27: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Primary HostNetwork Buffer

VM

Client

Network buffering using Remus in Xen

• All network packets are buffered for each interval.

• The buffer content is released only at the end of the interval.

TX

RX

TX TX TX

ith interval

RX

7

ti-1 ti

Page 28: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Primary HostNetwork Buffer

VM

Client

Network buffering using Remus in Xen

• All network packets are buffered for each interval.

• The buffer content is released only at the end of the interval.

TX

RX

TX

RELE

ASE

TX TX

ith interval

RX

7

ti-1 ti

Page 29: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Primary HostNetwork Buffer

VM

Client

Network buffering using Remus in Xen

• All network packets are buffered for each interval.

• The buffer content is released only at the end of the interval.

TX

RX

TX

RELE

ASE

TX TX

RX

ith interval

RX

7

ti-1 ti

Page 30: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Primary HostNetwork Buffer

VM

Client

Network buffering using Remus in Xen

• All network packets are buffered for each interval.

• The buffer content is released only at the end of the interval.

TX

RX

TX

RELE

ASE

TX TX

RX RX

ith interval

RX

7

ti-1 ti

Page 31: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Primary HostNetwork Buffer

VM

Client

Network buffering using Remus in Xen

• All network packets are buffered for each interval.

• The buffer content is released only at the end of the interval.

TX

RX

TX

RELE

ASE

TX TX

RX RX

TX

ith interval

RX

7

ti-1 ti

Page 32: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

ScaaS Execution

• Pause briefly at each checkpoint to be scanned for security vulnerabilities. • ScaaS says if it is safe to release the buffer. • If an attack is found, the VM can be rolled back and analyzed.

Inte

rval

i

ScaaS Execution Timeline

8

Page 33: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

ScaaS Execution

• Pause briefly at each checkpoint to be scanned for security vulnerabilities. • ScaaS says if it is safe to release the buffer. • If an attack is found, the VM can be rolled back and analyzed.

Inte

rval

i

ScaaS Execution Timeline

8

Page 34: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

ScaaS Execution

• Pause briefly at each checkpoint to be scanned for security vulnerabilities. • ScaaS says if it is safe to release the buffer. • If an attack is found, the VM can be rolled back and analyzed.

Inte

rval

i

ScaaS Execution TimelineIn

terv

al i+1

Paus

e an

d Sa

veSc

an C

heck

poin

tRe

leas

e O

utpu

ts

Async CheckpointBuffer Outputs

8

Page 35: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

ScaaS Execution

• Pause briefly at each checkpoint to be scanned for security vulnerabilities. • ScaaS says if it is safe to release the buffer. • If an attack is found, the VM can be rolled back and analyzed.

Inte

rval

i

ScaaS Execution TimelineIn

terv

al i+1

Paus

e an

d Sa

veSc

an C

heck

poin

tRe

leas

e O

utpu

ts

Async CheckpointBuffer Outputs

8

Page 36: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

ScaaS Execution

• Pause briefly at each checkpoint to be scanned for security vulnerabilities. • ScaaS says if it is safe to release the buffer. • If an attack is found, the VM can be rolled back and analyzed.

Inte

rval

i

ScaaS Execution TimelineIn

terv

al i+1

Paus

e an

d Sa

veSc

an C

heck

poin

tRe

leas

e O

utpu

ts

Async CheckpointBuffer Outputs

ScanFails

8

Page 37: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

ScaaS Execution

• Pause briefly at each checkpoint to be scanned for security vulnerabilities. • ScaaS says if it is safe to release the buffer. • If an attack is found, the VM can be rolled back and analyzed.

Inte

rval

i

ScaaS Execution TimelineIn

terv

al i+1

Paus

e an

d Sa

veSc

an C

heck

poin

tRe

leas

e O

utpu

ts

Async CheckpointBuffer Outputs

Async CheckpointBuffer Outputs

ScanFails

Detectand

Replay

Rollback

8

Page 38: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Attack Detection and Response

• Forensic analysis: Do analysis that cannot be done on runtime.

• Rollback and Replay: Useful when using breakpoints that trigger errors such as buffer overflow.

• Honeypot mode: Resume and run in a sandbox.

9

Page 39: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Prototype Evaluation

• Prototype of ScaaS using Xen 4.5.2

• 1Gbps link between Primary and Scanner host.

• Checkpointing using Remus.

• VM introspection using libVMI.

10

Page 40: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Types of Scans• Process Black/White List Enforcer:

• Determines current running processes in a VM.Triggers errors depending on whether a target process is running or not.

• Memory Fingerprinter:

• Hashes the memory pages to compare against known good states. eg: sys call table, that doesn’t change that often.

11

Page 41: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

0

0.2

0.4

0.6

0.8

1

0 20 40 60 80 100 120 140 160 180 200

Nor

mal

ized

Per

form

ance

Checkpoint Interval(ms)

httperfsudokut

sysbench

• Benchmarks vs. different checkpoint intervals • CPU intensive benchmarks perform well with longer intervals • httperf is a latency sensitive benchmark

• Longer the interval worse the performance.

Checkpoint overhead

12

Page 42: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

• Performance change of application w.r.t. emulated scan costs.

• Normalized wrt to zero-cost scan • httperf costs worsens with scan cost

• as it has to hold buffer data for longer periods

0

0.2

0.4

0.6

0.8

1

16 64 256 1024 4096

Nor

mal

ized

Per

form

ance

Emulated scan cost(us)

httperfsudokut

sysbench

Emulated Scan cost

13

Page 43: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

• Fingerprinter causes high overhead initially but becomes negligible as checkpointing interval increase.

0

20

40

60

80

100

0 20 40 60 80 100 120 140 160 180 200

Scan

ner C

PU u

sage

(%)

Checkpoint Interval(ms)

httperf-fingerprinthttperf

sudokutsysbench

CPU usage at scanner host

14

Page 44: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Conclusion• ScaaS: Framework for security Scanning as a

Service.

• Tool for attack detection and forensic analysis on memory.

• examining memory checkpoints for an attack.

• highly scalable and fast.

15

Page 45: Scalable Cloud Security via Asynchronous Virtual Machine … · 2019-12-18 · Scalable Cloud Security via Asynchronous Virtual Machine Introspection Sundaresan (sunny) Rajasekaran,

Discussion

• What types of attacks can we detect?

• Do we need to keep a history of checkpoints? Why? How?

• What is a reasonable cost for ScaaS?

16