automated defense from rootkit attacks

49
1 Automated Defense from Rootkit Attacks Arati Baliga and Liviu Iftode Computer Science Department Rutgers University 110 Frelinghuysen Road, Piscataway, NJ Xiaoxin (Mike) Chen VMware Inc. 3145 Porter Drive Palo Alto, CA

Upload: ultrauploader

Post on 16-Apr-2017

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Automated defense from rootkit attacks

1

Automated Defense from Rootkit Attacks

Arati Baliga and Liviu IftodeComputer Science Department

Rutgers University110 Frelinghuysen Road, Piscataway, NJ

Xiaoxin (Mike) ChenVMware Inc.

3145 Porter DrivePalo Alto, CA

Page 2: Automated defense from rootkit attacks

2

About UsLaboratory of Distributed Computing (DISCO Lab)

Headed by Prof. Liviu Iftode10 graduate studentshttp://discolab.rutgers.edu

ProjectsRemote Healing Using Backdoors

Remote repair/recovery of operating system and application state.

Defensive Architectures Automated defense against attacks and intrusions

Page 3: Automated defense from rootkit attacks

3

OutlineMotivationBackgroundOur ApproachPrototypeWork in ProgressFuture WorkRelated WorkConclusion

Page 4: Automated defense from rootkit attacks

4

MotivationWith the increasing attack trends, human response to intrusions is too slow or not possible

Software and OS vulnerabilitiesFast spreading worms (SQL Slammer)

We need systems that can detect intrusions automatically as early as possible and recover

Page 5: Automated defense from rootkit attacks

5

OutlineMotivationBackgroundOur ApproachPrototypeWork in ProgressFuture WorkRelated WorkConclusion

Page 6: Automated defense from rootkit attacks

6

Viruses and Worms Viruses replicate by modifying a normal program/file with a copy of itself.

Execution in the host program/file results in the execution of the virusUsually needs human action to execute infected progam

Worms are stand-alone programs that spread through the network by exploiting vulnerabilities in services.

Page 7: Automated defense from rootkit attacks

7

RootkitsCollection of tools used by the attacker to hold root privileges on the compromised system. Rootkit hiding mechanism:

User-level rootkitsReplace system binaries like ps and netstat

Shared library rootkitsReplace shared libraries

Kernel-level rootkitsReplace entries in system call table Replace entries in interrupt descriptor tableReplace kernel/module text.

Compromise system integrity

Page 8: Automated defense from rootkit attacks

8

Stealth MalwareIncreasing number of virus/worm writers use rootkits to evade detection from anti-virus software.

Stealth AOL worm

In this talk, we refer to this group of malware that hide using rootkit techniques as “stealth malware”.

Page 9: Automated defense from rootkit attacks

9

Intrusion Timeline

Damage done to the system from t1-t3 needs to be discovered and undone – this takes time!Ideally intrusion should be detected at t1(Prevention)

Easier for known attacksHard for new/unknown attacks

Intrusion Detection SystemsMove t3 closer to t2 Recover (undo damage)Can t3 be moved between t1 and t2?

Happens at time t1 Manifests at time t2 Detected at time t3

Damage done to the system

Page 10: Automated defense from rootkit attacks

10

Intrusion Detection Systems (IDS)Detection methods

Signature based detectionMisuse detectionAnomaly detection

Detection LocationHost Based IDSNetwork Based IDS

Page 11: Automated defense from rootkit attacks

11

IDS ImplementationStand-alone systems: Copilot[Arbaugh et al], Backdoors[Bohra et al]

Independent secure device Polling based approachesDoes not consume CPU cycles

Virtualized Environment [VMI, Mendel et al]Can intercept events in the virtual machineCan interpose/change virtual machine state to perform preventive/healing actions

Page 12: Automated defense from rootkit attacks

12

Ideal IDS PropertiesPrevent system from being compromisedDetect intrusion asap if prevention is not possible.Once intrusion is detected, recover the system to restore faith in the system.

TransparentlyReveal to the user the damage that has occurred.

Generate an attack profile

Page 13: Automated defense from rootkit attacks

13

OutlineMotivationBackgroundOur ApproachPrototypeWork in ProgressFuture WorkRelated WorkConclusion

Page 14: Automated defense from rootkit attacks

14

Our ApproachDetect malicious process when it performs illegal access to protected zones.

Track dependencies between files and processes to undo damage automatically

Undo damage

Page 15: Automated defense from rootkit attacks

15

Protected Zones

Fig. 1. Figure shows the protected parts of the memory and filesystem that are shaded in pink. This represents the core of the system, which is always protected. The unshaded portions consist of all other files and running programs, which can be compromised at any time.

