Malware Overview Computer Security I CS461/ECE422 Spring 2012.

Slides:



Advertisements
Similar presentations
Lecture: Malicious Code CIS 3360 Ratan K. Guha. Malicious Code2 Overview and Reading Assignments Defining malicious logic Types Action by Viruses Reading.
Advertisements

CSE331: Introduction to Networks and Security Lecture 32 Fall 2002.
Lecture 13 Malicious Software modified from slides of Lawrie Brown.
Cryptography and Network Security Chapter 19 Fourth Edition by William Stallings.
1 Anti Virus vs virus System i-Specific Anti-Virus Product Ali ameen al said.
Chapter 3 (Part 1) Network Security
1 Topic 1 – Lesson 3 Network Attacks Summary. 2 Questions ► Compare passive attacks and active attacks ► How do packet sniffers work? How to mitigate?
Cryptography and Network Security Malicious Software Third Edition by William Stallings Lecturer: Dr. Saleem Alzoubi.
________________ CS3235, Nov 2002 Viruses Adapted from Pfleeger[Chap 5]. A virus is a program [fragment] that can pass on malicious code [usually itself]
Chapter 14 Computer Security Threats Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Malicious Software programs exploiting system vulnerabilities known as malicious software or malware program fragments that need a host program e.g. viruses,
1 Pertemuan 05 Malicious Software Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE USC CSci530 Computer Security Systems Lecture.
1 Computer Viruses (and other “Malicious Programs) Computer “Viruses” and related programs have the ability to replicate themselves on an ever increasing.
How to Own the Internet in your spare time Ashish Gupta Network Security April 2004.
Guide to Operating System Security Chapter 2 Viruses, Worms, and Malicious Software.
Henric Johnson1 Chapter 10 Malicious Software Henric Johnson Blekinge Institute of Technology, Sweden
MSIT 458 – The Chinchillas. Offense Overview Botnet taxonomies need to be updated constantly in order to remain “complete” and are only as good as their.
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 7 – Malicious Software.
Malicious Software Malicious Software Han Zhang & Ruochen Sun.
1 Ola Flygt Växjö University, Sweden Malicious Software.
1 Chap 10 Malicious Software. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on.
Network and Internet Security SYSTEM SECURITY. Virus Countermeasures Antivirus approach ◦Ideal solution: Prevention ◦Not allowing the virus to infect.
Malicious Code Brian E. Brzezicki. Malicious Code (from Chapter 13 and 11)
CSCE 201 Attacks on Desktop Computers: Malicious Code Hardware attacks.
Malicious Software CIS 4361 Eng. Hector M Lugo-Cordero, MS Feb
Virus and Antivirus Team members: - Muzaffar Malik - Kiran Karki.
Lecture 14 Overview. Program Flaws Taxonomy of flaws: – how (genesis) – when (time) – where (location) the flaw was introduced into the system 2 CS 450/650.
1 Chapter 19: Malicious Software Fourth Edition by William Stallings Lecture slides by Lawrie Brown (Modified by Prof. M. Singhal, U of Kentucky)
CHAPTER 14 Viruses, Trojan Horses and Worms. INTRODUCTION Viruses, Trojan Horses and worm are malicious programs that can cause damage to information.
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Malware.
1 Higher Computing Topic 8: Supporting Software Updated
Malware and Exploit Enabling Code Information Assurance CS461/ECE422 Fall 2010.
1 Chap 10 Virus. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on an ever increasing.
CSCE 522 Lecture 12 Program Security Malicious Code.
Administrative: Objective: –Tutorial on Risks –Phoenix recovery Outline for today.
Chapter 11 Malicious Software
Viruses and Related Threats. 2 Summary  have considered:  various malicious programs  trapdoor, logic bomb, trojan horse, zombie  viruses  worms.
Fourth Edition by William Stallings Adapted form lecture slides by Lawrie Brown.
Chapter 10 Malicious software. Viruses and ” Malicious Programs Computer “ Viruses ” and related programs have the ability to replicate themselves on.
For any query mail to or BITS Pilani Lecture # 1.
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 Viruses and Worms By: Monika Gupta Monika Gupta.
Worm Defense Alexander Chang CS239 – Network Security 05/01/2006.
Viruses a piece of self-replicating code attached to some other code – cf biological virus both propagates itself & carries a payload – carries code to.
Malicious Software.
Chapter 19 – Malicious Software What is the concept of defense: The parrying of a blow. What is its characteristic feature: Awaiting the blow. —On War,
Computer virus Speaker : 蔡尚倫.  Introduction  Infection target  Infection techniques Outline.
Computer Security Threats CLICKTECHSOLUTION.COM. Computer Security Confidentiality –Data confidentiality –Privacy Integrity –Data integrity –System integrity.
Cryptography and Network Security Chapter 19 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
MALICIOUS SOFTWARE Rishu sihotra TE Computer
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,
Malicious Programs (1) Viruses have the ability to replicate themselves Other Malicious programs may be installed by hand on a single machine. They may.
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.
Information Systems CS-507 Lecture 32. Physical Intrusion The intruder could physically enter an organization to steal information system assets or carry.
Prof. Wenguo Wang Network Information Security Prof. Wenguo Wang Tel College of Computer Science QUFU NORMAL UNIVERSITY.
Detected by, M.Nitin kumar ( ) Sagar kumar sahu ( )
Company LOGO Malicious SW By Dr. Shadi Masadeh 1.
Computer Viruses Author: Alyse Allen.
Botnets A collection of compromised machines
MALWARE.
Malicious Software.
Viruses and Other Malicious Content
Botnets A collection of compromised machines
Chap 10 Malicious Software.
Chap 10 Malicious Software.
Malicious Program and Protection
Introduction to Internet Worm
Presentation transcript:

