Backdoors, Trojans and Rootkits CIS 413 This presentation is an amalgam of presentations by Mark Michael, Randy Marchany and Ed Skoudis. I have edited.

Slides:



Advertisements
Similar presentations
COEN 250 Computer Forensics Unix System Life Response.
Advertisements

Thank you to IT Training at Indiana University Computer Malware.
Rootkits CIS 413 This presentation is an amalgam of presentations by Mark Michael, Randy Marchany and Ed Skoudis. I have edited and added material. Dr.
Backdoors, Trojans and Rootkits CIS 413 This presentation is an amalgam of presentations by Mark Michael, Randy Marchany and Ed Skoudis. I have edited.
Code-Red : a case study on the spread and victims of an Internet worm David Moore, Colleen Shannon, Jeffery Brown Jonghyun Kim.
1 Computer and Internet Security JCCAA Presentation 03/14/2009 Yu-Min (Phillip) Hsieh Sr. System Administrator Information Technology Rice University.
1 Topic 1 – Lesson 3 Network Attacks Summary. 2 Questions ► Compare passive attacks and active attacks ► How do packet sniffers work? How to mitigate?
Using Nagios for Intrusion detection Miguel Cárdenas Montes Elio Pérez Calle Francisco Javier Rodríguez Calonge.
Web Defacement Anh Nguyen May 6 th, Organization Introduction How Hackers Deface Web Pages Solutions to Web Defacement Conclusions 2.
System Security Scanning and Discovery Chapter 14.
Rootkits.
Hacking Linux Based on Hacking Linux Exposed Hatch, Lee, and Kurtz ISBN
Building Your Own Firewall Chapter 10. Learning Objectives List and define the two categories of firewalls Explain why desktop firewalls are used Explain.
19.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 19: Security The Security Problem Authentication Program Threats.
Software Security Threats Threats have been an issue since computers began to be used widely by the general public.
System and Network Security Practices COEN 351 E-Commerce Security.
 In MHP 105, same time as our class  Reading list is online  Sample midterm is online o Try to solve it before the next class.
CS Nathan Digangi.  Secret, undocumented routine embedded within a useful program  Execution of the program results in execution of secret code.
Windows Security and Rootkits Mike Willard January 2007.
Exam ● On May 15, at 10:30am in this room ● Two hour exam ● Open Notes ● Will mostly cover material since Exam 2 ● No, You may not take it early.
Sanjay Goel, School of Business/Center for Information Forensics and Assurance University at Albany Proprietary Information 1 Unit Outline Information.
Lesson 9-Securing a Network. Overview Identifying threats to the network security. Planning a secure network.
ROOT KITS. Overview History What is a rootkit? Rootkit capabilities Rootkits on windows OS Rootkit demo Detection methodologies Good tools for detection.
COEN 252: Computer Forensics Router Investigation.
Guide to Operating System Security Chapter 2 Viruses, Worms, and Malicious Software.
Internet Relay Chat Chandrea Dungy Derek Garrett #29.
Linux Networking and Security Chapter 10 File Security.
Port Knocking Software Project Presentation Paper Study – Part 1 Group member: Liew Jiun Hau ( ) Lee Shirly ( ) Ong Ivy ( )
1 Chap 10 Malicious Software. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on.
By, Anish Shanmugasundaram Yashwanth Sainath Jammi.
Malicious Code Brian E. Brzezicki. Malicious Code (from Chapter 13 and 11)
Rootkits. EC-Council The Problem  Microsoft Corp. security researchers are warning about a new generation of powerful system-monitoring programs, or.
CIS 450 – Network Security Chapter 15 – Preserving Access.
Honeypot and Intrusion Detection System
Live Forensics Investigations Computer Forensics 2013.
CIS 450 – Network Security Chapter 16 – Covering the Tracks.
3-Protecting Systems Dr. John P. Abraham Professor UTPA.
1 Higher Computing Topic 8: Supporting Software Updated
1 Chap 10 Virus. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on an ever increasing.
Implementing a Port Knocking System in C Honors Thesis Defense by Matt Doyle.
1 Figure 4-16: Malicious Software (Malware) Malware: Malicious software Essentially an automated attack robot capable of doing much damage Usually target-of-opportunity.
Hacker’s Strategies Revealed WEST CHESTER UNIVERSITY Computer Science Department Yuchen Zhou March 22, 2002.
Linux Networking and Security
Rootkits. Agenda Introduction Definition of a Rootkit Types of rootkits Existing Methodologies to Detect Rootkits Lrk4 Knark Conclusion.
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.
1 Figure 4-1: Targeted System Penetration (Break-In Attacks) Host Scanning  Ping often is blocked by firewalls  Send TCP SYN/ACK to generate RST segments.
CHAPTER 9 Sniffing.
1 HoneyNets. 2 Introduction Definition of a Honeynet Concept of Data Capture and Data Control Generation I vs. Generation II Honeynets Description of.
Topics Network topology Virtual LAN Port scanners and utilities Packet sniffers Weak protocols Practical exercise.
Hacking Windows 9X/ME. Hacking framework Initial access physical access brute force trojans Privilege escalation Administrator, root privileges Consolidation.
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Backdoors and Rootkits.
1 Security. 2 Linux is not secure No computer system can ever be "completely secure". –make it increasingly difficult for someone to compromise your system.
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.
Computer virus Speaker : 蔡尚倫.  Introduction  Infection target  Infection techniques Outline.
Databases Kevin Wright Ben Bruckner Group 40. Outline Background Vulnerabilities Log File Cleaning This Lab.
Lecture 5 Rootkits Hoglund/Butler (Chapters 1-3).
Intro to Network Security. Vocabulary Vulnerability Weakness that can be compromised Threat A method to exploit a vulnerability Attack Use of one or more.
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,
Virus Infections By: Lindsay Bowser. Introduction b What is a “virus”? b Brief history of viruses b Different types of infections b How they spread b.
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.
Information Systems Design and Development Security Precautions Computing Science.
Chapter 7: Using Network Clients The Complete Guide To Linux System Administration.
Security Script Kiddies Network Security Port Scans.
Common System Exploits Tom Chothia Computer Security, Lecture 17.
I have edited and added material.
I have edited and added material.
Security.
Operating System Concepts
Crisis and Aftermath Morris worm.
Presentation transcript:

