Understanding Malware: Spyware, Viruses and Rootkits Steve Lamb IT Pro Evangelist for Security Technologies

Slides:



Advertisements
Similar presentations
Thank you to IT Training at Indiana University Computer Malware.
Advertisements

Online Safety. Introduction The Internet is a very public place Need to be cautious Minimize your personal risk while online Exposure to: viruses, worms,
1 Introduction to Honeypot, Denial-of- Service, and Rootkit Cliff C. Zou CAP6135 Spring, 2010.
 Application software consists of programs designed to make users more productive and/or assist with personal tasks.  Growth of internet simplified.
Microsoft Windows XP SP2 Urs P. Küderli Strategic Security Advisor Microsoft Schweiz GmbH.
Dr. John P. Abraham Professor UTPA 2 – Systems Threats and Risks.
1 Anti Virus vs virus System i-Specific Anti-Virus Product Ali ameen al said.
ROOTKIT VIRUS by Himanshu Mishra Points to be covered Introduction History Uses Classification Installation and Cloaking Detection Removal.
Windows Security Tech Talk 9/25/07. What is a virus?  A computer program designed to self replicate without permission from the end user  The program.
Don’t Lose Your Identity – Protect Yourself from Spyware Dan Frommer Sherry Minton.
Symantec AntiVirus Update Mark Reynolds Manager of Support Services Technology Support Services Michael Satut Manager of Distributed Support Services Technology.
Malicious Attacks. Introduction Commonly referred to as: malicious software/ “malware”, computer viruses Designed to enter computers without the owner’s.
Information for Developers Windows XP Service Pack 2 Information for Developers.
Viruses and Spyware. What is a Virus? A virus can be defined as a computer program that can reproduce by changing other programs to include a copy of.
Spring Definitions  Virus  A virus is a piece of computer code that attaches itself to a program or file so it can spread.
ROOT KITS. Overview History What is a rootkit? Rootkit capabilities Rootkits on windows OS Rootkit demo Detection methodologies Good tools for detection.
Chapter 9 Security Malware Defenses. Malware Can be used for a form of blackmail. Example: Encrypts files on victim disk, then displays message.
Guide to Operating System Security Chapter 2 Viruses, Worms, and Malicious Software.
Computer Viruses. Where the name came from This is a phrase coined from biology to describe a piece of software that behaves very much like a real virus.
GET CONTROL! Avoid The Headache… Five Simple Steps to a Safer Computer – NUIT Tech Talk.
Chapter Nine Maintaining a Computer Part III: Malware.
2851A_C01. Microsoft Windows XP Service Pack 2 Security Technologies Bruce Cowper IT Pro Advisor Microsoft Canada.
Computer security virus, hacking and backups. Computer viruses are small software programs that are designed to spread from one computer to another.
Working with Applications Lesson 7. Objectives Administer Internet Explorer Secure Internet Explorer Configure Application Compatibility Configure Application.
With Microsoft Windows 7© 2012 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Windows 7.
SEC 309 Advanced Malware Cleaning Mark Russinovich Technical Fellow, Platform and Services Division Microsoft Corporation
Securing Windows 7 Lesson 10. Objectives Understand authentication and authorization Configure password policies Secure Windows 7 using the Action Center.
1 Chap 10 Malicious Software. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on.
Endpoint Security 2.0: Next Generation Solutions & Why They Are Needed October 2008 Greg Valentine Solutions Engineer CoreTrace.
Data Security.
Hands-On Microsoft Windows Server 2008
Information for Developers Windows XP Service Pack 2 Information for Developers Tony Goodhew Product manager Developer Division Microsoft Corp
Protecting Your Computer & Your Information
Malicious Code Brian E. Brzezicki. Malicious Code (from Chapter 13 and 11)
Hacker Zombie Computer Reflectors Target.
Malware Fighting Spyware, Viruses, and Malware Ch 4.
1 Spyware, Adware, and Browser Hijacking. ECE Agenda What is Spyware? What is Adware? What is Browser Hijacking? Security concerns and risks Prevention,
Spyware Sue Scott Technology Librarian. What is Spyware Malware – (Malicious Software) A general term to encompass unwanted software on a personal computer.
Safe Computing. Computer Maintenance  Back up, Back up, Back up  External Hard Drive  CDs or DVDs  Disk Defragmenter  Reallocates files so they use.
Windows Vista Security Center Chapter 5(WV): Protecting Your Computer 9/17/20151Instructor: Shilpa Phanse.
Rootkits. EC-Council The Problem  Microsoft Corp. security researchers are warning about a new generation of powerful system-monitoring programs, or.
Administrator Protect against Malware by: Brittany Slisher and Gary Asciutto.
3-Protecting Systems Dr. John P. Abraham Professor UTPA.
A virus is software that spreads from program to program, or from disk to disk, and uses each infected program or disk to make copies of itself. Basically.
CHAPTER 14 Viruses, Trojan Horses and Worms. INTRODUCTION Viruses, Trojan Horses and worm are malicious programs that can cause damage to information.
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.
Windows Vista Inside Out Chapter 22 - Monitoring System Activities with Event Viewer Last modified am.
Return to the PC Security web page Lesson 5: Dealing with Malware.
CAP6135: Malware and Software Vulnerability Analysis Rootkits Cliff Zou Spring 2012.
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.
Computer security By Isabelle Cooper.
A Computer Virus is a software program that is designed to copy itself over and over again and to attach itself to other programs. They don’t affect hardware,
Open Malicious Source Symantec Security Response Kaoru Hayashi.
Understand Malware LESSON Security Fundamentals.
W elcome to our Presentation. Presentation Topic Virus.
Spyware, Adware & Malware JEEP HOBSON JEEP HOBSON ITE-130 ITE-130 SPRING 2007 SPRING 2007.
Acknowledgement Some contents on honeypot are from  honeynets.ppt
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,
Sniper Corporation. Sniper Corporation is an IT security solution company that has introduced security products for the comprehensive protection related.
Computer Security Keeping you and your computer safe in the digital world.
Max Secure Software founded in Jan 2003 develops innovative privacy, security, protection and performance solutions for Internet users. The company is.
Windows Vista Configuration MCTS : Internet Explorer 7.0.
Protecting Computers From Viruses and Similarly Programmed Threats Ryan Gray COSC 316.
Cosc 4765 Antivirus Approaches. In a Perfect world The best solution to viruses and worms to prevent infected the system –Generally considered impossible.
Malware Incident Response
A+ Guide to Managing and Maintaining Your PC, 7e
Chap 10 Malicious Software.
Implementing Client Security on Windows 2000 and Windows XP Level 150
Chap 10 Malicious Software.
Presentation transcript:

Understanding Malware: Spyware, Viruses and Rootkits Steve Lamb IT Pro Evangelist for Security Technologies Copyright © 2005 Mark Russinovich

Scope What this talk covers: – Types of malware – How malware propagates and works – How to detect and prevent malware What it doesn’t: – Phishing – Product reviews and comparisons – General security information – How to write malware

Agenda The Malware problem Spyware, adware and trojans Viruses Rootkits Running as non-admin Conclusion

Is Anyone After You?

Know Your Adversary

Spyware is Rampant We’ve all cleaned malware off the computers of family and friends EarthLink found an average of 28 spyware programs on their customer systems Spyware is cause of 2 of every 5 home user and 1 out of every 4 corporate customer service calls

The Growing Threat 1 1 Symantec March 2005 Internet Security Threat Report 1403 new vulnerabilities discovered in Q304/Q105 – 13% increase over previous 6 months – 97% rated as moderately or highly severe – 80% remotely exploitable – 70% “easy” to exploit 7630 new worms and viruses discovered in 2H04 – 64% increase over previous 6 months 54% of malware created in 2H04 exposes confidential information – Up from 44% in the previous 6 months

There’s a Sense of Complacency Many users expect to get spyware and adware as part of freeware Lots of unpatched systems – The top five reported exploited corporate computer vulnerabilities have had patches available for months – According to CERT, 95% of security breaches use known vulnerabilities – As of March 2005 less than ¼ of corporate Windows XP users had applied SP2

Interferes with productivity Causes a constant support burden Opens the door to financial and corporate data theft It’s a matter of time before there’s a major terrorist incident in cyberspace Understanding malware is the key to fighting it Fighting Malware: A Top Priority

Agenda The Malware problem Spyware, adware and trojans Viruses Rootkits Running as non-admin Conclusion

