HUNTING FOR METAMORPHIC ENGINES Mark Stamp & Wing Wong August 5, 2006.

Slides:



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

Simple Substitution Distance and Metamorphic Detection Simple Substitution Distance 1 Gayathri Shanmugam Richard M. Low Mark Stamp.
Dr. Richard Ford  Szor 7  Another way viruses try to evade scanners.
BLAST, PSI-BLAST and position- specific scoring matrices Prof. William Stafford Noble Department of Genome Sciences Department of Computer Science and.
Chapter 5 Anti-Anti-Virus. Anti-Anti-Virus  All viruses self-replicate  Anti-anti-virus means it’s “openly hostile” to AV  Anti-anti-virus techniques?
Malicious Logic What is malicious logic Types of malicious logic Defenses Computer Security: Art and Science © Matt Bishop.
Polymorphic Viruses A brief survey Joseph Hamm Shirlan Johnson.
Polymorphic blending attacks Prahlad Fogla et al USENIX 2006 Presented By Himanshu Pagey.
Profile Hidden Markov Models Bioinformatics Fall-2004 Dr Webb Miller and Dr Claude Depamphilis Dhiraj Joshi Department of Computer Science and Engineering.
Applications of Hidden Markov Models in the Avian/Mammalian Genome Comparison Christine Bloom Animal Science College of Agriculture University of Delaware.
Optimatization of a New Score Function for the Detection of Remote Homologs Kann et al.
Profile-profile alignment using hidden Markov models Wing Wong.
Metamorphic Malware Research
METAMORPHIC SOFTWARE FOR GOOD AND EVIL Wing Wong & Mark Stamp November 20, 2006.
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.
Metamorphic Viruses Pat Walpole. Introduction What are metamorphic viruses Why they are dangerous Defenses against them.
Profile Hidden Markov Models PHMM 1 Mark Stamp. Hidden Markov Models  Here, we assume you know about HMMs o If not, see “A revealing introduction to.
Pairwise Alignment of Metamorphic Computer Viruses Student:Scott McGhee Advisor:Dr. Mark Stamp Committee:Dr. David Taylor Dr. Teng Moh.
Presenter: Shant Mandossian EFFECTIVE TESTING OF HEALTHCARE SIMULATION SOFTWARE.
Antivirus Software Detects malware (not just viruses) May eliminate malware as well Often sold with firewalls Two approaches: Dictionary-based - Compares.
Automated malware classification based on network behavior
CISC Machine Learning for Solving Systems Problems Presented by: Akanksha Kaul Dept of Computer & Information Sciences University of Delaware SBMDS:
Alignment Statistics and Substitution Matrices BMI/CS 576 Colin Dewey Fall 2010.
Introduction to Profile Hidden Markov Models
1 Chap 10 Malicious Software. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on.
Masquerade Detection Mark Stamp 1Masquerade Detection.
Malicious Code Brian E. Brzezicki. Malicious Code (from Chapter 13 and 11)
Computer Viruses Preetha Annamalai Niranjan Potnis.
Department of Computer Science Yasmine Kandissounon.
CSCE555 Bioinformatics Lecture 6 Hidden Markov Models Meeting: MW 4:00PM-5:15PM SWGN2A21 Instructor: Dr. Jianjun Hu Course page:
VIRUSES - Janhavi Naik. Overview Structure Classification Categories.
Structure Classifications &
1 A Feature Selection and Evaluation Scheme for Computer Virus Detection Olivier Henchiri and Nathalie Japkowicz School of Information Technology and Engineering.
Hunting for Metamorphic Engines Wing Wong Mark Stamp Hunting for Metamorphic Engines 1.
Retrospective Testing - How Good Heuristics Really Work Andreas Marx AV-Test.org University of Magdeburg GEGA IT-Solutions GbR.
Cryptanalysis of the Stream Cipher DECIM Hongjun Wu and Bart Preneel Katholieke Universiteit Leuven ESAT/COSIC.
One-class Training for Masquerade Detection Ke Wang, Sal Stolfo Columbia University Computer Science IDS Lab.
Statistical Tools for Linking Engine-generated Malware to its Engine Edna C. Milgo M.S. Student in Applied Computer Science TSYS School of Computer Science.
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.
Hidden Markov Models for Software Piracy Detection Shabana Kazi Mark Stamp HMMs for Piracy Detection 1.
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.
I can be You: Questioning the use of Keystroke Dynamics as Biometrics —Paper by Tey Chee Meng, Payas Gupta, Debin Gao Presented by: Kai Li Department of.
Panda Anti-Rootkit & password storage tools
Advanced Polymorphic Worms: Evading IDS by Blending in with Normal Traffic Authors: Oleg Kolensnikov and Wenke Lee Published: Technical report, 2005, College.
Forensic Analysis of Toolkit-Generated Malicious Programs Yasmine Kandissounon TSYS School of Computer Science Columbus State University 2009 ACM Mid-Southeast.
Secure Spread Spectrum Watermarking for Multimedia Young K Hwang.
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.
METAMORPHIC VIRUS NGUYEN LE VAN.
The statistics of pairwise alignment BMI/CS 576 Colin Dewey Fall 2015.
Simple Substitution Distance and Metamorphic Detection Simple Substitution Distance 1 Gayathri Shanmugam Richard M. Low Mark Stamp.
Network Motifs See some examples of motifs and their functionality Discuss a study that showed how a miRNA also can be integrated into motifs Today’s plan.
More on HMMs and Multiple Sequence Alignment BMI/CS 776 Mark Craven March 2002.
Week-14 (Lecture-1) Malicious software and antivirus: 1. Malware A user can be tricked or forced into downloading malware comes in many forms, Ex. viruses,
Cosc 4765 Antivirus Approaches. In a Perfect world The best solution to viruses and worms to prevent infected the system –Generally considered impossible.
HUNTING FOR METAMORPHIC ENGINES Mark Stamp & Wing Wong September 13, 2006.
Profile Hidden Markov Models PHMM 1 Mark Stamp. Hidden Markov Models  Here, we assume you know about HMMs o If not, see “A revealing introduction to.
Computer Viruses Author: Alyse Allen.
V. A. Memos and K. E. Psannis*
Techniques, Tools, and Research Issues
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
Introduction to Hypothesis Testing
Chap 10 Malicious Software.
Presentation transcript:

HUNTING FOR METAMORPHIC ENGINES Mark Stamp & Wing Wong August 5, 2006

Outline I. Metamorphic software Both good and evil uses II. Metamorphic virus construction kits III. How effective are metamorphic engines? How to compare two pieces of code? Similarity within and between virus families Similarity to non-viral code IV. Can we detect metamorphic viruses? Commercial virus scanners Hidden Markov models (HMMs) Similarity index V. Conclusion

PART I Metamorphic Software

What is Metamorphic Software?  Software is metamorphic provided All copies do the same thing Internal structure of copies differs  Today almost all software is cloned  “Good” metamorphic software… Mitigate buffer overflow attacks  “Bad” metamorphic software… Avoid virus/worm signature detection

Metamorphic Software for “Good”?  Suppose program has a buffer overflow  If we clone the program One attack breaks every copy Break once, break everywhere (BOBE)  If instead, we have metamorphic copies Each copy still has a buffer overflow One attack does not work against every copy BOBE-resistant Analogous to genetic diversity in biology  A little metamorphism does a lot of good!

Metamorphic Software for Evil?  Cloned virus/worm can be detected Common signature on every copy Detect once, detect everywhere (DODE)  If instead virus/worm is metamorphic Each copy has different signature Same detection does not work against every copy Provides DODE-resistance Analogous to genetic diversity in biology  But, effective metamorphism here is tricky!

Virus Evolution  Viruses first appeared in the 1980s Fred Cohen  Viruses must avoid signature detection Virus can alter its “appearance”  Techniques employed encryption polymorphic metamorphic

Virus Evolution - Encryption  Virus consists of decrypting module (decryptor) encrypted virus body  Different encryption key different virus body signature  Weakness decryptor can be detected

Virus Evolution – Polymorphism  Try to hide signature of decryptor  Can use code emulator to decrypt putative virus dynamically  Decrypted virus body is constant Signature detection is possible

Virus Evolution – Metamorphism  Change virus body  Mutation techniques: permutation of subroutines insertion of garbage/jump instructions substitution of instructions

PART II Virus Construction Kits

Virus Construction Kits – PS-MPC  According to Peter Szor: “… PS-MPC [Phalcon/Skism Mass- Produced Code generator] uses a generator that effectively works as a code-morphing engine…… the viruses that PS-MPC generates are not [only] polymorphic, but their decryption routines and structures change in variants…”

Virus Construction Kits – G2  From the documentation of G2 (Second Generation virus generator): “… different viruses may be generated from identical configuration files…”

Virus Construction Kits - NGVCK  From the documentation for NGVCK (Next Generation Virus Creation Kit): “… all created viruses are completely different in structure and opcode…… impossible to catch all variants with one or more scanstrings.…… nearly 100% variability of the entire code”  Oh, really?