Backdoors, Trojans and Rootkits CIS 413 This presentation is an amalgam of presentations by Mark Michael, Randy Marchany and Ed Skoudis. I have edited and added material. Dr. Stephen C. Hayne

An alternative entryway No fancy authentication needed Maintains access on a system Usually access is needed initially Still works when front door is closed B ack D oors

An attacker with back door access “owns” the system Attackers might make the system more secure to keep ownership The attacker does the work of the administrator B ack D oors

Application-level Trojan Horse Backdoors Traditional RootKits Kernel-level RootKits B ack D oors M elded into T rojan H orses

Adds a separate application to the system Made up of a server and client part server is installed on victims machine client is installed on attackers machine Victim must install the server portion Once installed the attacker “owns” the victims machine A pplication- L evel T rojan H orse B ackdoor T ools

Most popular Windows backdoors: Back Orifice 2000(BO2K) Sub7 Hack-a-tack The Virtual Network Computer(VNC)* *remote administration tool often used as a backdoor A pplication- L evel T rojan H orse B ackdoor T ools

Back Orifice 2000 Original Back Orifice released 1998 Works on Windows 95/98/ME/NT/2000 Open source Server portion is only 112KB Client portion is 568KB Product of the Cult of the Dead Cow (cDc) A pplication- L evel T rojan H orse B ackdoor T ools

Log Keystrokes Gather system information Get passwords from the SAM database Control the file system Edit the registry Control applications and services Redirect Packets A pplication- L evel T rojan H orse B ackdoor T ools

Application redirection Any DOS application can be spawned useful for setting up command-line backdoors Multimedia control View files in a browser Hidden mode Encryption between client and server A pplication- L evel T rojan H orse B ackdoor T ools

Plug-ins: Streaming video from server machine More encryption methods Blowfish, CAST-256, IDEA, Serpent, RC6 Stronger security than a lot of commercial products! Stealthier methods for transport A pplication- L evel T rojan H orse B ackdoor T ools

Most Anti-virus programs will notice and remove the tools mentioned Update virus definitions regularly Don’t run programs downloaded from untrusted sources Don’t auto-run ActiveX controls D efenses against A pplication- L evel T rojan B ackdoors

Hidden Backdoors Attacker takes over your system and installs a backdoor to ensure future access Backdoor listens, giving shell access How do you find a backdoor listener? Sometimes, they are discovered by noticing a listening port Nmap port scan across the network Running "netstat –na" locally Running lsof (UNIX) or Inzider (Windows) Network Backdoor listens on port ABC SQL Server Hack!

Sniffing Backdoors Who says a backdoor has to wait listening on a port? Attackers don't want to get caught They are increasingly using stealthy backdoors A sniffer can gather the traffic, rather than listening on an open port Non-promiscuous sniffing backdoors Grab traffic just for one host Promiscuous sniffing backdoors Grab all traffic on the LAN

