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?

Slides:



Advertisements
Similar presentations
Higher Computing Computer Systems S. McCrossan Higher Grade Computing Studies 8. Supporting Software 1 Software Compatibility Whether you are doing a fresh.
Advertisements

Branch prediction Titov Alexander MDSP November, 2009.
Defenses. Preventing hijacking attacks 1. Fix bugs: – Audit software Automated tools: Coverity, Prefast/Prefix. – Rewrite software in a type safe languange.
RIVERSIDE RESEARCH INSTITUTE Helikaon Linux Debugger: A Stealthy Custom Debugger For Linux Jason Raber, Team Lead - Reverse Engineer.
1 Detection of Injected, Dynamically Generated, and Obfuscated Malicious Code (DOME) Subha Ramanathan & Arun Krishnamurthy Nov 15, 2005.
Breno de MedeirosFlorida State University Fall 2005 Buffer overflow and stack smashing attacks Principles of application software security.
1 Future Technologies Group Shane Canon, canon at nersc dot govSummer Linux Kernel Class Root Kit Protection and Detection Shane Canon October
Software-based Code Attestation for Wireless Sensors.
________________ CS3235, Nov 2002 Viruses Adapted from Pfleeger[Chap 5]. A virus is a program [fragment] that can pass on malicious code [usually itself]
1 Pertemuan 05 Malicious Software Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
Building Secure Software Chapter 9 Race Conditions.
Chapter 9 Security Malware Defenses. Malware Can be used for a form of blackmail. Example: Encrypts files on victim disk, then displays message.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
SRE  Introduction 1 Software Reverse Engineering (SRE)
What is it, how does it work, and why is it important?
Antivirus Software Detects malware (not just viruses) May eliminate malware as well Often sold with firewalls Two approaches: Dictionary-based - Compares.
Henric Johnson1 Chapter 10 Malicious Software Henric Johnson Blekinge Institute of Technology, Sweden
Secure Embedded Processing through Hardware-assisted Run-time Monitoring Zubin Kumar.
1 CS503: Operating Systems Part 1: OS Interface Dongyan Xu Department of Computer Science Purdue University.
1 Chap 10 Malicious Software. 2 Viruses and ”Malicious Programs ” Computer “Viruses” and related programs have the ability to replicate themselves on.
Chapter 15: Security (Part 1). The Security Problem Security must consider external environment of the system, and protect the system resources Intruders.
Vulnerability-Specific Execution Filtering (VSEF) for Exploit Prevention on Commodity Software Authors: James Newsome, James Newsome, David Brumley, David.
Lecture 18 Page 1 CS 111 Online Design Principles for Secure Systems Economy Complete mediation Open design Separation of privileges Least privilege Least.
Malicious Code Brian E. Brzezicki. Malicious Code (from Chapter 13 and 11)
1 I-Logix Professional Services Specialist Rhapsody IDF (Interrupt Driven Framework) CPU External Code RTOS OXF Framework Rhapsody Generated.
1 “Operating System Protection Through Program Evolution” Dr. Frederick B. Cohen “…one of the major reasons attacks succeed is because of the static nature.
Computer Security and Penetration Testing
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
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.
Administrative: Objective: –Tutorial on Risks –Phoenix recovery Outline for today.
Chapter 10 Malicious software. Viruses and ” Malicious Programs Computer “ Viruses ” and related programs have the ability to replicate themselves on.
Debugging in Java. Common Bugs Compilation or syntactical errors are the first that you will encounter and the easiest to debug They are usually the result.
Testing and Debugging Version 1.0. All kinds of things can go wrong when you are developing a program. The compiler discovers syntax errors in your code.
DEBUGGING. BUG A software bug is an error, flaw, failure, or fault in a computer program or system that causes it to produce an incorrect or unexpected.
Dr. Richard Ford  Szor 12  Virus Scanners – why they need to scan memory and what issues there are in this area.
Christopher Kruegel University of California Engin Kirda Institute Eurecom Clemens Kolbitsch Thorsten Holz Secure Systems Lab Vienna University of Technology.
RIVERSIDE RESEARCH INSTITUTE Deobfuscator: An Automated Approach to the Identification and Removal of Code Obfuscation Eric Laspe, Reverse Engineer Jason.
Chapter 4 – Threads (Pgs 153 – 174). Threads  A "Basic Unit of CPU Utilization"  A technique that assists in performing parallel computation by setting.
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:
Lecture 5 Page 1 CS 111 Online Processes CS 111 On-Line MS Program Operating Systems Peter Reiher.
Precomputation- based Prefetching By James Schatz and Bashar Gharaibeh.
Operating Systems Security
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 Systems Viruses. Virus A virus is a program which can destroy or cause damage to data stored on a computer. It’s a program that must be run in.
Operating System Protection Through Program Evolution Fred Cohen Computers and Security 1992.
A Survey on Runtime Smashed Stack Detection 坂井研究室 M 豊島隆志.
Group 9. Exploiting Software The exploitation of software is one of the main ways that a users computer can be broken into. It involves exploiting the.
Security Attacks Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Lecture 5 Rootkits Hoglund/Butler (Chapters 1-3).
COMP091 – Operating Systems 1 Memory Management. Memory Management Terms Physical address –Actual address as seen by memory unit Logical address –Address.
VM: Chapter 7 Buffer Overflows. csci5233 computer security & integrity (VM: Ch. 7) 2 Outline Impact of buffer overflows What is a buffer overflow? Types.
Malicious Programs (1) Viruses have the ability to replicate themselves Other Malicious programs may be installed by hand on a single machine. They may.
Lecture 10 Anti-debugger techniques. Anti-debuggers Making reverse-engineering and disassembly painful –Polymorphism –Encryption –Interrupt disabling.
CS703 - Advanced Operating Systems By Mr. Farhan Zaidi.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Powerpoint Templates Page 1 Powerpoint Templates Unit Testing Ari Seppi
Cosc 4765 Antivirus Approaches. In a Perfect world The best solution to viruses and worms to prevent infected the system –Generally considered impossible.
Compilers and Security
Computer System Structures
CMSC 345 Defensive Programming Practices from Software Engineering 6th Edition by Ian Sommerville.
Presented by Xiaohui (Amy) Lin
Techniques, Tools, and Research Issues
Chap 10 Malicious Software.
Chapter 15 Debugging.
Chapter 15 Debugging.
Chap 10 Malicious Software.
CS5123 Software Validation and Quality Assurance
Chapter 15 Debugging.
Presentation transcript:

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? o Aggressively attack AV software o Make analysis of virus difficult o Try to avoid being detected using knowledge of how AV works

