SigGraph: Brute Force Scanning of Kernel Data Structure Instances Using Graph-based Signatures Zhiqiang Lin 1 Junghwan Rhee 1, Xiangyu Zhang 1, Dongyan.

Slides:



Advertisements
Similar presentations
Effective Static Deadlock Detection
Advertisements

DroidScope: Seamlessly Reconstructing the OS and Dalvik Semantic Views for Dynamic Android Malware Analysis Lok Kwong Yan, and Heng Yin Syracuse University.
INTROPERF: TRANSPARENT CONTEXT- SENSITIVE MULTI-LAYER PERFORMANCE INFERENCE USING SYSTEM STACK TRACES Chung Hwan Kim*, Junghwan Rhee, Hui Zhang, Nipun.
Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
Android architecture overview
Code Compaction of an Operating System Kernel Haifeng He, John Trimble, Somu Perianayagam, Saumya Debray, Gregory Andrews Computer Science Department.
The ‘process’ abstraction
Linux Memory Management High-Level versus Low-Level.
Unix & Windows Processes 1 CS502 Spring 2006 Unix/Windows Processes.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Process Coloring: an Information Flow-Preserving Approach to Malware Investigation Eugene Spafford, Dongyan Xu Department of Computer Science and Center.
Jiang Wang, Joint work with Angelos Stavrou and Anup Ghosh CSIS, George Mason University HyperCheck: a Hardware Assisted Integrity Monitor.
Peter Juszczyk CS 492/493 - ISGS. // Is this C# or Java? class TestApp { static void Main() { int counter = 0; counter++; } } The answer is C# - In C#
Efficient Protection of Kernel Data Structures via Object Partitioning Abhinav Srivastava, Jonathon Giffin AT&T Labs-Research, HP Fortify ACSAC 2012.
KinWrite: Handwriting-Based Authentication Using Kinect Proceedings of the 20th Annual Network & Distributed System Security Symposium, NDSS 2013 Jing.
VMM Based Rootkit Detection on Android Class Presentation Pete Bohman, Adam Kunk, Erik Shaw.
CS 6560 Operating System Design Lecture 13 Finish File Systems Block I/O Layer.
Microsoft Research Asia Ming Wu, Haoxiang Lin, Xuezheng Liu, Zhenyu Guo, Huayang Guo, Lidong Zhou, Zheng Zhang MIT Fan Long, Xi Wang, Zhilei Xu.
Introduction Overview Static analysis Memory analysis Kernel integrity checking Implementation and evaluation Limitations and future work Conclusions.
Automatic Reverse Engineering of Program Data Structures from Binary Execution Zhiqiang Lin Xiangyu Zhang, Dongyan Xu Dept. of Computer Science and CERIAS.
Socket Swapping for efficient distributed communication between migrating processes MS Final Defense Praveen Ramanan 12 th Dec 2002.
Automatic Diagnosis and Response to Memory Corruption Vulnerabilities Authors: Jun Xu, Peng Ning, Chongkyung Kil, Yan Zhai, Chris Bookholt In ACM CCS’05.
Stealthy Malware Detection Through VMM-based “Out-of-the-Box” Semantic View Reconstruction CCS’07, Alexandria, VA, Oct 29 – Nov 2, 2007 Xuxian Jiang, Xinyuan.
The Structure of Processes. What is a Process? an instance of running program Program vs process(task) Program : just a passive collection of instructions.
Monnappa KA  Info Security Cisco  Member of SecurityXploded  Reverse Engineering, Malware Analysis, Memory Forensics 
Processes and Threads CS550 Operating Systems. Processes and Threads These exist only at execution time They have fast state changes -> in memory and.
1 Outspect: Unified Memory Forensic Toolset for Virtual Machines AVTokyo, 31-10/2009 Nguyen Anh Quynh, Kuniyasu Suzaki, Ruo Ando.
Tracking Rootkit Footprints with Pratical Memory Analysis System Weidong Cui and Marcus Peinado, Microsoft Research; Zhilei Xu, Massachusetts Institute.
Jose Sanchez 1 o Tielei Wang†, TaoWei†, Zhiqiang Lin‡, Wei Zou†. o Purdue University & Peking University o Proceedings of NDSS'09: Network and Distributed.
Automatic Protocol Format Reverse Engineering through Context-Aware Monitored Execution Zhiqiang Lin 1 Xuxian Jiang 2, Dongyan Xu 1, Xiangyu Zhang 1 1.
1 CSE 451 Section 3: Project0 highlights, File descriptors.
Profiling Self-Propagating Worms via Behavioral Footprinting Xuxian Jiang, Dongyan Xu ACM WORM’06 November 3, 2006.
VMM Based Rootkit Detection on Android Class Presentation Pete Bohman, Adam Kunk, Erik Shaw.
1 Virtual Machine Introspection Bhushan Jain Computer Science Department Stony Brook University.
Deriving Input Syntactic Structure From Execution Zhiqiang Lin Xiangyu Zhang Purdue University November 11 th, 2008 The 16th ACM SIGSOFT International.
Automatic Protocol Format Reverse Engineering through Context-Aware Monitored Execution Zhiqiang Lin 1 Xuxian Jiang 2, Dongyan Xu 1, Xiangyu Zhang 1 1.
Linux Processes Travis Willey Jeff Mihalik. What is a process? A process is a program in execution A process includes: –program counter –stack –data section.
Instructor: Dr. Harold C. Grossman Student: Subhra S. Sarkar
Processes CS 6560: Operating Systems Design. 2 Von Neuman Model Both text (program) and data reside in memory Execution cycle Fetch instruction Decode.
A Tool for Pro-active Defense Against the Buffer Overrun Attack D. Bruschi, E. Rosti, R. Banfi Presented By: Warshavsky Alex.
Operating Systems Process Creation
CSC 660: Advanced Operating SystemsSlide #1 CSC 660: Advanced OS Processes.
Lecture 3 Threads Erick Pranata © Sekolah Tinggi Teknik Surabaya 1.
Digital Forensics Dr. Bhavani Thuraisingham The University of Texas at Dallas Network Forensics - III November 3, 2008.
CSC 660: Advanced Operating Systems
Convicting Exploitable Software Vulnerabilities: An Efficient Input Provenance Based Approach Zhiqiang Lin Xiangyu Zhang, Dongyan Xu Purdue University.
Kenfe-Mickaël Laventure Laurent Malvert Macquarie University LEMONA Linux Enhanced Monitoring Architecture Linux zest for security.
VMM Based Rootkit Detection on Android
What is a Process ? A program in execution.
Lecture 5 Rootkits Hoglund/Butler (Chapters 1-3).
Slide 1/20 Defending Against Strategic Adversaries in Dynamic Pricing Markets for Smart Grids Paul Wood, Saurabh Bagchi Purdue University
Similarity Measurement and Detection of Video Sequences Chu-Hong HOI Supervisor: Prof. Michael R. LYU Marker: Prof. Yiu Sang MOON 25 April, 2003 Dept.
.NET Memory Primer Martin Kulov. "Out of CPU, memory and disk, memory is typically the most important for overall system performance." Mark Russinovich.
Memory Protection through Dynamic Access Control Kun Zhang, Tao Zhang and Santosh Pande College of Computing Georgia Institute of Technology.
1 Carnegie Mellon A Tour of Computer Systems Instructors: Sejin Park.
Chapter 4: Threads Modified by Dr. Neerja Mhaskar for CS 3SH3.
An Overview of the Linux Operating System
Processes David Ferry, Chris Gill
Linux Virtual Filesystem
CSCE 210 Data Structures and Algorithms
The 17th Annual Network and Distributed System Security Symposium
Chapter 4: Threads.
Making Virtual Memory Real: The Linux-x86-64 way
Operation System Program 1
CHAPTER 4:THreads Bashair Al-harthi OPERATING SYSTEM
Discovering Data Structures
Virtual Memory: Systems CSCI 380: Operating Systems
Foundations and Definitions
Processes David Ferry, Chris Gill, Brian Kocoloski
Detecting Attacks Against Robotic Vehicles:
Presentation transcript:

SigGraph: Brute Force Scanning of Kernel Data Structure Instances Using Graph-based Signatures Zhiqiang Lin 1 Junghwan Rhee 1, Xiangyu Zhang 1, Dongyan Xu 1, Xuxian Jiang 2 1 Purdue University 2 North Carolina State University February 7 th, 2011 The 18 th Annual Network and Distributed System Security Symposium

Problem Statement  Given a kernel data structure definition  Identifying instances of this data structure in a kernel memory image at arbitrary location struct task { [0] struct thread *thread; [4] struct memory *mm; [8] struct signal *signal; [12] struct task *parent; [16] int magic_number; } task A simplified Linux Kernel task_struct

Security Applications: Memory Forensics Data structure signatures play a critical role in memory forensics IPaddr Password struct user_account { 00: short int u_type; 04: pid_t u_pid; 08: char u_line[32]; 40: char uid[4]; 44: char user[32]; 76: char password[128]; 204: char u_host[128]; 332: short int e_termination; 334: short int e_exit; 336: long int u_session; 340: struct timeval u_tv; 348: int32_t u_addr_v6[4]; }

Security Applications: Kernel Rootkit Defense mm task_struct prev thread next mm task_struct prev thread next mm task_struct prev thread next Process AProcess B Process C

State-of-the-art  Value-invariant signature schemes  Klist [Rutkowska,2003], GREPEXEC [bugcheck, 2006], Volatility [Walters, 2006], [Schuster, 2006], [Dolan-Gavitt et al., CCS’09] struct task { [0] struct thread *thread; [4] struct memory *mm; [8] struct signal *signal; [12] struct task *parent; [16] int magic_number; } task magic_number=0xabcdef0f Field w/o value invariant? Invariant value can be changed? [Dolan-Gavitt et al., CCS’09]

Key Idea struct task { [0] struct thread *thread; [4] struct memory *mm; [8] struct signal *signal; [12] struct task *parent; } struct thread { [0] struct task *task; } struct memory { [0] struct vma *mmap; [4] void (*map_area) (struct memory* mmap); } struct signal { [0] struct task_status *status; } task thread mm signaltask 00 thread(*(x+0)) ∧ mm(*(x+4)) ∧ signal(*(x+8)) ∧ task(*(x+12)) task(x)   1 st layer 2 nd layer 3 rd layer A B x

