Rootkits Brent Boe Vasanthanag Vasili.

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

Operating System Security : David Phillips A Study of Windows Rootkits.
1 Chapter 8 Fundamentals of System Security. 2 Objectives In this chapter, you will: Understand the trade-offs among security, performance, and ease of.
ROOTKIT VIRUS by Himanshu Mishra Points to be covered Introduction History Uses Classification Installation and Cloaking Detection Removal.
Students: Jacek Czeszewski and Marcos Verdini Rosa Professor: José Manuel Magalhães Cruz.
Virtual Machine Security Design of Secure Operating Systems Summer 2012 Presented By: Musaad Alzahrani.
Windows Security and Rootkits Mike Willard January 2007.
Vijay krishnan Avinesh Dupat  Collection of tools (programs) that enable administrator-level access to a computer or computer network.  The main purpose.
Presented by Boris Yurovitsky
ROOT KITS. Overview History What is a rootkit? Rootkit capabilities Rootkits on windows OS Rootkit demo Detection methodologies Good tools for detection.
SubVirt: Implementing malware with virtual machines Yi-Min Wang Chad Verbowski Helen J. Wang Jacob R. Lorch Microsoft Research Samuel T. King Peter M.
Guide to Operating System Security Chapter 2 Viruses, Worms, and Malicious Software.
Internet Relay Chat Chandrea Dungy Derek Garrett #29.
VMM Based Rootkit Detection on Android Class Presentation Pete Bohman, Adam Kunk, Erik Shaw.
1 Chap 10 Malicious Software. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on.
Chapter-4 Windows 2000 Professional Win2K Professional provides a very usable interface and was designed for use in the desktop PC. Microsoft server system.
By, Anish Shanmugasundaram Yashwanth Sainath Jammi.
Rootkits. EC-Council The Problem  Microsoft Corp. security researchers are warning about a new generation of powerful system-monitoring programs, or.
Vijay Krishnan Avinesh Dupat. A rootkit is software that enables continued privileged access to a computer while actively hiding its presence from administrators.
University of Management & Technology 1 Operating Systems & Utility Programs.
CIS 450 – Network Security Chapter 16 – Covering the Tracks.
Rootkits in Windows XP  What they are and how they work.
Securing Operating Systems Rootkits - TAPTI SAHA.
Virtual Machine Security Systems Presented by Long Song 08/01/2013 Xin Zhao, Kevin Borders, Atul Prakash.
1 Chap 10 Virus. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on an ever increasing.
Virus Detection Mechanisms Final Year Project by Chaitanya kumar CH K.S. Karthik.
Countering Kernel Rootkits with Lightweight Hook Protection Presented by: Hector M Lugo-Cordero, MS CAP 6135 March 24, 2011.
Mathieu Castets October 17th,  What is a rootkit?  History  Uses  Types  Detection  Removal  References 2/11.
Week 10-11c Attacks and Malware III. Remote Control Facility distinguishes a bot from a worm distinguishes a bot from a worm worm propagates itself and.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
VMM Based Rootkit Detection on Android Class Presentation Pete Bohman, Adam Kunk, Erik Shaw.
Hidden Processes: The Implication for Intrusion Detection
Midterm Meeting Pete Bohman, Adam Kunk, Erik Shaw.
November 19, 2008 CSC 682 Use of Virtualization to Thwart Malware Written by: Ryan Lehan Presented by: Ryan Lehan Directed By: Ryan Lehan Produced By:
Operating Systems Security
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Rootkits, Backdoors, and Trojans ECE 4112 – Lab 5 Summary – Spring 2006 Group 9 Greg Sheridan Terry Harvey Group 10 Matthew Bowman Laura Silaghi Michael.
COEN 250 Computer Forensics Unix System Life Response.
Full and Para Virtualization
SubVirt: Implementing malware with virtual machines Authors: Samuel T. King, Peter M. Chen University of Michigan Yi-Min Wang, Chad Verbowski, Helen J.
Protecting The Kernel Data through Virtualization Technology BY VENKATA SAI PUNDAMALLI id :
CSC190 Introduction to Computing Operating Systems and Utility Programs.
Chapter 8: Installing Linux The Complete Guide To Linux System Administration.
Lecture 7 Rootkits Hoglund/Butler (Chapter 5-6). Avoiding detection Two ways rootkits can avoid detection –Modify execution path of operating system to.
Class Presentation Pete Bohman, Adam Kunk, Erik Shaw (ONL)
VMM Based Rootkit Detection on Android
Lecture 5 Rootkits Hoglund/Butler (Chapters 1-3).
Page 1 Viruses. Page 2 What Is a Virus A virus is basically a computer program that has been written to perform a specific set of tasks. Unfortunately,
Information Security - 2
Securing a Host Computer BY STEPHEN GOSNER. Definition of a Host  Host  In networking, a host is any device that has an IP address.  Hosts include.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Botnets A collection of compromised machines
Operating System Review
Chapter 2: System Structures
Operating System Structure
Rootkit A rootkit is a set of tools which take the ability to access a computer or computer network at administrator level. Generally, hackers install.
Botnets A collection of compromised machines
Backtracking Intrusions
Operating System Review
Hidden Processes: The Implication for Intrusion Detection
IS3440 Linux Security Unit 9 Linux System Logging and Monitoring
Chap 10 Malicious Software.
I have edited and added material.
Rootkits Jonathan Hobbs.
Hiding Malware Rootkits
Security.
Chap 10 Malicious Software.
Operating System Concepts
Crisis and Aftermath Morris worm.
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
Presentation transcript:

Rootkits Brent Boe Vasanthanag Vasili

Rootkits: What is a Rootkit? A rootkit is a set of tools used for (covertly) maintaining root access to a system Rootkits allow attackers the ability to circumvent protection mechanisms limiting root access Provide a much higher layer of stealth than normal “Trojan programs” by hiding processes and files

Rootkits: What is NOT a Rootkit? A rootkit is not an exploit used to gain root access Rootkits can only work if the attacker can gain administrative access (Typical) Attacker sequence of events Locate vulnerability on target host Run exploit to gain root access Install Rootkit Remove Evidence Locate next vulnerable host

Rootkit Functionality Maintain Access SSH (is for script kiddies) Reverse shell (a bit unusual if servers initiate connections) Covert channel backdoor – a signal system buried in an arbitrary field of a completely innocuous protocol. Destroy evidence Disable shell history (e.g. Linux - unset HISTFILE; export HISTFILE=/dev/null) Kill syslog daemon and freeze the system log Modify log files Attack other systems Local attack tools - Password Cracking, Capture root and access and obtain access to machines Remote attack tools - Scanners and Autorooters DOS tools –Conduct DOS attack on remote server Clean the host system of previous infections More than one rootkit can cause system instability and compromise the rootkit

What does a Rootkit hide? The attacker’s files The attacker’s processes (eg: sniffers, PW crackers) The attacker’s user account Unusual environment variables (network cards in promiscuous mode) Specific network connections to and from compromised machines

Necessary Background User Space Kernel Space The Kernel Space is more privileged than the User Space The lower a rootkit can go, the more likely it is to avoid detection and defeat Host Intrusion Prevention Systems User Space Kernel Space

Necessary Background The Intel x86 based chips use “rings” for access control with Ring 0 being the most permissive and Ring 3 being the most restrictive User programs run in Ring 3 Kernel programs run in Ring 0 Rings 1 and 2 are unused Ring 0

Types of Rootkits Binary Rootkits Kernel Rootkits System call Rootkits Library Rootkits Virtual Machine Rootkits Database Rootkits Runtime Kernel Patches User Space Kernel Space Kernel Space and User Space

Binary Rootkits These rootkits are collections of subverted popular system binaries (or executables). Trojaned to perform action conducive to attacker (eg: hide malicious process) Binary files usually precompiled for particular platform for user to choose & utilize correct one Attacker deploys kit after breaking In via installation script which places binaries over original ones & saves old copies On Linux, the attacker may choose to directly modify the source code on the target machine and recompile the binary.