PART III How Effective Are Metamorphic Engines?

How We Compare Two Pieces of Code

Virus Families – Test Data  Four generators, 45 viruses 20 viruses by NGVCK 10 viruses by G2 10 viruses by VCL32 5 viruses by MPCGEN  20 normal utility programs from the Cygwin DLL

Similarity within Virus Families – Results

NGVCK Similarity to Virus Families  NGVCK versus other viruses 0% similar to G2 and MPCGEN viruses 0 – 5.5% similar to VCL32 viruses (43 out of 100 comparisons have score > 0) 0 – 1.2% similar to normal files (only 8 out of 400 comparisons have score > 0)

NGVCK Metamorphism/Similarity  NGVCK By far the highest degree of metamorphism of any kit tested Virtually no similarity to other viruses or normal programs Undetectable???

PART IV Can Metamorphic Viruses Be Detected?

Commercial Virus Scanners  Tested three virus scanners eTrust version avast! antivirus version 4.7 AVG Anti-Virus version 7.1  Each scanned 37 files 10 NGVCK viruses 10 G2 viruses 10 VCL32 viruses 7 MPCGEN viruses

Commercial Virus Scanners  Results eTrust and avast! detected 17 (G2 and MPCGEN) AVG detected 27 viruses (G2, MPCGEN and VCL32) none of NGVCK viruses detected

Detection with Hidden Markov Models  Use hidden Markov models (HMMs) to represent statistical properties of a set of metamorphic virus variants Train the model on family of metamorphic viruses Use trained model to determine whether a given program is similar to the viruses the HMM represents

Detection with HMMs – Theory  A trained HMM maximizes the probabilities of observing the training sequence assigns high probabilities to sequences similar to the training sequence represents the “average” behavior if trained on multiple sequences represents an entire virus family, as opposed to individual viruses

Detection with HMMs – Data  Data set 200 NGVCK viruses  Comparison set 40 normal exes from the Cygwin DLL 25 other “non-family” viruses (G2, MPCGEN and VCL32)  Many HMM models generated and tested

Detection with HMMs – Results

 Detect some other viruses “for free”

Detection with HMMs  Summary of experimental results All normal programs distinguished VCL32 viruses had scores close to NGVCK family viruses With proper threshold, 17 HMM models had 100% detection rate and 10 models had 0% false positive rate No significant difference in performance between HMMs with 3 or more hidden states

Detection with HMMs – Trained Models  Converged probabilities in HMM matrices may give insight into the features of the viruses it represents  We observe opcodes grouped into “hidden” states most opcodes in one state only  What does this mean? We are not sure…

Detection via Similarity Index  Straightforward similarity index can be used as detector To determine whether a program belongs to the NGVCK virus family, compare it to any randomly chosen NGVCK virus NGVCK similarity to non-NGVCK code is small Can use this fact to detect metamorphic NGVCK variants

Detection with Similarity Index  Experiment compare 105 programs to one selected NGVCK virus  Results 100% detection, 0% false positive  Does not depend on specific NGVCK virus selected

PART V Conclusion

 Metamorphic generators vary a lot NGVCK has highest metamorphism (10% similarity on average) Other generators far less effective (60% similarity on average) Normal files 35% similar, on average  But, NGVCK viruses can be detected! NGVCK viruses too different from other viruses and normal programs

Conclusion  NGVCK viruses not detected by commercial scanners we tested  Hidden Markov model (HMM) detects NGVCK (and other) viruses with high accuracy  NGVCK viruses also detectable by similarity index

Conclusion  All metamorphic viruses tested were detectable because High similarity within family and/or Too different from normal programs  Effective use of metamorphism by virus/worm requires A high degree of metamorphism and similarity to other programs This is not trivial!

The Bottom Line  Metamorphism for “good” For example, buffer overflow mitigation A little metamorphism does a lot of good  Metamorphism for “evil” For example, try to evade virus/worm signature detection Requires high degree of metamorphism and similarity to normal programs Not impossible, but not easy…

References  X. Gao, “Metamorphic Software for Buffer Overflow Mitigation”, masters thesis, Department of Computer Science, San Jose State University, 2005  P. Szor, The Art of Computer Virus Research and Defense, Addison-Wesley, 2005  M. Stamp, Information Security: Principles and Practice, Wiley Interscience, 2005  W. Wong, “Analysis and Detection of Metamorphic Computer Viruses”, masters thesis, Department of Computer Science, San Jose State University, 2006