17
Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and Richard A. Kemmerer Department of Computer Science University of California, Santa Barbara Presenting : Majed Alhudaib

Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and

Embed Size (px)

Citation preview

Page 1: Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and

Behavior-based Spyware Detection

ByEngin Kirda and Christopher Kruegel

Secure Systems LabTechnical University Vienna

Greg Banks, Giovanni Vigna, and Richard A. KemmererDepartment of Computer Science

University of California, Santa Barbara

Presenting : Majed Alhudaib

Page 2: Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and

Introduction

• Spyware is growing.• In a study that I made on campus over 50 students I

found that:• 6 out of each 10 students encountered some sort of

spyware infect over the past three years.• Only 3 out of 50 know what a spyware is.• 20 asked for help removing what they call a “virus” and

we call spyware. • some blamed the manufacturer of their computers for

adding all these adds in the browser!!.

Page 3: Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and

Overview

• Current anti-Spyware detectors.• Behavior based spyware detection.• BHO’s, toolbars and COM.• Spyware characterization.• The Big picture.• Dynamic Analysis.• Static Analysis.• Evading Detection.• Evaluation.• Conclusion.

Page 4: Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and

Current anti-Spyware detectors

• Signature based mechanism.

Page 5: Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and

Behavior based spyware detection

• a new spyware detection technique that overcomes some of the limitations of existing anti-spyware approaches. This technique is based on an abstract characterization of the behavior of a popular class of spyware programs that relies on Internet Explorer’s Browser Helper Object (BHO) and toolbar interfaces to monitor a user’s browsing behavior.

• Why Internet Explorer’s BHO and toolbar?• How about other web browsers?

Page 6: Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and

BHO’s, toolbars and COM

• What are BHO’s and Toolbars?

• What is COM?

• How do they interact?

• How can spyware applications take advantage of all this?

Page 7: Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and

Spyware characterization

• we classify a browser helper object or a toolbar as spyware if the component, in response to browser events:

1. monitors user behavior by interacting with the web browser and

2. Invokes Windows API calls that can potentially leak information about this behavior (e.g., calls to save the data to a file or transmit information to a remote host).

Page 8: Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and

The Big picture

• Behavior based spyware detection consists of two major parts:

• 1- Dynamic analysis: exposes a suspicious component to crafted browser events (which simulate user activity) and analyzes the component’s response. In particular, we dynamically record both the browser COM functions and the Windows API functions that the component calls.

• 2- Static analysis: extracts the control flow graph of all code regions that are responsible for handling events.

Page 9: Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and

Dynamic Analysis

• The goal of the dynamic analysis step is two things:• First, it has to monitor the interaction of the

component with the browser and record all the browser’s COM functions that are invoked in response to events.

• Second, it has to determine the code regions that are responsible for handling events, thereby providing the necessary starting points for the static analysis step.

Page 10: Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and

Dynamic Analysis: Core elements

• “fake” WebBrowser COM object: which provides the component under analysis with an environment similar to the one that would be present when being hosted by an instance of Internet Explorer.

• COM object host application: which properly instantiates all involved components and sends the relevant browser events to the BHO or toolbar component under evaluation.

• A program that traces the execution of our host application to extract those code regions that handle the various browser events that are delivered.

Page 11: Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and

Dynamic Analysis: Locating event-handling code

• An instruction that handles an event is called “event-specific instruction”.

• How to get the first event-specific instruction?

Page 12: Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and

Dynamic Analysis: Locating event-handling code

• Example.

Page 13: Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and

Static Analysis

• first task: of the static analysis step is to disassemble the target binary and generate a control flow graph from the disassembled code. A control flow graph (CFG) is defined as a directed graph.

• Next task: Based on the CFG for the entire component, we isolate those parts of the graph that are responsible for handling events. In particular, we are interested in all sub-graphs of the CFG that contain the code to handle the different events. Using the event-specific addresses collected during dynamic analysis.

• Finally: the event specific lists are merged to obtain a list of all API calls that are invoked in response to events.

Page 14: Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and

Evading Detection

• How can a spyware bypass this kind of detection?

1- a spyware component could attempt to leak information using means other than API calls, or it could prevent the static analysis process from finding their invocations in the code of the BHO. How?

• 2- evasion venue is to craft the BHO code such that it can resist static analysis.

Page 15: Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and

Evaluation

• total of 51 samples (33 malicious and 18 benign); 34 of them were BHOs and 17 were toolbars.

Page 16: Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and

Conclusion

• This mechanism does need more work, thus, it definitely raises the bar for spyware writers.

• The potential is very high and the outcome could benefit in deferent malware types detection.

Page 17: Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and

Questions?

• Thank You