Some trojaned binaries: inetd, rlogin, rshd, sendmail, sshd, telnetd may contain magic password that provide access to attacker for remote access. ps to hide processes from causal viewing by system admin. netstat provides connection hiding ls, dir provide file hiding login,su,ping provide local access

Binary Rootkit Detection Before the system is infected, compute the checksums of the binaries CRC checksums Cryptographic checksums Better to store the checksums on separate media (i.e. CD-ROM) so an advanced attacker cannot modify the files In practice, if a file (legitimately) changes frequently, this may lead to frequent checksum recomputations and false positives. Checksum computation is used by the program Tripwire

Kernel Rootkits First reported in 1997 Loadable Kernel Modules hook into system kernel and modifies selected sys_call addresses stored in the system call table Replaces the addresses of the legitimate sys_calls with the addresses of the sys_calls that are to be installed by the hacker’s LKM Eg: KNARK ( targeting Linux2.2 Kernel)

Kernel Rootkits User Space Kernel Space LKM Use Loadable Kernel Modules (LKMs) for Linux or Device Drivers for Windows Full kernel access User Space Kernel Space LKM

Kernel rootkit redirecting the system call table Redirects the references to system call table to new location. New system call table is installed in new loc. New system call table contains the address of malicious sys_call functons Redirecting can be done by overwriting the pointer to the original system call table with the address of a new system call table that is created by the hacker

Kernel Rootkit Detection Look for strange/inappropriate modules/device drivers Keep in mind the binaries that would help examine this information may be compromised too. /lib/modules Prevent LKMs altogether by disallowing module loading Sometimes a compile time option StMichael Monitors various portions of the kernel for modifications. When “rootkit activity” is detected, attempts to restore to a previous good state

Necessary Background When a process wants to communicate with the kernel it uses the system call table The process throws a specific interrupt to pass control to the kernel Windows – push the index of the system call in eax. Throw interrupt x2e Linux – push the index of the system call into eax. Throw interrupt x80

System Call and Library Rootkits Replaces the standard system library for relaying kernel information to a user process The user library (libc) provides an interface to the system call table. The advantage – no binaries need to change Duplicate LKM functionality without entering the kernel space Very easy to hide processes and files T0rn8 kit most prominent one

System Call and Library Rootkit Detection System calls like truss, strace, and ltrace can be used to trace the execution path of the system calls Some integrity tools generate checksums against the system call tables.

Virtual Machine Based Rootkits (VMBR) A VMBR moves the targeted system into virtual machine. Instead of moving the attack code lower into the kernel space, it pushes the user higher into the user space The previous (unhooked) OS runs over a virtual machine (as the guest software) The guest is not allowed to interact with states outside of its Virtual Machine The attacker has the liberty to run anything on the machine Any anti-rootkit software run inside of the virtual machine will not detect any modifications to it’s state

Steps of VMBR installation Modify the Boot Sequence to load the Virtual Machine Monitor (VMM) first Modify it after shutdown after all monitoring processes have exited. Interfere with the disk controller’s write – so that only the rootkit can store disk blocks Working at this low level to avoid interference with monitoring software Overwrite the master boot record so the VMBR loads first Reboot and … The target system is now running as a guest, you can interfere with them, but they can’t interfere with you

VM Rootkit Detection Detecting a VM rootkit can be quite difficult (from the inside of the guest software) Possible to detect a rootkit using instructions that reveal information about the kernel state (or the emulated kernel state) redpill – uses the sidt instruction to store the interrupt descriptor table register. Since the VMM needs to move the emulated interrupt descriptor table, the ITDR will begin at a much higher address then it normally would. Easiest way to detect a VM rootkit; boot from an alternate media.

Database Rootkits A database can be considered a type of operating system Users Processes Executables Jobs Symbolic Links

Database Rootkits 1st Generation Rootkits 2nd Generation Rootkits Change the data dictionary (modify a view, procedure, and change synonyms) For example, change ALL_USERS to be select * from sys.user$ u where u.name != ‘HACKER’; 2nd Generation Rootkits Change the binary of the database so that all sys.user$ variables become sys.aser$ Remove the ‘Hacker’ entry from sys.user$ The system is now using sys.aser$ internally, but all integrity checks use sys.user$ 3rd Generation Rootkits For Oracle, Direct SGA (System Global Area) Manipulation – directly modify the contents of the database through modifying the memory the database is stored in

