HUNTING FOR METAMORPHIC HUNTING FOR METAMORPHIC Péter Ször and Peter Ferrie Symantec Corporation VIRUS BULLETIN CONFERENCE ©2001 Presented by Stephen Karg.

Slides:



Advertisements
Similar presentations
Smita Thaker 1 Polymorphic & Metamorphic Viruses Presented By : Smita Thaker Dated : Nov 18, 2003.
Advertisements

Dr. Richard Ford  Szor 7  Another way viruses try to evade scanners.
1 Detection of Injected, Dynamically Generated, and Obfuscated Malicious Code (DOME) Subha Ramanathan & Arun Krishnamurthy Nov 15, 2005.
1 CHAPTER 8 BUFFER OVERFLOW. 2 Introduction One of the more advanced attack techniques is the buffer overflow attack Buffer Overflows occurs when software.
Slide 1 Adapted from Vitaly Shmatikov, UT Austin Trojans and Viruses.
Slide 1 Vitaly Shmatikov CS 378 Trojans and Viruses.
Polymorphic Viruses A brief survey Joseph Hamm Shirlan Johnson.
1 Pertemuan 05 Malicious Software Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
Polymorphism in Computer Viruses CS265 Security Engineering Term Project Puneet Mishra.
Virus Encyption CS 450 Joshua Bostic. topics Encryption as a deterent to virus scans. History of polymorphic viruses. Use of encryption by viruses.
HUNTING FOR METAMORPHIC ENGINES Mark Stamp & Wing Wong August 5, 2006.
Antivirus Software Detects malware (not just viruses) May eliminate malware as well Often sold with firewalls Two approaches: Dictionary-based - Compares.
Dr. Richard Ford  Szor 11  Virus Scanners – how they work, why they matter, how to write one…
Henric Johnson1 Chapter 10 Malicious Software Henric Johnson Blekinge Institute of Technology, Sweden
CAP6135: Malware and Software Vulnerability Analysis Viruses Cliff Zou Spring 2011.
David Evans CS201j: Engineering Software University of Virginia Computer Science Lecture 18: 0xCAFEBABE (Java Byte Codes)
Malicious Software Malicious Software Han Zhang & Ruochen Sun.
1 Chap 10 Malicious Software. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on.
Malicious Code Brian E. Brzezicki. Malicious Code (from Chapter 13 and 11)
Computer Viruses Preetha Annamalai Niranjan Potnis.
APT29 HAMMERTOSS Jayakrishnan M.
CIS3360: Security in Computing Chapter 4.2 : Viruses Cliff Zou Spring 2012.
BY ANDREA ALMEIDA T.E COMP DON BOSCO COLLEGE OF ENGINEERING.
Discovering Similarity of Short Programs by Canonical Form Baohua Wu University of Pennsylvania.
Structure Classifications &
Windows PE files Infections and Heuristic Detection Nicolas BRULEZ / Digital River PACSEC '04.
1 Chap 10 Virus. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on an ever increasing.
Chapter 10 Malicious software. Viruses and ” Malicious Programs Computer “ Viruses ” and related programs have the ability to replicate themselves on.
CAP6135: Malware and Software Vulnerability Analysis Viruses Cliff Zou Spring 2015.
Hunting for Metamorphic Engines Wing Wong Mark Stamp Hunting for Metamorphic Engines 1.
EECS 354 Network Security Reverse Engineering. Introduction Preventing Reverse Engineering Reversing High Level Languages Reversing an ELF Executable.
Dr. Richard Ford  Szor 12  Virus Scanners – why they need to scan memory and what issues there are in this area.
Telecommunications Networking II Lecture 41f Viruses and Worms.
Recent Internet Viruses & Worms By Doppalapudi Raghu.
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.
2004 Symantec Corporation, All Rights Reserved Principles and Practice of X-raying Frédéric Perriot Peter Ferrie Symantec Security Response.
RIVERSIDE RESEARCH INSTITUTE Deobfuscator: An Automated Approach to the Identification and Removal of Code Obfuscation Eric Laspe, Reverse Engineer Jason.
Assembly Code Optimization Techniques for the AMD64 Athlon and Opteron Architectures David Phillips Robert Duckles Cse 520 Spring 2007 Term Project Presentation.
CISC Machine Learning for Solving Systems Problems Presented by: Sandeep Dept of Computer & Information Sciences University of Delaware Detection.
PHMMs for Metamorphic Detection Mark Stamp 1PHMMs for Metamorphic Detection.
CS 346 – Chapter 2 OS services –OS user interface –System calls –System programs How to make an OS –Implementation –Structure –Virtual machines Commitment.
Using Engine Signature to Detect Metamorphic Malware Mohamed R. Chouchane and Arun Lakhotia Software Research Laboratory The University of Louisiana at.
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:
Worm Defense Alexander Chang CS239 – Network Security 05/01/2006.
Forensic Analysis of Toolkit-Generated Malicious Programs Yasmine Kandissounon TSYS School of Computer Science Columbus State University 2009 ACM Mid-Southeast.
Evolutionary Security CS 610: Advanced Security Gabriel Daleson.
n Just as a human virus is passed from person from person, a computer virus is passed from computer to computer. n A virus can be attached to any file.
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,
METAMORPHIC VIRUS NGUYEN LE VAN.
Operating System Protection Through Program Evolution Fred Cohen Computers and Security 1992.
Advanced Anti-Virus Techniques
Lecture 5 Rootkits Hoglund/Butler (Chapters 1-3).
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.
Computer Viruses Author: Alyse Allen.
MALWARE.
Bringing VX back to life!
V. A. Memos and K. E. Psannis*
Acknowledgement This lecture uses some contents from the lecture notes from: Dr. Vitaly Shmatikov CS Network Security and Privacy Introduction to.
Techniques, Tools, and Research Issues
CSCD 303 Essential Computer Security Fall 2017
Semantics-Aware Malware Detection
Chap 10 Malicious Software.
Executive Director and Endowed Chair
Executive Director and Endowed Chair
CSC 382/582: Computer Security
Challenges in Building and Detecting Portable Source Code Morphers
CSCD 303 Essential Computer Security Fall 2018
Chap 10 Malicious Software.
Introduction to Internet Worm
Presentation transcript:

HUNTING FOR METAMORPHIC HUNTING FOR METAMORPHIC Péter Ször and Peter Ferrie Symantec Corporation VIRUS BULLETIN CONFERENCE ©2001 Presented by Stephen Karg November 8, 2005 CS510 – Advanced Security Portland State University

Overview Win32 Virus Evolution Polymorphism to Metamorphism Detection Techniques Counter-Measures, Counter-Counter-Measures, …ad nauseum. Potential “future” virus (worm) developments.

Virus Scanners Dominant market solution to the virus problem, focus of this paper. Other defenses exist however (integrity checking, behavior blocking). Typically scan files for a virus signature (strings from known malware). Main challenge: virus code obfuscation. (randomize, randomize, randomize!)

Virus Evolution Encrypted Viruses Easiest way to hide functionality. Send (plain-text) decryptor along with virus. Counter-Measure: AV’s just start looking at decryptor signatures. Counter-Counter-Measure: randomized decryptors.

Polymorphic Viruses Permutate decryptors using different methods (XOR, multiple layers of encryption, etc.) Polymorphism is about changing appearance, but decrypted virus is the same. When the virus eventually reveals itself, even in a brief window, this snapshot of the core virus code is very useful to AV.

Metamorphic Viruses Metamorphism is about altering the virus code body itself. Behavior and functionality change, so much harder to profile. Win32/Apparition Virus First evolving virus to not rely polymorphic decryptors. Virus carries source code and recompiles on host (if compiler installed). Randomly inserts and removes junk code.

Polymorphic vs. Metamorphic

Simple Metamorphism May, 2000 – Win32/Ghost Modular reordering used to alter global signature. m ! permutations (10 modules ~3.6 million possible signatures). Counter-Measure: String-Detection. Finer-grained subset analysis, more resilient to change.