Page 16: Automated defense from rootkit attacks

16

Protected Zones (cont’d)Core System Files

Normally do not change during the lifetime of the systemExamples: ps, ls, netstat, etc.

Service FilesCan be added by administrator depending on which service needs to be protected.Example: apache binary

Page 17: Automated defense from rootkit attacks

17

Our ApproachDetect malicious process when it performs illegal access to protected zones.

Track dependencies between files and processes to undo damage automatically

Undo damage

Page 18: Automated defense from rootkit attacks

18

Track DependenciesInfer dependencies

Dependencies between files and processes.Parent-child relationships between processes.

Store dependenciesCreate a tree of dependencies (Dependency tree)Dependency tree is stored in a database.Dependency tree size has to be small enough to provide fast undo.

Page 19: Automated defense from rootkit attacks

19

Infer DependenciesGet system call data (number, arguments)

Page directory base identifies process uniquelycr3 register on the x86 platform

File identified by full pathname

Page 20: Automated defense from rootkit attacks

20

Infer Dependencies (cont’d)On fork

Child has same <esp,eip> but different cr3When processes executed from the same program, fork at a given point, all children have same <esp,eip>Ambiguities are resolved using physical page number of stack pageRelies on Linux fork copy-on-write semantics

Apply dependency rules

Page 21: Automated defense from rootkit attacks

21

Dependency Tree

P3

P2

P1

P4

F1

c

P1 creates P2

P2 exitsP2 P1 creates P3

P1 creates P4

P3 creates F1

P4 creates F2F2

c

F1 is deleted

P4 exits

P1 exits

Page 22: Automated defense from rootkit attacks

22

Dependency StorageSize of the dependency tree created is proportional to the number of new files and processes created on the file system.

Storage requirements are modestDependency rules prune entries that are no longer required

The dependency tree lives until system is rebooted

Page 23: Automated defense from rootkit attacks

23

Our ApproachDetect malicious process when it performs illegal access to protected zones.

Track dependencies between files and processes to undo damage automatically

Undo damageIdentify and kill malicious processes using the dependency treeFiles not deleted

Page 24: Automated defense from rootkit attacks

24

Containment StepsAssumes a process resident set that always exists in the system.Refer to dependency tree and locate malicious subtreeKill all possible malicious processesPrevents ill-effects

Installation/Existence of backdoors.Keyloggers

Page 25: Automated defense from rootkit attacks

25

Containment Algorithm

P3

P1

P4

F1

c

P2

F2

c

P0P0 in the resident set

Malicious subtree

Malicious write

Page 26: Automated defense from rootkit attacks

26

OutlineMotivationBackgroundOur ApproachPrototypeWork in ProgressFuture WorkRelated WorkConclusion

Page 27: Automated defense from rootkit attacks

27

Paladin Prototype

Page 28: Automated defense from rootkit attacks

28

System Calls

mmap, sockets, named pipes will be added later

Page 29: Automated defense from rootkit attacks

29

Implementation DetailsGuest OS must be non-pageablePaladin driver

Has knowledge of Guest OS kernelPerforms symbol lookup of kernel text and jump tablesAlso responsible for carrying out undo actions

Page 30: Automated defense from rootkit attacks

30

Performance Evaluation

56 mins and 7 secs

8 mins 30 secs

System calls(slow path)With Paladin

31 mins and 54 secs53 mins and 3 secsCompileKernel

3 mins and 46 secs7 mins and 29 secsKernel Copy

Optimized VMM(Fast path syscalls)

System calls (slow path)Without Paladin

• VMware workstation software• Database: MySQL• Guest OS and Host OS: Linux 2.4 kernel.

Page 31: Automated defense from rootkit attacks

31

System Calls Tracked

Total system calls v/s system calls processed by Paladin

Performance of individual system calls

Page 32: Automated defense from rootkit attacks

32

Test CasesUser level rootkit

Ambient Rootkit (ARK)

Kernel level rootkitSuckIt

Linux WormLion

Page 33: Automated defense from rootkit attacks

33

User-Level Rootkit: Ambient (ARK)

The security framework prevents corruption of all the system tools

Point of detection

/bin/login

Page 34: Automated defense from rootkit attacks

34

Kernel-Level Rootkit: SuckItModifies instructions in sys_call to redirect to it’s own system call table.Does not touch original system call tableWorks even when kernel module support is disabledProvides covert backdoor that is activated on receiving a special packet.The security framework prevents corruption of kernel text and installation of the backdoor.

Page 35: Automated defense from rootkit attacks

35

Worm: Lion

/bin/ps

c

Detection point

/bin/mv