Anti-Virus Virus?  Anti-anti-virus versus “anti-virus virus” o What the … ?  This chapter is about anti-anti virus  Aside: What is an anti-virus virus? o Virus attacks other viruses, or o AV software that propagates virally, or o Software that drops a virus, then offers to remove it for a fee

Retroviruses  Also known as “anti-antivirus viruses”  Virus with active defense  What techniques are used?  Kill AV (and related) processes o Virus lists active processes o Kills things like Avgw.exe, Scan32.exe, Navw32.exe, Regedit.exe, Zonealarm.exe o Might also do this for processes run at startup

Retroviruses  Example: Ganda virus  Kills running AV-like processes  Examines processes run at startup o If it appears to be AV-related… o …replace 1 st instruction with “return”  Stealthier? o Starve AV software by lowering priority o Prevent AV software from connecting to company database, etc.

Entry Point Obfuscation  Viruses often hijack usual entry point o But this is fairly obvious  Set entry point at random location? o Probably not a good idea --- why?  Find calls to ExitProcess API? o Used by Simile and Ganda  Look for known code sequences? o Compilers produce stereotypical code

Anti-Emulation  Recall that emulation is used for AV  How can virus defeat emulation? 1. Outlast 2. Outsmart 3. Overextend  AV solution to 2 & 3 is better emulator o Of course, this comes at a price…