Malware Overview Computer Security I CS461/ECE422 Spring 2012

Reading Material Chapter 6 of text Ken Thompson and Trojans – Worm Anatomy and Model

Outline Malware –Trojans, rootkits –Virus –Structure –Prevention –Worm –Structure –Prevention

Zero Day Exploit An exploit that has no patch available Time between exploit discovery and wide activation shrinking Malware developer has trade-off –Big splash but faster discovery –Reduced attack rate but longer undiscovered

Windows Meta File Exploit Exploit flaws in the Windows rendering engine enable remote code execution –Memory corruptions –Visiting web site with “bad image” causes attack –Drive-by download –Attack sold for $4,000 – Bugtraq post in December 2005 –Probably lingering earlier –0 day exploit Microsoft’s response in early January 2006 – 001.mspxhttp:// 001.mspx

Malicious Code Set of instructions that cause a site’s security policy to be violated Often leveraging an inadvertent flaw (design or implementation) –To propagate/install on target –To cause harm on target

Malware Summary

Trojan Horses Seemingly useful program that contains code that does harmful things –Perform both overt and covert actions Frequently embedded in applets or games, attachments (mafia wars?) Trojan horse logins, spoof authentication or webpage forms

Thompson's Trojan Compiler Infect it in compiling “login” program –Add “bug” to accept fixed password Problem: –Easily seen in code review Solution: –Add second bug activated when compiling compiler itself –Then remove bugs from source

Rootkits Replace function table entries. New version performs extra checks to hide information before performing original call. Can replace Windows API pointers (user mode) Can also replace syscall table pointers Both require privilege, but most Windows installs require privilege anyway Techniques apply equally well to Linux and Mac

Rootkit Infiltration

Rootkit Countermeasures Hard to defend/detect User mode - Look for discrepancies Between results of different APIs Between API results and direct access to storage E.g., Rootkit revealer from Sysinternals (now MS)

