A software analysis framework built on Phoenix.  Matt Miller  Leviathan Security Group  Metasploit Framework  Uninformed Journal  Not a static analysis.

Slides:



Advertisements
Similar presentations
Network II.5 simulator ..
Advertisements

.NET Technology. Introduction Overview of.NET What.NET means for Developers, Users and Businesses Two.NET Research Projects:.NET Generics AsmL.
TSpaces Services Suite: Automating the Development and Management of Web Services Presenter: Kevin McCurley IBM Almaden Research Center Contact: Marcus.
Tahir Nawaz Introduction to.NET Framework. .NET – What Is It? Software platform Language neutral In other words:.NET is not a language (Runtime and a.
CIM2564 Introduction to Development Frameworks 1 Overview of a Development Framework Topic 1.
Technical Architectures
15 Chapter 15 Web Database Development Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
CS 501: Software Engineering Fall 2000 Lecture 16 System Architecture III Distributed Objects.
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Interpret Application Specifications
Outline Chapter 1 Hardware, Software, Programming, Web surfing, … Chapter Goals –Describe the layers of a computer system –Describe the concept.
Course Instructor: Aisha Azeem
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
1. 2 Chapter 1 Introduction to Computers, Programs, and Java.
An external perspective.  Matt Miller  Consultant with Leviathan Security Group  Core developer for the Metasploit Framework  Uninformed Journal editor.
Automatic Software Testing Tool for Computer Networks ARD Presentation Adi Shachar Yaniv Cohen Dudi Patimer
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 13 Slide 1 Application architectures.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
A First Program Using C#
Behavioral Patterns  Behavioral patterns are patterns whose purpose is to facilitate the work of algorithmic calculations and communication between classes.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Systems Analysis and Design in a Changing World, Fifth Edition
Central Online Grading System COGS Dec15-21 dec1521.sd.ece.iastate.edu.
Week 7 Lecture Web Database Development Samuel Conn, Asst. Professor
What is Architecture  Architecture is a subjective thing, a shared understanding of a system’s design by the expert developers on a project  In the.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
Designing For Testability. Incorporate design features that facilitate testing Include features to: –Support test automation at all levels (unit, integration,
RM2D Let’s write our FIRST basic SPIN program!. The Labs that follow in this Module are designed to teach the following; Turn an LED on – assigning I/O.
Lecture 1 Programming in C# Introducing C# Writing a C# Program.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Managed C++. Objectives Overview to Visual C++.NET Concepts and architecture Developing with Managed Extensions for C++ Use cases Managed C++, Visual.
April 30, 2007 openSUSE.org Build Service a short introduction Moiz Kohari VP Engineering.
DEV325 Deploying Visual Studio.NET Applications Billy Hollis Author / Consultant.
The Network Performance Advisor J. W. Ferguson NLANR/DAST & NCSA.
Chapter 14 Part II: Architectural Adaptation BY: AARON MCKAY.
Web Services Based on SOA: Concepts, Technology, Design by Thomas Erl MIS 181.9: Service Oriented Architecture 2 nd Semester,
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
Tool Integration with Data and Computation Grid GWE - “Grid Wizard Enterprise”
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
1 CMPT 275 High Level Design Phase Modularization.
CS 501: Software Engineering Fall 1999 Lecture 12 System Architecture III Distributed Objects.
Introduction to Compilers. Related Area Programming languages Machine architecture Language theory Algorithms Data structures Operating systems Software.
CS 127 Introduction to Computer Science. What is a computer?  “A machine that stores and manipulates information under the control of a changeable program”
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
Getting Started with.NET Getting Started with.NET/Lesson 1/Slide 1 of 31 Objectives In this lesson, you will learn to: *Identify the components of the.NET.
Tool Integration with Data and Computation Grid “Grid Wizard 2”
.NET Mobile Application Development XML Web Services.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
ISC321 Database Systems I Chapter 2: Overview of Database Languages and Architectures Fall 2015 Dr. Abdullah Almutairi.
System Architecture CS 560. Project Design The requirements describe the function of a system as seen by the client. The software team must design a system.
“This improved a lot since I started using Tango (three years ago) from scratch so I'm happy to see the efforts from the developers. Still there is room.
Databases and DBMSs Todd S. Bacastow January 2005.
.NET Omid Darroudi.
Modularity Most useful abstractions an OS wants to offer can’t be directly realized by hardware Modularity is one technique the OS uses to provide better.
CSE691 Software Models and Analysis.
File System Implementation
Designing For Testability
UI-Performance Optimization by Identifying its Bottlenecks
Distribution and components
The Client/Server Database Environment
CSCI/CMPE 3334 Systems Programming
Data, Databases, and DBMSs
Model-View-Controller Patterns and Frameworks
Fault Tolerance Distributed Web-based Systems
Lecture 1: Multi-tier Architecture Overview
Outcome of the Lecture Upon completion of this lecture you will be able to understand Fundamentals and Characteristics of Java Language Basic Terminology.
Presentation transcript:

A software analysis framework built on Phoenix

 Matt Miller  Leviathan Security Group  Metasploit Framework  Uninformed Journal  Not a static analysis expert

 Cthulhu software analysis framework  Very high-level architectural overview  Interesting features  Case study

 Software optimization and analysis  Basis for future Microsoft compilers and tools  Robust and extensible architecture ◦ Plugins ◦ Phases  Check out Richard Johnson’s talk to learn more

 RDK/SDK not yet completely solidified ◦ Encapsulation can help here  API is feature rich but verbose ◦ No simplified wrapper  No solution for large-scale analysis ◦ LTCG is not enough

 Software analysis framework  Hobby project started in June, 2006  Written in C#  Currently around 28KLOC

 Simplified Programming Interface ◦ Simple and extensible API ◦ Fundamental independence  Large-scale analysis ◦ Modeling behavior of large systems ◦ Pie in the sky: Windows Vista  Research Sandbox ◦ A playground for experimentation ◦ Phoenix can also be used directly for this purpose

Fundamentals Analysis Engine Peons Tools IDA Phoenix Control Flow Data Flow Rendering Analysis DB

Fundamentals Analysis Engine Peons Tools IDA Phoenix Control Flow Data Flow Rendering Analysis DB

 Uses a fundamental to load assemblies  Runs phases ◦ Import ◦ Analyze ◦ Render  Peons register to be notified on certain events

Analysis Engine Phoenix Fundamental 1. Load Assembly DB Importing Peons Control Flow Data Flow 2. Assembly Loaded 4. Normalize Information 3. Import Event 5. Import Event Basic Types

Analysis Engine Database Fundamental 1. Load Assembly DB Analyzing Peons Analyzing Peons Path Discovery Leak Check 3. Assembly Loaded 5. Normalize and Denormalize Information 4. Analysis Event 6. Analysis Event 2. Denormalize Assembly Information

Analysis Engine Rendering Peons Rendering Peons Console GUI 1. Render DB 2. Denormalize Output Store Output Store 3. Display

 Extensible and flexible way to represent binary information  May be used to support large-scale analysis ◦ Hundreds of modules ◦ More work needs to be done  Performance overhead is non-trivial ◦ Processing time can be high ◦ Volatile memory usage can be kept low

Simplified API Version-independent modeling Conceptual modeling

Assembly Module Data Type Method Module Data Type Method Module Data Type Method DB Abstract classes provide fundamental independence … … Concrete Implementations Phoenix

Modeling version independent relationships between software elements in the database void CallExitProcess() { ExitProcess(0); } CallExitProcess 1 ExitProcess ExitProcess 1 ExitProcess 2 ExitProcess 3 ExitProcess 4 Appropriate versions can be selected at analysis time Call to version independent kernel32!ExitProcess Distinct versions of kernel32!ExitProcess

Universe VPN Client VPN Server Device Driver User Interface Daemon vpn.sys vpngui.exe dialogs.dll daemon.exe

Finding inter-component data flow paths

 Web Services is a simple remoting interface ◦ Clients invoke methods hosted on a web server ◦ Server handles requests and provides responses  Problematic for static analysis ◦ Clients pass data to the server indirectly (network) ◦ Limits the scope at which analysis can be performed  Let’s walk through an example

[WebService] public class WebService { [WebMethod] public void ExecuteCommand(string command) { Process.Start(command); } Simple web service that invokes a process using the supplied command string

[WebServiceBinding] public class WebClient : SoapHttpClientProtocol { [SoapDocumentMethod] public void ExecuteCommand(string command) { Invoke("ExecuteCommand", new object[] { command ); } Simple web client that wraps the invocation of the web service method

 To illustrate a relationship, the client invocation and server method must be bridged  Bridging can take a few different forms ◦ Automatic detection of relationships ◦ Manual description of relationships  Bridging is an abstract concept though ◦ How do we make it concrete?

 A concrete relationship can be shown by linking formal parameters fin(ExecuteCommand, 0) WebClient WebService

Web Application Web Client WebClient.dll WebClient ExecuteCommand Enter Block fin(0) Web Service WebService.dll WebService ExecuteCommand Enter Block fin(0)

 Describing indirect relationships improves the quality of analysis information  Widens the scope for control flow and data flow analysis  The Path Discovery peon can help illustrate this

 Designed to find reachable flow paths ◦ From a set of sources ◦ To a set of sinks ◦ Within a set of target assemblies  Current restrictions ◦ Requires the database fundamental ◦ Only operates on data flow information

 Command Injection represents one type of security flaw found in managed applications  This can happen when user-controlled data is used in conjunction with launching a process  For example, data passing… ◦ From HttpRequest.get_QueryString ◦ To Process.Start  This should be easy to detect, right?

 Finding data flow paths from get_QueryString to Start can be problematic  Lowest level data flow information is conveyed with respect to instructions  What if hundreds of assemblies are being analyzed? ◦ Not enough physical memory!

 Path Discovery makes use of generalized data flow relationships ◦ Block-tier, method-tier, type-tier, etc…  Reachable paths are identified using a simple algorithm ◦ Progressive Qualified Elaboration (PQE)  PQE is designed to reduce the amount of analysis information that must be considered

Reachable paths are progressively found between source and sink flow descriptors within a set of target assemblies

TierInformation Component fout(Undefined) Assembly fout(System.Web) Data Type fout(System.Web.HttpRequest) Method fout(get_QueryString, 0) Basic Block fout(get_QueryString, 0) Instruction fout(get_QueryString, 0) TierInformation Component fin(Undefined) Assembly fin(System) Data Type fin(System.Dia…Process) Method fin(Start, 0) Basic Block fin(Start, 0) Instruction fin(Start, 0) Source flow descriptor Sink flow descriptor

 Suppose there is some code in the web client that does the following ◦ client.ExecuteCommand(request.QueryString[x]);  Bridging makes it possible to show a complete data flow path from get_QueryString to Start  Let’s see how we get there using PQE ◦ PQE starts from a macro-tier, such as the component tier

Data flow Def-Use relationships between components Interpretation: In at least one situation, v uses data defined by u

Data flow Def-Use relationships between assemblies

Data flow Def-Use relationships between data types

Data flow Def-Use relationships between methods

Data flow Def-Use relationships between blocks

Data flow Def-Use relationships between instructions

 A complete data flow path is identified  Data flows across an indirect boundary  Without bridging, it would not be possible to seamlessly perform this analysis ◦ This means the security issue would be missed  Note that the security issue exists in the web service independent of the web client ◦ Example was meant to show simple indirect data flow

 Import and analyze large data sets ◦ All PE modules from Windows Vista?  Improve database performance ◦ Optimization work has not started yet ◦ It is currently very slow  Implement additional peons ◦ Leak Check  And the list goes on…

 Phoenix is an exciting project  Software analysis is fun & challenging  Hopefully the database stuff pans out  Questions?