Anti-Emulation: Outlast  How to “outlast” an emulator? 1. Lots of (disguised) do-nothing code 2. Only be malicious, say, 1/10 th of time o Then AV might mark code as safe o Subsequently, virus has a free hand 3. Entry point obfuscation o Emulator might assume virus will appear early in execution of infected code

Anti-Emulation: Outsmart  Try to counter dynamic heuristics  Example: In some cases, decryption is a good dynamic heuristic  To counter this, virus could… o Spread decryption throughout code, not all in one loop o Then emulator might never reach its “decryption” threshold

Anti-Emulation: Overextend  How to push emulator to the limit? 1. Use undocumented instructions o If not handled correctly, it’s emulated 2. Bugs in CPU o If handled correctly, it’s emulated 3. Exhaust or abuse memory 4. Check for differences between system calls, e.g., check “time” twice o Emulator might return fixed value

Anti-Emulation: Overextend  How to push emulator to the limit? 5. Import obscure libraries 6. Use external resources, e.g., web page o Almost impossible to emulate external stuff 7. Emulator-specific checks o E.g., a known interface to outside

Armoring  “Armor” virus --- make analysis more difficult  Two types of techniques used: 1. Anti-debugging o Examples? 2. Anti-disassembly o Examples?

Anti-Debugging  Look for inserted breakpoints o Like error detection/correction  Look for single-stepping o Interrupt pushed onto stack after every instruction… so push then immediately pop, or o Time the execution, or o Dynamically modify next instruction, since processors usually pre-fetch  Last 2 also anti-emulation techniques

Anti-Debugging  If all else fails, ask: o IsDebuggerPresent()  In Linux, request to trace a process more than once fails o How can virus take advantage of this?

Anti-Debugging  Speaking of threads…  Interlocking and deadlocking threads o Only small part of code appears o Different parts each time  Fairly strong for anti-debugging o Improved software activation using multithreading Improved software activation using multithreading  Could be even more effective if combined with encrypted code o Project, anyone?

Anti-Disassembly  Anti-disassemblymentarianism?  Goals 1. Disassembly cannot be automated 2. Code not available until it executes  For 1, one idea is to mix code and data o Once mixed, separating is unsolvable

Anti-Disassembly  Mixing code and data can result in false disassembly  Disassemblers not so easily confused…

Anti-Disassembly  How to make code unavailable for static analysis? 1. Dynamically generate code at runtime 2. Self-modifying code o A red flag for heuristic analysis 3. Use the environment to “construct” code at runtime o How’s that?

Anti-Disassembly  Constructed code?  Hash stuff and extract “code” bits… o Perhaps combine with buffer overflow? o Project, anyone?

Anti-Disassembly  Encrypted code o Decrypt in parts as needed o Flush plaintext when done o Combine with anti-debugging o Watch for MiM type of attacks  My startup company did all of this  Might do similar things with threads o Intentionally “delicate” timing

Tunneling  Virus traces system functions it uses o To be sure they “go to” the right place o If not, code is being monitored  How to trace code? o Static heuristic or emulation o Just like the AV stuff…  Can’t tunnel into kernel on modern OS o But still might be useful technique

Tunneling  AV software can hide from tunneling if it’s installed in the kernel o Unless virus is in the kernel too…  But, virus in kernel would be bad for lots and lots of other reasons

Integrity Checker Attacks  How to avoid integrity check? o Integrity check can detect any change  Stealth virus might hide o But only from weak integrity check  Infect when legitimate change to file  In one infamous case… o Delete integrity check database and all checksums recomputed

Avoidance  Hide in places not searched  Possibilities include o USB key o Some types of files o New type of packer o Etc.  Pretty lame?