Sony Player DRM and Rootkits Bad press for Sony 2005 –Mark Russinovich's original observations y-rootkits-and-digital-rights-management-gone-too- far.aspx#comments y-rootkits-and-digital-rights-management-gone-too- far.aspx#comments –A timeline – htmlhttp:// html To ensure that copy protection is not evaded install rootkit to hide the protection code –Available for other attackers to use –Un-installable –Uses CPU and memory –Not adequately noted in EULA

Virus Parts Infection mechanism How the virus moves from victim to victim Trigger The condition that causes the payload to activate or be delivered Payload The activity of the virus beyond the spreading E.g., installing software, harvesting information

Virus Operation Virus Phases: –Dormant: Waiting on trigger event –Propagation: Replicating to programs/disks –Triggering: By event to execute payload –Execution: Executing payload Details usually Machine/OS specific –Exploits different features or weaknesses

Virus Pseudocode beginvirus: If spread-condition then begin –For some set of target files do begin If target is not infected then begin –Determine where to place virus instructions –Copy instructions from beginvirus to endvirus into target –Alter target to execute new instructions If trigger pulled Perform some actions Goto beginning of infected program endvirus:

Virus Attachment A Virus can attach itself to a program or to data by –Appending itself to either the beginning or end of either source code or assembly, so it is activated when the program is run –Integrate itself into the program, spread out code –Compress original program so addition of virus does not change file system –Integrate into data: executable text macro, scripting –Macros and attachments An activated virus may: –Cause direct or immediate harm –Run as a memory resident program (TSR, daemon, or service) –Replace or relocate boot sector programs, start at system start- up

Macros Viruses Macro code attached to some data file –Interpreted rather than compiled –Platform independent –Mobile code Interpreted by program using the file –E.g., Word/Excel macros –Esp. using auto command and command macros –Often automatically invoked Blurs distinction between data and program files making task of detection much harder Classic trade-off: ”ease of use” vs ”security”

Viruses Spread using with attachment containing a macro virus –Melissa, LoveBug Triggered when user opens or executes attachment –Also when mail viewed by using scripting features in mail agent –Usually targeted at Microsoft Outlook mail agent and Word/Excel documents, Microsoft IIS

Basic Precautions Don’t import untrusted programs –Who can you trust? –Viruses have been found in commercial shrink-wrap software –Standard download sites have been corrupted Check MD5 hashes Scan for viruses, install anti-virus software Update anti-virus software regularly

Signature Scanning Early viruses had characteristic code patterns known as signatures Create a database of patterns, search files for patterns (McAffee) Use data-mining, learning, feature extraction etc. to look for disguised or obfuscated patterns Can only scan for known signatures Text calls this “first generation” scanner

Signature Avoiding Viruses Polymorphic Virus produces varying but operationally equivalent copies of itself –Use alternative but equivalent instructions –Gets around signature scanners. Whale virus, 32 variants Stealth Virus actively tries to hide all signs of its presence –A virus can intercept calls to read a file and return correct values about file sizes etc. Brain Virus

Another Signature Avoiding Virus Encrypted Virus stores bulk of self encrypted –Small decrypt routine in clear –Key stored in clear –Metamorphic virus: mutates with every infection –Similar to polymorphic –But this is a complete rewrite

Other Virus Scanners Second generation Use heuristics rather than direct signatures Look for code fragments like encrypt/decrypt loops Use integrity checks to track changes Third generation Track virus by actions rather than code Identify/notify/prevent anomalous behaviour E.g., installing device driver after visiting a web site E.g, Cisco Security Agent. Host based intrusion detection. Behaviour blocking software discussed in text.

Other Virus Scanners Fourth Generation Use multiple techniques Scanning Access control Behavioural analysis

Virus Scanners v. Malware What percentage of new viruses does a virus scanner detect?

Worms Propagate from one computer to another – Self-directed propagation Viruses use /infected media to propagate to so differentiation is fuzzy