Simple Metamorphism December, 1998 – Win95/Regswap 5A pop edx BF mov edi,0004h 8BF5 mov esi,ebp B80C mov eax,000Ch 81C add edx,0088h 8B1A mov ebx,[edx] 899C mov [esi+eax* ],ebx 58 pop eax BB mov ebx,0004h 8BD5 mov edx,ebp BF0C mov edi,000Ch 81C add eax,0088h 8B30 mov esi,[eax] 89B4BA mov [edx+edi* ],esi Unchanged code underlined, so wildcard-string detection should still spot (e.g. 81**** B**… ).

Complex Metamorphism July, Win32/Evol Implements metamorphic engine that uses machine code instruction equivalences. Also inserts garbage. a. An early generation: C7060F mov dword ptr [esi], Fh C746048BEC5151 mov dword ptr [esi+0004],5151EC8Bh b. And one of its later generations: BF0F mov edi, Fh 893E mov [esi],edi 5F pop edi 52 push edx B640 mov dh,40 BA8BEC5151 mov edx,5151EC8Bh 53 push ebx 8BDA mov ebx,edx 895E04 mov [esi+0004],ebx Magic DWORDS (e.g Fh) changed also, so wild- card string detection fails after 3 rd generation.

Complex Metamorphism September, 2000 – Win95/Zperm Also inserts garbage instructions. Replaces single instructions with equivalent ones. (e.g. xor eax, eax  sub eax, eax ) Reorders jump instructions, so search string detection will not work. Permutations are n! where n = number of core virus code instructions.

Zperm example

Host Mutation Bistro, Smorph, Zmist Virus not only mutates itself but the host application. This randomizes the point-of-entry. Metamorphism extended to virus behavior, not just signature. Harder to repair infected file, and far less predictable. Detection must be algorithmic (emulator or VM analysis).

Advanced Metamorphic Engines Zmist Most complex binary virus encountered to date (of paper). Little bit of everything discussed so far. Does not simply append virus code segment but actually integrates itself into the host code. Moves code blocks, inserts instructions, changes branches and regenerates all surrounding code, data references, even checksum. Random entry point means virus may never receive control (branch not taken). 3 different types of infection, each with its own probabilistic behavior.

Detection Techniques Geometric Detection Uses ‘shape heuristics’ Analyzes changes made to the file structure. e.g. suspicious memory block allocations. Prone to false positives. Used in conjunction with virus infection markers, can reduce number of false positives.

Detection Techniques Disassembly Can be useful for avoiding false-positives: …66 3D 4D 5A… *common red-flag (exe?) but is it CMP AX, ‘ZM’ or MOV EDI, 5A4D3D66 ? Combined with state machine can try to isolate “interesting” instructions from garbage, nop’s, jumps, etc. Could thwart viruses that insert lots of garbage but keep core instructions in same order.

Detection Techniques Interactive AV Scanning Engines Key to ant goog anti-metamorphic AV software. CPU emulator allows virus to execute in a virtual sandbox. Trap and test for specific behaviors known a priori. e.g. when ACG virus reaches instruction i, registers a&b have values x&y. Can also do stack analysis (Evol).

Detection Techniques Emulator-Based Heuristics Zero-day exploits. Heuristic analysis of suspicious behavior (if it walks like a virus and talks like virus..) VM’s allow deeper level of analysis than CPU emulator, and fewer false-positives. Limitations: 1. Hard to virtualize everything. 2. Performance issues. 3. Easy counter-measures for emulator evasion: No active internet connection? Do nothing. Random behavior: infect on Sundays only. Insert lots of benign behavior before payload (Zperm).

Future Developments Concepts seen here extended to distributed worm behavior. Self-updating viruses (they can patch too). More cooperative behavior among worm instantiations: Information exchange. Exporting/Importing code. Have seen this sort of thing already Code Red DDOS, Slapper (P2P). Nimbda checking backdoors left by Code Red II and Sadmind/IIS worms. Reproductive cross-mutations (hostA x virusB = ?) - Darwinism meets computer security.

Questions? Thanks.