24
ReVirt: Enabling Intrusi on Analysis through Virt ual-Machine Logging and Replay George W. Dunlap, Samuel T. King, Sukru Cinar, Murtaza A. Basrai, Peter M. Chen Department of Electrical Engineering and Computer Scie nce University of Michigan OSDI’2002 2006. 11. 29. Yu, Young Jin

ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

  • Upload
    ponce

  • View
    56

  • Download
    3

Embed Size (px)

DESCRIPTION

OSDI’2002. ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay. George W. Dunlap, Samuel T. King, Sukru Cinar, Murtaza A. Basrai, Peter M. Chen Department of Electrical Engineering and Computer Science University of Michigan. 2006. 11. 29. Yu, Young Jin. - PowerPoint PPT Presentation

Citation preview

Page 1: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging a

nd Replay

George W. Dunlap, Samuel T. King, Sukru Cinar, Murtaza A. Basrai, Peter M. Chen

Department of Electrical Engineering and Computer ScienceUniversity of Michigan

OSDI’2002

2006. 11. 29.

Yu, Young Jin

Page 2: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

Questions !

• What is the “ReVirt” ?

• Why does it do so ? The goals ?

• Any Relations with VM?

• Work Correctly ? And Performance ?

Page 3: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

Questions !

• What is the “ReVirt” ?

• Why does it do so ? The goals ?

• Any Relations with VM?

• Work Correctly ? And Performance ?

Function, Architecture, …

Page 4: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

What is the “ReVirt” ?

• Is a Replay Service for Virtual Machines• ReVirt

– logs enough information to replay an execution of a virtual machine inst-by-inst.

– View the entire state of the system at an arbitrary point in history• reconstructing an attack

Page 5: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

The ReVirt System

• OS-on-OS structure

• VMM => loadable module + some hooks in the kernel

• Moving Services Beneath a Virtual Machine

Page 6: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

Questions !

• What is the “ReVirt” ?

• Why does it do so ? The goals ?

• Any Relations with VM?

• Work Correctly ? And Performance ?

Why beneath VM ?

Why Replaying ?

Page 7: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

Current Logging System

Page 8: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

To solve the two problems

• To improve integrity,– encapsulates the target system inside a VM, t

hen places the logger beneath this VM.– ReVirt continues to log the actions of intruders

even if they replace the target boot block or the target kernel.

Page 9: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

To solve the two problems

• To improve the completeness,– replay the complete, instruction-by-instruction

execution of the VM.– ReVirt adapts techniques such as checkpointin

g, logging, roll-forward recovery.

Page 10: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

Questions !

• What is the “ReVirt” ?

• Why does it do so ? The goals ?

• Any Relations with VM?

• Work Correctly ? And Performance ?Any VM technology ?

Page 11: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

UMLinux: Linux on Linux

• Linux ported to run on ‘Linux’ arch.– OS-on-OS structure(vs. direct-on-host)

• Guest OS and all applications run within a single host process.

• But the authors were not happy with the original UMLinux.

Page 12: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

Original UMLinux

Page 13: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

Use VMM as a Kernel module

Modification to

Host OS also…

(+510 lines)

Modified UMLinux

Page 14: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

Emulation

• UMLinux provides a software analogy to each peripheral device in a normal computer system.

• How to distinguish between system calls issued by a guest application and those issued by a guest kernel ?

Page 15: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

System Call Flow

Guest App. Guest Kernel Host KernelVMM

( int 0x80 )

VMM var.== kernel

access a host device, ...

( int 0x80 )

VMM var.== user

SIGUSR1Emulatesystemcall

Page 16: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

Trusted Computing Base for UMLinux

• TCB for an OS-on-OS structure can be much smaller than the complete host OS.– VMM restricts the guest kernel to use fewer th

an 7% of the system calls(host)– network traffic => mostly processed by guest

OS’s TCP and UDP stacks.

Page 17: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

Logging and Replaying UMLinux

• Replaying a process requires logging the non-deterministic events that affect the process’s computation.– Non-deterministic events

• Time– We must log the instruction at which the interrupt occurred

• External Input– keyboard, mouse, or network card

• Logging (similar to syslogd)– VMM and kernel hooks add log records to a circular bu

ffer in host kernel memory– user-level daemon(rlogd) consumes the buffer

Page 18: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

Questions !

• What is the “ReVirt” ?

• Why does it do so ? The goals ?

• Any Relations with VM?

• Work Correctly ? And Performance ?

• How do we know it’s doing the same thing?

• What’s the overhead of virtualization?

• What’s the overhead of logging?

Page 19: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

Experiment Setup

• AMD Athlon 1800+, 256 MB• Samsung SV4084 IDE Disk• Linux 2.4.18 guest/host• VM configured to use 192 MB Ram

Page 20: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

Validating ReVirt correctness

• Extensive error checking– At every system call and virtual

interrupt, we log all register values – and verify that these values are the

same during replay

Page 21: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

Validating ReVirt correctness

PASSED

Page 22: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

Experiment Workload

• POV-Ray raytracer– CPU-intensive

• Kernel build(Linux 2.4.18)– make clean; make dep; make bzImage

• NFS Kernel build– kernel stored on an NFS server

• SPEC Web 99– benchmark that measures web server performance

• Daily use test: 24hrs

Page 23: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

Virtualization Overhead

* UMLinux adds very little overhead for compute-intensive applications.

* The overheads for (2,3,4) are higher because they issue more guest kernel calls, each of which must be trapped by the VMM kernel module and reflected back to the guest kernel by sending a signal(SIGUSR1).* The overhead is low enough for normal desktop use.

Page 24: ReVirt: Enabling Intrusion Analysis through Virtual-Machine Logging and Replay

Logging and Replaying Overhead

* The time overhead of logging is small (at most 8%).

* Log growth rate (**) higher because of the need to log incoming packets* No perceptible time overhead relative to running without logging

* Sometimes much faster because replay skips over periods of idle time