The Morris Worm Incident How 99 lines of code brought down the Internet (ARPANET actually) in November Robert Morris Jr. Ph.D student, Cornell, wrote a program that could: –Connect to another computer, and find and use one of several vulnerabilities (buffer overflow in fingerd, password cracking, backdoor in mail program) to copy itself to that second computer. –Begin to run the copy of itself at the new location. –Both the original code and the copy would then repeat these actions in an infinite loop to other computers on the ARPANET (mistake!) Morris was sentenced to three years of probation, 400 hours of community service, and a fine of $10,050. (He is now a Professor at MIT.) Worms have gotten bigger and more aggressive

Worm Phases Dormant Propagation –Search for other systems to infect –Establish connection to target remote system –Replicate self onto remote system Triggering Execution

Who to target? Scanning –Currently generally used –Select random addresses Mix of addresses in current network (local computers probably have similar vulnerabilities) and remote networks –No longer feasible in IPv6 32 bit vs 128 bit address space

Viruses and Worms in IPv4 Slammer infected most of the IPv4 Internet in 10 minutes (75,000 hosts infected in one-half hour) Source caida.org

Worms in IPv6 Address space is 2^128 instead of 2^32 –Random address selection will not work Say ¼ of address in IP4 network run Windows (2^30) –1 in 4 chance of finding a target with each probe Spread that among 2^128 addresses –1 in 2^98 chances of finding a viable target

Viruses and Worms in IPv6 Pure Viruses don’t change in IPv6 but hybrid and pure worms do. –Hybrids and pure worms today rely in Internet scanning to infect other hosts, this isn’t feasible as shown earlier in this presentation. –At 1 million packets per second on a IPv6 subnet with 10,000 hosts it would take over 28 years to find the first host to infect –Let’s take a look at the same animation this time simulating how slammer might fare in an all IPv6 Internet: Worm developers will adapt to IPv6 but pure random scanning worms will be much more problematic for the attacker. Best practices around worm detection and mitigation from IPv4 remain. 28 Years Later

Other Techniques to Find Targets Interesting Papers –How to 0wn the Internet… usenix-sec02/ usenix-sec02/ –Top speed of flash worms opspeed-worm04.pdf opspeed-worm04.pdf Hitlist Scanning –Stealthy scans (randomized, over months), distributed scanning, DNS searches, Spiders (Code red, crawls for high connectivity), listening on P2P networks, public lists Permutation scanning (divide up IP address space) Warhol worm- Hit list + permutation

Network Propagation Send small number of packets to reduce detection UDP packets –No ACK needed, so can spoof source address Connect to vulnerable network services –Generally exercise buffer overflow –Launch shell Running at high privilege (ideal) Or use as foothold to mount other attacks to gain privilege Or use as attack launch point

Worm Examples Morris Worm Code Red –Exploited bug in MS IIS to penetrate and spread –Probes random IPs for systems running IIS –Had trigger time for denial-of-service attack –2nd wave infected servers in 14 hours Code Red 2 - trapdoor, for remote control Nimda - used multiple infection mechanisms, , file-sharing, web-client, IIS, Code Red 2 backdoor

More Worm Examples SQL Slammer Buffer overflow in MS SQL Server Infected 90% of vulnerable hosts in 10 minutes Conficker Attacks windows systems to install botnet software Password attacks and MS network vulnerabilities

Botnets Install on compromised machines Master sends commands to bots –Originally communicate through IRC –DDoS, large distributed computing, spam –Now user more sophisticated P2P control nets –Changing domain names Stable framework to create your own botnets – –

Drive-by Infections Much malware installation (e.g. netbots) in caused by user-instigated drive-by download Visit infected web site and accidently download software (like the windows meta file exploit) Click link to view cute “Dancing bunny” e-card your friend sent you Less is caused by direct worm-style network propagation Improved network controls

Worm Controls Signature based scanning Filter-based worm containment Payload-classification Packet analysis. More than just scanning Threshold random walk Look for randomness in communication patterns Rate limiting Limit the amount of scan-like traffic per host Rate halting Stop host after limit is reached

Key points Malware is real –Propagation –Attack –Control –Malware evolves –Technology –Motivations