Database Rootkit Detection Examine the internal views for obvious changes Examine the internal system variables for any changes or new, unrecognized variables

Runtime Kernel Patching Modifying the memory of the kernel while it resides in memory. Simply modify a few bytes here, a FAR JMP there to execute the rootkit code, and you’re done. A technique called detour patching totally that can totally circumvent executing code by modifying the control flow at runtime Very difficult to detect Very difficult to pull off successfully Need extremely specific details about the target machine

General Rootkit Detection Behavioral Detection Look for suspect behaviors, such as writes to the memory containing important system call tables Look for a change in the number, order, and frequency of calls Signature Detection –search for unique byte patterns Can be defeated through code obfuscation techniques System Integrity Scans Scan the kernel for inappropriate FAR JMP instructions Detect unauthorized changes to loaded OS components in memory Offline analysis of drives

Sony BMG Rootkit Scandal Sony BMG Music Entertainment was sued in 2005 for surreptitious distribution of rootkit software on audio compact discs. It used a software called Extended Copy Protection (XCP) designed to help prevent unlimited copying and unauthorized redistribution of the music on the disc. XCP interferes with the normal way in which the Microsoft windows OS plays CDs This causes the system vulnerable to malicious code CD ROMS were inoperable due to the change in the registry settings caused by the software

Conclusion Many rootkits practice “offense in depth,” and are by no means limited to only one of the techniques listed here. Control of a system is determined by who can operate closer to hardware, or in the case of equal activity levels, who can best predict the actions of the other The best way to fight rootkits is to prevent them from getting on your system in the first place – Intrusion Detection Systems, Host Intrusion Prevention Systems.

References Beck, M et al. Linux Kernel Programming. 3rd ed. London: Addison Wesley, 2002. Cesare, Silvio. “Runtime Kernel Patching.” 03 Mar 2007. < http://www.uebi.net/silvio/runtime-kernel-kmem-patching.txt > Chuvakin, Anton. An Overview of Unix Rootkits. iDefense Labs: Feb 2003. < www.rootsecure.net/content/downloads/pdf/unix_rootkits_overview.pdf > Hoglund, Greg, Jamie Butler. Rootkits: Subverting the Windows Kernel. Addison Wesley Professional: Upper Saddle River, NJ, 22 July  2005. King, Samuel T. et al. SubVirt: Implementing malware with virtual machines. Mar 01 2007. < www.eecs.umich.edu/virtual/papers/king06.pdf > Kornbrust, Alexander. “Oracle Rootkits 2.0”. Black Hat 2006 USA, Las Vegas, NV. 02 Aug 06. < http://www.red-database-security.com/wp/oracle_rootkits_2.0.pdf >

References Levine, John G. et al. “A Methodology to Characterize Kernel Level Rootkits Exploits that Overwrite the System Call Table”. IEEE. 2004. <http://ieeexplore.ieee.org/iel5/9051/28706/01287894.pdf > Locally checks for signs of a rootkit. 01 Mar 2007. 28 Feb 2007.      <http://www.chkrootkit.org/> Red-database-Security in the news/press. 23 Jan 2007. Red-Database-Security GmbH. 1 Mar 2007.     < http://www.red-database-security.com/wp/db_rootkits > Rootkit. 5 March 2007. Wikimedia Foundation Inc.26 Feb 2007.     <http://en.wikipedia.org/wiki/Rootkit> Rootkits how to combat them. 1996 - 2007.  Kaspersky lab. 29 Feb 2007.     <http://www.viruslist.com> What is a rootkit? . 2 Mar 2007.    <http://www.tech-faq.com/rootkit.shtml> Zaytsev, Oleg. Rootkits, Spyware/Adware, Keyloggers and Backdoors: Detection and Neutralization. A-List Publishing, Sep 1 2006.