Multi-Aspect Profiling of Kernel Rootkit Behavior
Ryan Riley, Xuxian Jiang, Dongyan Xu
Purdue University, North Carolina State University
EuroSys 2009 Nürnberg, Germany
Multi-Aspect Profiling of Kernel Rootkit Behavior Ryan Riley, - - PowerPoint PPT Presentation
Multi-Aspect Profiling of Kernel Rootkit Behavior Ryan Riley, Xuxian Jiang, Dongyan Xu Purdue University, North Carolina State University EuroSys 2009 Nrnberg, Germany Rootkits Stealthy malware Hide attacker Modifying the OS
Purdue University, North Carolina State University
EuroSys 2009 Nürnberg, Germany
2
3
4
5
functions
5
6
functions
6
7
8
8
User-level Applications
Virtual Machine Kernel Symbols & Kernel Object Types Virtual Machine Monitor
Logging and Context Tracking Logging and Context Tracking User-level Applications Guest Kernel Right-Before Detection
Profile Profile
Log Kernel Object Interpretation Kernel Object Interpretation
9
Logging and Context Tracking Logging and Context Tracking Right-Before Detection
10
Applications Guest OS VM VMM
11
VMM NICKLE Module
Standard Shadow
11
Applications Guest OS VM VMM
Memory Access
12
VMM NICKLE Module
Standard Shadow Memory Access
12
Applications Guest OS VM VMM
Memory Access
13
VMM NICKLE Module
Standard Shadow Memory Access Guest Kernel Instruction Fetch
13
Applications Guest OS VM VMM
Memory Access
14
VMM NICKLE Module
Standard Shadow Memory Access
14
Applications Guest OS VM VMM
Memory Access
15
VMM NICKLE Module
Standard Shadow Memory Access Memory Access Other
15
Applications Guest OS VM VMM
Memory Access
16
VMM NICKLE Module
Standard Shadow Memory Access
16
Applications Guest OS VM VMM
Memory Access
17
VMM NICKLE Module
Standard Shadow Memory Access Guest Kernel Instruction Fetch Memory Access Other
17
Applications Guest OS VM VMM
Memory Access
18
VMM NICKLE Module
Standard Shadow Memory Access Memory Access
18
Applications Guest OS VM VMM
Memory Access
19
VMM NICKLE Module
Standard Shadow Memory Access Memory Access Compare
19
20
20
User-level Applications
Virtual Machine Kernel Symbols & Kernel Object Types Virtual Machine Monitor
Logging and Context Tracking Logging and Context Tracking User-level Applications Guest Kernel Right-Before Detection
Profile Profile
Log Kernel Object Interpretation Kernel Object Interpretation
21
Kernel Symbols & Kernel Object Types
Logging and Context Tracking Logging and Context Tracking Log Kernel Object Interpretation Kernel Object Interpretation
22
23
23
24
25 25
init_task task_struct 0xc11a0000 task_struct 0xc11b0000 Static Objects Dynamic Objects
26
next_task 0xc11a0000 pid … init_task 0xc0300000 next_task 0xc11b0000 pid 1 … 0xc11a0000 next_task 0xc11c0000 pid 2 … 0xc11b0000
26
Static Objects Dynamic Objects
27 27
Static Objects Dynamic Objects
28 28
29 29
30 30
next_task 0xc11a0000 pid init_task 0xc0300000 next_task 0xc11b0000 pid 1 task_struct 0xc11a0000 next_task 0xc11c0000 pid 2 task_struct 0xc11b0000 Static Objects Dynamic Objects
31
0xc11a0000 0xc11b0000
…
0xc11c0000
… … Memory Map 0xc0300000 – task_struct Output
31
next_task 0xc11a0000 pid init_task 0xc0300000 next_task 0xc11b0000 pid 1 task_struct 0xc11a0000 next_task 0xc11c0000 pid 2 task_struct 0xc11b0000 Static Objects Dynamic Objects
0xc11a0000 0xc11b0000
…
0xc11c0000
… … Memory Map 0xc0300000 – task_struct Output
32
next_task 0xc11a0000 pid init_task 0xc0300000 next_task 0xc11b0000 pid 1 task_struct 0xc11a0000 next_task 0xc11c0000 pid 2 task_struct 0xc11b0000 Static Objects Dynamic Objects
33
0xc11a0000 0xc11b0000
…
0xc11c0000
… … Memory Map 0xc0300000 – task_struct Output
33
next_task 0xc11a0000 pid init_task 0xc0300000 next_task 0xc11b0000 pid 1 task_struct 0xc11a0000 next_task 0xc11c0000 pid 2 task_struct 0xc11b0000 Static Objects Dynamic Objects
0xc11a0000 0xc11b0000
…
0xc11c0000
… … Memory Map 0xc0300000 – task_struct Output
34
next_task 0xc11a0000 pid init_task 0xc0300000 next_task 0xc11b0000 pid 1 task_struct 0xc11a0000 next_task 0xc11c0000 pid 2 task_struct 0xc11b0000 Static Objects Dynamic Objects
0xc11a0000 0xc11b0000
…
0xc11c0000
… … Memory Map 0xc0300000 – task_struct 0xc11a0000 – task_struct Output
35
next_task 0xc11a0000 pid init_task 0xc0300000 next_task 0xc11b0000 pid 1 task_struct 0xc11a0000 next_task 0xc11c0000 pid 2 task_struct 0xc11b0000 Static Objects Dynamic Objects
36
0xc11a0000 0xc11b0000
…
0xc11c0000
… … Memory Map 0xc0300000 – task_struct 0xc11a0000 – task_struct Output
36
next_task 0xc11a0000 pid init_task 0xc0300000 next_task 0xc11b0000 pid 1 task_struct 0xc11a0000 next_task 0xc11c0000 pid 2 task_struct 0xc11b0000 Static Objects Dynamic Objects
0xc11a0000 0xc11b0000
…
0xc11c0000
… … Memory Map 0xc0300000 – task_struct 0xc11a0000 – task_struct Output
37
next_task 0xc11a0000 pid init_task 0xc0300000 next_task 0xc11b0000 pid 1 task_struct 0xc11a0000 next_task 0xc11c0000 pid 2 task_struct 0xc11b0000 Static Objects Dynamic Objects
38
0xc11a0000 0xc11b0000
…
0xc11c0000
… … Memory Map 0xc0300000 – task_struct 0xc11a0000 – task_struct Output
38
next_task 0xc11a0000 pid init_task 0xc0300000 next_task 0xc11b0000 pid 1 task_struct 0xc11a0000 next_task 0xc11c0000 pid 2 task_struct 0xc11b0000 Static Objects Dynamic Objects
0xc11a0000 0xc11b0000
…
0xc11c0000
… … Memory Map 0xc0300000 – task_struct 0xc11a0000 – task_struct Output
39
next_task 0xc11a0000 pid init_task 0xc0300000 next_task 0xc11b0000 pid 1 task_struct 0xc11a0000 next_task 0xc11c0000 pid 2 task_struct 0xc11b0000 Static Objects Dynamic Objects
0xc11a0000 0xc11b0000
…
0xc11c0000
… … Memory Map 0xc0300000 – task_struct 0xc11a0000 – task_struct 0xc11b0000 – task_struct Output
40
next_task 0xc11a0000 pid init_task 0xc0300000 next_task 0xc11b0000 pid 1 task_struct 0xc11a0000 next_task 0xc11c0000 pid 2 task_struct 0xc11b0000 Static Objects Dynamic Objects
41
0xc11a0000 0xc11b0000
…
0xc11c0000
… … Memory Map 0xc0300000 – task_struct 0xc11a0000 – task_struct 0xc11b0000 – task_struct Output
41
next_task 0xc11a0000 pid init_task 0xc0300000 next_task 0xc11b0000 pid 1 task_struct 0xc11a0000 next_task 0xc11c0000 pid 2 task_struct 0xc11b0000 Static Objects Dynamic Objects
0xc11a0000 0xc11b0000
…
0xc11c0000
… … Memory Map 0xc0300000 – task_struct 0xc11a0000 – task_struct 0xc11b0000 – task_struct Output
42
next_task 0xc11a0000 pid init_task 0xc0300000 next_task 0xc11b0000 pid 1 task_struct 0xc11a0000 next_task 0xc11c0000 pid 2 task_struct 0xc11b0000 Static Objects Dynamic Objects
43
0xc11a0000 0xc11b0000
…
0xc11c0000
… … Memory Map 0xc0300000 – task_struct 0xc11a0000 – task_struct 0xc11b0000 – task_struct Output
43
next_task 0xc11a0000 pid init_task 0xc0300000 next_task 0xc11b0000 pid 1 task_struct 0xc11a0000 next_task 0xc11c0000 pid 2 task_struct 0xc11b0000 Static Objects Dynamic Objects
44
0xc11a0000 0xc11b0000
…
0xc11c0000
… … Memory Map 0xc0300000 – task_struct 0xc11a0000 – task_struct 0xc11b0000 – task_struct Output
next_task 0xc11a0000 pid init_task 0xc0300000 next_task 0xc11b0000 pid 1 task_struct 0xc11a0000 next_task 0xc11c0000 pid 2 task_struct 0xc11b0000 Static Objects Dynamic Objects
45
0xc11a0000 0xc11b0000
…
0xc11c0000
… … Memory Map 0xc0300000 – task_struct 0xc11a0000 – task_struct 0xc11b0000 – task_struct Output Write to 0xc11b0056
next_task 0xc11a0000 pid init_task 0xc0300000 next_task 0xc11b0000 pid 1 task_struct 0xc11a0000 next_task 0xc11c0000 pid 2 task_struct 0xc11b0000 Static Objects Dynamic Objects
46
0xc11a0000 0xc11b0000
…
0xc11c0000
… … Memory Map 0xc0300000 – task_struct 0xc11a0000 – task_struct 0xc11b0000 – task_struct Output Write to 0xc11b0056
46
47
47
Name Code Kernel Objects Modified adore 0.42 770 instr
0.53 733 instr
48
0.53 !"""# $% &' adore-ng 0.56 785 instr !"""# $% &
$)*)$
48
Action Value Kernel Object R 0xc677c000 pidhash[600] R 0x0000025a pidhash[600]->pid
49
R 0xc76d8000 pidhash[600]->next_task R 0xc6780000 pidhash[600]->prev_task W 0xc6780000 pidhash[600]->next_task->prev_task W 0xc76d8000 pidhash[600]->prev_task->next_task
49
5.88 4 5 6 7 low-down
QEMU PoKeR not profiling PoKeR profiling
1 1 1.28 1.17 2.96 1 2 3 4 UnixBench Kernel Compile Normalized Slow
50
51
51
52
52
53