How to Use SigGraph 0xc001c0a8: 0xc002c0a8 0xc002bee0 0xc002caa0 0xc00ddbb0... 0xc00ddbb0: 0xc12a0e7c 0xc727faa8 0xc001c114 0xc001c16c... 0xc002c0a8: 0xc12a0e7c 0xc727faa8 0xbfbb9195 0x task thread mmsignaltask 0 0 0xc002bee0: 0xc001c114 0xc001c16c 0xffb x xc002caa0: 0xb002ca20 0xb021d00a 0xc05b9f5c 0x task( 0xc001c0a8 )

SigGraph Overview Signature Generator Graph- Signatures OS Data Structure Definitions Profiler Memory Dump Brute-force Scanner Data structure Instances struct task { [0] struct thread *thread; [4] struct memory *mm; [8] struct signal *signal; [12] struct list_head *prev; [16] struct list_head *next; } (1) Compiler approach (2) Extracting from debug information (3) Reverse engineering kernel

Signature Generator  Challenge: Signatures must be unique, non- isomorphic among each other. task thread mm signaltask 00 1 st layer 2 nd layer 3 rd layer

struct B { [0] E * b1; [4] B * b2; } struct BB { [0] EE * bb1; [4] BB * bb2; } struct E {... [12] G * e1;... [24] H * e3; } struct EE {... [12] GG * ee1;... [24] HH * ee3; } B E B G H EE BB GG HH BB struct G {... [10] int * g; } 10 struct GG {... [4] char * gg1; [8] char * gg2; } 4 8 Isomorphism

struct A { [0] struct B * a1;... [12] struct C * a2;... [18] struct D * a3; } struct X {... [8] struct Y * x1;... [36] struct BB * x2;... [48] struct CC * x3;... [54] struct DD * x4; } Y BB 8 54 DD CC X B C 0 18 D 12 A Isomorphism

Our Solution  Immediate pointer pattern (IPP): one-layer pointer structure as a string  Pointer expansion ‘ ’ struct B { [0] E * b1; [4] B * b2; } IPP(B) =0·E·4·B T 0·E·4·(0·E·4·B) B IPP(B) E B 4 B 0 IPP(T )= f 1 · t 1 · (f 2 − f 1 ) · t 2 ·... · (f n − f n−1 ) · t n

Problem Formulation B C 0 18 D 12 Y BB 8 54 DD CC X A IPP(A)=0·B·12·C·6·D IPP(X)=8·Y·28·BB·12·CC·6·DD Substring IPP(T )= f 1 ·t 1 ·(f 2 −f 1 )·t 2 ·...·(f n − f n−1 )·t n “If IPP(A) is a substring of IPP(X) ” Ignore the symbol type at specific layer

Profiler  Practical pointer issues  null Pointer  void Pointer  Special Pointer  LIST_POISON1 (0x )  LIST_POISON2 (0x )  SPINLOCK_MAGIC (0xdead4ead) Pruning a few noisy pointer fields does not degenerate the uniqueness of the graph-based signatures LiveDM [Rhee et al., RAID’10]

Evaluation  Memory snapshot collection  QEMU  Ground truth acquisition  RedHat crash utility  Symbolic information  system.map  Profiling run  Long runs with typical workload crash-utility.redhat.com

Evaluation on Memory Forensics Data Structures of Interest “True” Instance SigGraphValue-invariant FP%FN%FP%FN% task_struct thread_info mm_struct vm_area_struct files_struct fs_struct dentry sysfs_dirent socket sock user_struct crash-utility.redhat.com

Application: Rootkit Detection Rootkit Name Target Object Inside ViewCrash ToolSigGraph #obj.s detected#obj.sdetected adore-ng-2.6module23 adore-ng-2.6’task_struct62 cleaner-2.6module22 enyelkm 1.0module23 hp-2.6task_struct56 linuxfu-2.6task_struct59 modhide-2.6module22 overridetask_struct58 rmrootstask_struct56 rmroots’module23 ps lsmod N/A

Related Work  Kernel memory mapping and analysis  Copilot [Petroni et al., Security’04], [Petroni et al., CCS’07]  Gibraltar [Baliga et al., ACSAC’08]  KOP [Carbone et al.,CCS’09]  Memory forensics  Memory graph-based: Redhat crash utility, KOP  Value-invariant Signature: Klist [Rutkowska,2003], GREPEXEC [bugcheck, 2006], Volatility [Walters, 2006], [Schuster, 2006], [Dolan-Gavitt et al., CCS’09]  Dynamic heap type inference [Polishchuk et al., 2007]

Conclusion  Points-to relations can be leveraged to generate graph-based signatures for brute force scanning  SigGraph, a framework that generates non- isomorphic structural-invariant signatures  Complements value-invariant signatures  Applications:  Kernel memory forensics  Kernel rootkit detection

Q&A Thank you For more information