Non-Promiscuous Backdoor – Cd00r Written by FX Includes a non-promiscuous sniffer Gathers only packets destined for the single target machine Several packets directed to specific ports (where there is no listener) will trigger the backdoor Sniffer grabs packets, not a listener on the ports Backdoor root shell starts to listen on TCP port 5002 only when packets arrive to the trigger ports

Non-Promiscuous Backdoor – Cd00r in Action The idea has been extended to eliminate even port 5002 Netcat can push back a command shell from server, so no listener ever required Connection goes from server back to client Server SYN to port X Sniffer analyzes traffic destined just for this machine, looking for ports X, Y, Z SYN to port Y SYN to port Z After Z is received, activate temporary listener on port 5002 Connection to root shell on port 5002

Promiscuous Backdoor Can be used to help throw off an investigation Attacker sends data for destination on same network But the backdoor isn't located at the destination of the backdoor traffic Huh? How does that work?

Promiscuous Backdoor in Action Backdoor is located on DNS server All packets sent to WWW server DNS server backdoor sniffs promiscuously In switched environment, attacker may use ARP cache poisoning Confusing for investigators Firewall DNS WWW Internet Sniffer listens for traffic destined for WWW server

Sniffing Backdoor Defenses Prevent attacker from getting on system in the first place (of course) Know which processes are supposed to be running on the system Especially if they have root privileges! Not easy, but very important Beware of stealthy names (like "UPS" or "SCSI") Look for anomalous traffic Look for sniffers

Replaces key system components Less detectable than application-level Trojan Horse Backdoors Traditionally focus on UNIX systems Root access is required initially T raditional R oot K its

On Windows systems… RootKits Replace Dynamic Link Libraries or alters the system On UNIX systems… RootKits replace /bin/login with a backdoor version of /bin/login T raditional R oot K its

When an attacker enters the backdoor password access is given to the system Backdoor password still works if other passwords are changed Login is not recorded in wtmp or utmp files for the backdoor user T raditional R oot K its

Some other programs replaced: du - shows free disk space RootKits hides space used by attacking tools find - finds files Hides attacker’s files ifconfig - shows status of interfaces masks promiscuous mode ls - shows contents of directories Hides attacker’s files T raditional R oot K its

Linux RootKit 5 (lrk5) written by Lord Somer one of the most full-featured RootKits includes Trojan versions of the following: chfn, chsh, crontab, du, find, ifconfig, inetd, killall, login, ls, netstat, passwd, pidof, ps, rshd, syslogd, tcpd, top, sshd, and su T raditional R oot K its

Try harder to stop attackers from getting root access Remember root-level access is needed to install a RootKit Use “echo *” command to look for changes D efending against T raditional R oot K its

Get a program to scan /bin/login and see if it has been corrupted Use a File Integrity Checker such as Tripwire Save hashes on read-only media D efending against T raditional R oot K its

Tripwire Available from First of the file integrity checkers Unix and NT versions available Network capable versions available Academic version is free. Commercial versions are not. Useful in finding trojan programs

Tripwire Generates a “signature” for each file based on checksums and other characteristics. These signatures are stored in a database file that should be kept offline. This is the baseline. Latest threat involves dynamic exec redirection. This is part of the newer Kernel Module Rootkits.

Tripwire List of files to check: tw.config All files in a directory will be checked. Can prune directories from the check step. Can examine just the directory and nothing else. Can check by access time but not recommended since you’ll get a report of everything that changed. Everything!

Tripwire To initialize the DB: tripwire –initialize Update DB interactively: tripwire -interactive Non-interactive DB update: tripwire – update

Tripwire Security Issues Need to protect the DB Need to protect the vulnerable executables Advantages Simple interface, good choice of crypto hash functions, good all-around tool Disadvantages Kernel mod attacks, initial tw.config takes some time to customize, NT version is good but costs $$$, no network security

Makes the Kernel the Trojan Horse Most difficult to detect Gives the attacker complete control of the underlying system Nothing on the system can be trusted K ernel -L evel R oot K its

Most common feature is execution redirection Instead of changing other programs to hide files the kernel hides them Kernel may also hide processes that are running Port usage is often masked K ernel -L evel R oot K its

Some Kernel-level RootKits are:Kernel-level RootKits Knark (Linux) Adore (Linux) Plasmoid’s Solaris Loadable Kernel Module (Solaris) The Windows NT kernel-level RootKit (Windows) K ernel -L evel R oot K its