c

Page 36: Automated defense from rootkit attacks

36

LimitationsCurrent implementation does not prevent

Corruption of resident processesOverwriting disk blocks.

Rootkit attacks that corrupt data without changing any kernel code or tables are not detected

Ex: FU rootkit (Next generation rootkits ?)

Page 37: Automated defense from rootkit attacks

37

OutlineMotivationBackgroundOur ApproachPrototypeWork in ProgressFuture WorkRelated WorkConclusion

Page 38: Automated defense from rootkit attacks

38

Work in Progress: FingerprintingEarly attack identification through fingerprint matching

Find them before they hide

Automated identification of attacker’s files

Page 39: Automated defense from rootkit attacks

39

Fingerprinting StepsDynamic cloning

Spawn a clone upon attack detection

SandboxingReconfigure network properties

Fine-grained monitoringWatch the processes in the malicious subtreeFiner control possible.

Page 40: Automated defense from rootkit attacks

40

Example: ARK FingerprintFiles created/dev/capi20.20/sbin/syslogd/usr/lib/.ark?/bin/login/usr/sbin/sshd/bin/ls/usr/bin/du/bin/ps/usr/bin/pstree/usr/bin/killall/usr/bin/top/bin/netstat/var/run/syslogd.pid/var/spool/clientmqueue/dfj99KxukX001449/var/spool/clientmqueue/tfj99KxukX001449/var/spool/clientmqueue/dfj99L0HiX001457/var/spool/clientmqueue/tfj99L0HiX001457/var/spool/clientmqueue/dfj99L0cv1001466/var/spool/clientmqueue/tfj99L0cv1001466/var/spool/clientmqueue/dfj99L0w2M001475/var/spool/clientmqueue/tfj99L0w2M001475

Processes:/tmp/ark1.01/ark/bin/rm/sbin/syslogd/bin/cp/usr/sbin/sshd/bin/chmod/bin/cat/bin/hostname/sbin/ifconfig/bin/grep/bin/awk/bin/sed/sbin/modprobe/usr/lib/sendmail/usr/lib/libhesiod.so.0

Page 41: Automated defense from rootkit attacks

41

Future WorkIntrusion detection through system call anomalies

Generate behavioural profiles using statistical/learning techniques

Intrusion detection through network packet monitoring

Collaborative detection across VMsSharing attack fingerprintsCross node detection

Page 42: Automated defense from rootkit attacks

42

OutlineMotivationBackgroundOur ApproachPrototypeFuture WorkRelated WorkConclusion

Page 43: Automated defense from rootkit attacks

43

Related WorkModel for Intrusion Detection

VMI

Automated DetectionCopilot, Strider Ghostbuster, Tripwire

Automated Post-Intrusion Analysis and RepairRepairable File ServiceBacktracker

Automated Online DefenseIntrovert, Vigilante

Page 44: Automated defense from rootkit attacks

44

Model for Intrusion DetectionVMI

Virtual Machine based Introspection (VMI) for Intrusion Detection [NDSS ‘03]

Page 45: Automated defense from rootkit attacks

45

DetectionTools available for rootkit detection

Kstat, Chkrootkit, St. Michael, Samhain, F-Secure BlackLight, RootkitRevealer, Tripwire, AIDE

Copilot Automated detection from an independent PCI device [Security ‘03]

Strider GhostbusterA cross-view diff-based approach. [DSN ‘05]

Page 46: Automated defense from rootkit attacks

46

Post-Intrusion Analysis and RepairAid to the administrator

Fix the filesystem and keep good changesFind how the intrusion happened

RFS, TaserDesign, Implementation and Evaluation of Repairable File Service [DSN ‘03]The Taser Intrusion Recovery System [SOSP ‘05]

BackTrackerBacktracking Intrusions [SOSP ‘03]

Page 47: Automated defense from rootkit attacks

47

Online DefenseProvides online defense against intrusions

IntrovertDetecting Past and Present Intrusions Through Vulnerability-Specific Predicates [SOSP ‘05]

VigilanteVigilante: End-to End Containment of Internet Worms [SOSP ’05]

Page 48: Automated defense from rootkit attacks

48

ConclusionThe steadily increasing rate of attacks and intrusions requires a robust automated solutionWe have designed an approach that protects the system from rootkit attacks and contains the effects of stealth malware that use rootkits to hide.We developed a prototype that demonstarted our approach that could sucessfully counter a user-level rootkit, a kernel-level rootkit and a worm that used rootkit techniques to hide

Page 49: Automated defense from rootkit attacks

49

Thank You !

http://discolab.rutgers.edu

This work is supported by NSF CCR #0133366