Definitions Adware: – Software that delivers ads through banners and popups Spyware: – Gathers information without consent – Sends the information to 3rd parties without notification – Changes behavior, look, or feel without consent – Spyware is often combined with adware Trojan: – Malware disguised as harmless software

How It Gets Delivered By invitation or attractive attachment – Fake Microsoft security bulletins – See – Pictures Piggy-backed on software installs

Drive-by downloads – Users get tricked by misleading Active X certificates – IE in Windows XP SP2 has clearer notifications Popups and other tricks – Lots of third-party popup blockers – IE in Windows XP SP2 has a blocker – Banners and “pop-overs” can still trick users How It Gets Delivered (cont’d)

Preventing Spyware, Adware and Trojans Disable all active content in IE – This can prevent certain sites from working – For example, Windowsupdate.com Always click close window button (‘X’) in popup window to close Only download from reputable sites that certify software as being virus free Use antispyware

Antispyware Antispyware utilities, like antivirus, both scan for and block spyware Scanning relies on: – A spyware signature database – File scanning – A remediation database – It’s an after-the-fact solution Spyware blocking relies on detecting spyware installation when it happens

Inside Spyware Blocking Microsoft Antispyware (MSAS) includes “real-time protection”:

MSAS scans spyware startup points in the file system and registry every 10 seconds MSAS Real-Time Protection

MSAS Blocking When it sees a new entry it pops up a notification window Choosing “block” results in MSAS deleting the new entry