Implemented with Loadable Kernel Modules (LKM) LKM is used to extend the capabilities of the system only for some UNIX systems LKM makes it easy! To install the Knark RootKit type: “insmod knark.o,” no reboot necessary K ernel -L evel R oot K its

KNARK Background Written by Creed Released in 1999 Versions exist for Linux 2.2 and 2.4 kernels Very popular in ‘script kiddie’ community

KNARK Capabilities Hide/Unhide files or directories Hide TCP/UDP connections Execution Redirection Unauthenticated privilege escalation via the rootme program within knark Ability to change UID/GID of a running process Unauthenticated, privileged remote execution daemon Kill –31 to hide a running process

Installing KNARK KNARK IS installed as a Loadable Kernel Module (LKM) System must have LKM enabled in order to be able to load KNARK Can be defeated if LKM is disabled, HOWEVER, updating system becomes much more complicated The KNARK rootkit has an additional LKM module to hide the presence of KNARK from the insmod (installed module) command.

What does KNARK Change? KNARK modifies the system call table (sys_call_table) within kernel memory by redirecting some system calls (sys_read, sys_getdents) to malicous system calls written by CREED. These new malicious system calls function as normal except in certain circumstances.

What does KNARK change?

What does KNARK Change? Can no longer trust the output of the system calls? Very difficult to detect rootkits such as KNARK using conventional methods System utility files (ls, ps) are not modified Kernel Output to system utility files IS modified.

Detecting KNARK Cyptographic Checksums of system utilities will NOT change when KNARK is installed May be possible to take cryptographic checksum of selected region of kernel in order to detect rootkit modification of kernel (StMichael) Can detect presence of KNARK type rootkits by examining sys_call_table

Detecting KNARK The file /boot/System.map is created when system is initially compiled /boot/System.map contains correct address of kernel system calls /boot/system map can be archived or retrieved from a known good system for comparison Must have Superuser (ROOT) privilege in order to read /dev/kmem (kernel memory)

Detecting KNARK using the kern_checkprogram Developed by Samhain labs GPL (‘free’) software Compares /boot/System.map file against the system call table in kernel memory Will not work against later versions of Red Hat Linux 2.4 or the Linux 2.6 kernel

KNARK Summary KNARK is a very powerful tool that was very popular with ‘script kiddies’ Very difficult to detect with conventional methods Can no longer trust system output once kernel is compromised Other kernel rootkits can defeat kern_check program (SuckIT)

Rootkit Summary Prevent hackers from gaining root access in order to prevent rootkits from being installed Must check systems on a periodic basis for rootkit exploits Current advice for a rootkitted system: Wipe out files and re-install operating system. Is it possible to re-establish trust on a Rootkited System?

Trojan Horse Backdoors Type of Trojan horse backdoor CharacteristicsAnalogyExample tools in this category Application-Level Trojan Horse Backdoor A separate application runs on the system An attacker adds poison to your soup. Sub7, BO2K, Tini, etc. Traditional RootKitsCritical Operating System components are replaced. An attacker replaces your potatoes with poison ones Lrk6, T0rnkit, etc. Kernel-Level RootKitsKernel is patched.An attacker replaces your tongue with a poison one. Knark, adore, Kernel Intrusion System, rootkit.com, etc. Traditional RootKit Kernel Trojan login Trojan ps Trojan ifconfig good tripwire Kernel-level RootKit Kernel good login good ps good ifconfig good tripwire Trojan Kernel Module Application-level Kernel Evil Program good program good program good program good program

Here Come the Worms! Compromising systems one-by-one can be such a chore Worms are attack tools that spread across a network, moving from host to host exploiting weaknesses Worms automate the process Take over systems Scan for new vulnerable systems Self-replicate by moving across the network to another vulnerable system Each instance of a worm is a “segment”

2001: Year of the Worm? In 2001, we saw: Ramen L10n Cheese Sadmind/IIS Code Red and Code Red II Nimda To date, worms haven’t been nearly as nasty as they could be Most damage is a result of worm resource consumption New generations of worms arrive every 2 to 6 months

Coming Soon - Super Worms Be on the lookout for very nasty new worms Multi-functional Spread, steal, erase, etc. Multi-platform Win, Linux, Solaris, BSD, AIX, HP-UX… Multi-exploit Many buffer overflows, etc. Zero-Day exploits Just discovered; no patch available Polymorphic Metamorphic We’ve seen many of these pieces, but no one has rolled them all together… yet!

Worm Defenses Buffer overflow defenses help a lot here Rapidly deploy patches Anti-virus solutions At the desktop… …AND at the mail server …AND at the file server Incident response capabilities, linked with network management