Manual Cleaning You should know how to identify potential malware and clean it – AS only addresses known spyware – AS can be attacked directly by spyware – A system might not have AS Tools for cleaning and investigating what’s running and what’s configured to run (all from – Autoruns – Process Explorer – Sigcheck

Investigating Autostarts Windows XP Msconfig (Start->Run->Msconfig) falls short when it comes to identifying autostarting applications – It knows about few locations – It provides little information

Autoruns Shows every place in the system that can be configured to run something at boot & logon – Services – Tasks – Explorer and IE addins (toolbars, browser helper objects, …) Shows full path and version information of startup image Easy Web search Easy to focus on non-Microsoft code (Hide Signed Microsoft Entries) Can also show empty locations – Informational only Includes command-line version – Easy to script – Collect profile of systems in network

Autoruns (cont’d)

Investigating Processes Task Manager provides little information about images that are running

Process Explorer Allows deep exploration of processes – Process tree – Command-line – Full path – Version information – Strings – Code signing verification – Loaded DLLs – Window finder – Easy Web search Suspicious processes: – No description or company name – Live in Windows directory – No icon – Strange URLs in the strings Includes process comment support for baselining

Process Explorer (cont’d)

Cleaning Identify malware processes with Process Explorer – Suspend and then kill them Identify malware autostarts with Autoruns – Remove them Delete malware files and directories from disk

Cleaning a Malware Infestation with… Microsoft antispyware Autoruns Process Explorer

Code Signing All (well, most) Microsoft code is digitally signed – Hash of file is signed with Microsoft’s private key – Signature is checked by decrypting signed hash with the public key Autoruns and Process Explorer both check signatures Use Sigcheck to scan executable images for signatures – Scan your entire system (at least \Windows) – Investigate all unsigned images – Maybe check signed image signers as well…

sigcheck -e -u -s c:\ Sigcheck Command to display information on unsigned executable images:

The Malware problem Spyware, adware and trojans Viruses Rootkits Running as non-admin Conclusion Agenda

Definitions Virus – Recursively replicates itself Worm – Virus that replicates on the network, usually automatically (mass mailer worms are an exception) – I’ll use “virus” to refer to both viruses and worms Exploit – Code that targets one or more security vulnerabilities to gain access to a system Payload – Virus body Zero-Day attack – Virus that exploits undisclosed vulnerability

Antivirus Scans files for viruses Scanning relies on: – A spyware signature database – File scanning – Include virtual machine technology to unpack/unencrypt virus code – A remediation database – Either quarantine or clean viruses – It’s an after-the-fact solution On-access scanning detects viruses in newly created files

Application Antivirus Filter driver AntivirusService File System Driver signaturedatabase kernelmode usermode Inside On-Access Scanning 1. AV filter intercepts application file open 2. Stops the I/O and lets service scan the file 3. If the file contains a virus that can’t be cleaned AV quarantines and blocks open

Preventing Viruses AV is dependent on signatures – Small outbreak might never get signature – Window of exposure between virus outbreak and signature update Alternate prevention mechanisms are mandatory – Firewalls and intrusion prevention – Restrictions on what code executes – Buffer overflow prevention

Major Virus Outbreaks Melissa – March 1999 – First major Windows network worm – Spread as mass mailer that infected Word documents with a macro virus Code Red – July 2001 – Exploited IIS buffer overflow vulnerability – Infected 250,000 systems in 9 hours – Planned DoS of Nimda – September 2001 – 12 different propagation mechanisms – Fastest and most effective worm to date

Major Virus Outbreaks (cont’d) Slapper – September 2002 – Injects through Apache SSL buffer overflow – Builds peer-to-peer network for massive DoS attack SQL Slammer – January 2003 – Exploits SQL Server buffer overflow – Causes network flood Blaster – August 2003 – Exploits DCOM RPC buffer overflow – Executes DoS on Windowsupdate.com Zotob – August 2005 – Exploits the following Microsoft Windows vulnerabilities: – Plug and Play Buffer Overflow, Message Queuing Remote Buffer Overflow, Workstation Service Remote Buffer Overflow, ASN.1 Library Bit String Processing Variant Heap Corruption

Function 1 Function 2 BufferBuffer Higher Addresses Return Address (Function 1) Stack of Function 2 Virus Data CodeCodeCodeCode Function 1 Function 2 Virus Buffer Overflow The common theme of almost all major virus outbreaks is buffer overflow

Buffer Overflow Protection Visual Studio.NET includes /GS flag – Inserts “canary” on stack that is checked on each function exit for integrity – Requires code recompilation – All OS code is compiled with this flag Windows XP SP2 and Windows Server 2003 SP1 support Data Execution Prevention (DEP) – Prevents code from executing in a memory page not specifically marked as executable – Stops exploits that rely on getting code executed

Data Execution Prevention Relies on hardware ability to mark pages as non executable – AMD calls it NX (“No Execute”) – Intel calls it XD (“Execute Disable”) Processor support: – Intel Itanium had this in 2001, but Windows didn’t support it until now – AMD64 was the next to support it – Then, AMD added Sempron (32-bit processor with NX support) – Intel added it first with their 64-bit extension chips (Xeon/Pentium 4s with EM64T) – More recently, Intel added it to their 32-bit processor line (anything ending in “J”)

Attempts to execute code in a page marked no execute result in: – User mode: access violation exception – Kernel mode: ATTEMPTED_EXECUTE_OF_NOEXECUTE_MEMORY bugcheck (blue screen) Memory that needs to be executable must be marked as such using page protection bits Data Execution Prevention (cont’d)

DEP is off for user applications on Windows XP, but on for Server 2003 Can be configured under performance options Even on processors without hardware DEP, some limited protection implemented for exception handlers DEP on 32-bit Windows

DEP on 64-bit Windows Always applied to all 64-bit processes and device drivers – Protects user and kernel stacks, paged pool, session pool 32-bit processes depend on configuration settings

Agenda The Malware problem Spyware, adware and trojans Viruses Rootkits Running as non-admin Conclusion

The Evolution of Malware Malware, including spyware, adware and viruses want to be hard to detect and/or hard to remove Rootkits are a fast evolving technology to achieve these goals – Cloaking technology applied to malware – Not malware by itself – Example rootkit-based viruses: Rootkit history – Appeared as stealth viruses – One of the first known PC viruses, Brain, was stealth – First “rootkit” appeared on SunOS in 1994 – Replacement of core system utilities (ls, ps, etc.) to hide malware processes

Cloaking Modern rootkits can cloak: – Processes – Services – TCP/IP ports – Files – Registry keys – User accounts Several major rootkit technologies – User-mode API filtering – Kernel-mode API filtering – Kernel-mode data structure manipulation – Process hijacking Visit for rootkit tools and informationwww.rootkit.com

Attack user-mode system query APIs Con: can be bypassed by going directly to kernel-mode APIs Pro: can infect unprivileged user accounts Examples: HackerDefender, Afx Taskmgr.exe Ntdll.dll Explorer.exe, Malware.exe, Winlogon.exe Rootkit Explorer.exe, Winlogon.exe user mode kernel mode User-Mode API Filtering

Attack kernel-mode system query APIs Cons: – Requires admin privilege to install – Difficult to write Pro: very thorough cloak Example: NT Rootkit Taskmgr.exe Ntdll.dll user mode kernel mode Rootkit Explorer.exe, Winlogon.exe Explorer.exe, Malware.exe, Winlogon.exe Kernel-Mode API Filtering

Also called Direct Kernel Object Manipulation Attacks active process data structure – Query API doesn’t see the process – Kernel still schedules process’ threads Cons: – Requires admin privilege to install – Can cause crashes – Detection already developed Pro: more advanced variations possible Example: FU Explorer.exeMalware.exeWinlogon.exe Active Processes Kernel-Mode Data Structure Manipulation

Hide inside a legitimate process Con: doesn’t survive reboot Pro: extremely hard to detect Example: Code Red Explorer.exe Malware Process Hijacking

Detecting Rootkits All cloaks have holes – Leave some APIs unfiltered – Have detectable side effects – Can’t cloak when OS is offline Rootkit detection attacks holes – Cat-and-mouse game – Several examples – Microsoft Research Strider/Ghostbuster – RKDetect – Sysinternals RootkitRevealer – F-Secure BlackLight

Perform a directory listing online and compare with secure alternate OS boot (see ) – Offline OS is Windows PE, ERD Commander, BartPE dir /s /ah * > dirscan.txt windiff dirscanon.txt dirscanoff.txt This won’t detect non-persistent rootkits that save to disk during shutdown Simple Rootkit Detection

RootkitRevealer Rootkit Windows API Raw file system, Raw Registry hive Filtered Windows API omits malware files and keys Malware files and keys are visible in raw scan RootkitRevealer RootkitRevealer (RKR) runs online RKR tries to bypass rootkit to uncover cloaked objects – All detectors listed do the same – RKR scans HKLM\Software, HKLM\System and the file system – Performs Windows API scan and compares with raw data structure scan

Demo HackerDefender – HackerDefender before and after view of file system – Detecting HackerDefender with RootkitRevealer

RootkitRevealer Limitations Rootkits have already attacked RKR directly by not cloaking when scanned – RKR is given true system view – Windows API scan looks like raw scan SysInternals have modified RKR to be a harder to detect by rootkits – RKR is adopting rootkit techniques itself – Rootkit authors will continue to find ways around RKR’s cloak – It’s a game nobody can win

Unless you have specific uninstall instructions from an authoritative source: Don’t rely on “rename” functionality offered by some rootkit detectors – It might not have detected all a rootkit’s components – The rename might not be effective Reformat the system and reinstall Windows! Dealing with Rootkits

The Malware problem Spyware, adware and trojans Viruses Rootkits Running as non-admin Conclusion Agenda

Running as Non-Admin Benefits of running as non-admin (also called limited user): – System files and settings can’t be compromised – System-level security (like AV) can’t be disabled – Kernel-mode rootkits won’t install – User-mode rootkits will only cloak malware in the account in which they are installed – Can’t install keystroke loggers – System can be reliably scanned and cleaned from an admin account – Much more… Warning: the Power Users group is effectively an administrator

How to Run as Non-Admin Cons of running as non-admin – Many system tasks require admin privilege or membership – Some legacy and line-of-business apps require admin privilege or membership Aaron Margosis’ web log presents ways to deal with admin-only applications – Two tools facilitate non-admin: – RunAs – Allows you to run a single app in an admin account – Apps won’t have access to network resources – Apps won’t have access to your profile – MakeMeAdmin – Aaron’s tool – Temporarily adds your account to the Administrators group – Overcomes RunAs limitations

Agenda The Malware problem Spyware, adware and trojans Viruses Rootkits Running as non-admin Conclusion

Defense-in-Depth Fighting malware is a battle that’s just heating up To deal effectively with malware you need to employ defense-in-depth: – External firewalls – Firewalled internal zones – Antivirus and antispyware – Patch management – No execute-supported hardware – Accounts that run as limited user

Your Feedback is Important! Please Fill Out your evaluation forms for this Session

© 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Thanks to Mark Russinovich ( Chief Software Architect Winternals Software who wrote this presentation for TechEd EMEA 2005