Giter VIP home page Giter VIP logo

lighthouse's Introduction

Lighthouse - Code Coverage Explorer for IDA Pro

Lighthouse Plugin

Overview

Lighthouse is a Code Coverage Plugin for IDA Pro. The plugin leverages IDA as a platform to map, explore, and visualize externally collected code coverage data when symbols or source may not be available for a given binary.

There are no bells or whistles. This plugin is labeled only as a prototype and code example for the community.

Special thanks to @0vercl0k for the inspiration.

Releases

  • v0.1 -- Initial release

Installation

Install Lighthouse into the IDA plugins folder.

  • Copy the contents of the plugin folder to the IDA plugins folder
    • On Windows, the folder is at C:\Program Files (x86)\IDA 6.8\plugins
    • On MacOS, the folder is at /Applications/IDA\ Pro\ 6.8/idaq.app/Contents/MacOS/plugins
    • On Linux, the folder may be at /opt/IDA/plugins/

The plugin has only been tested on IDA Pro 6.8, 6.95 for Windows.

Usage

Lighthouse loads automatically when an IDB is opened, installing the following menu entries into the IDA interface:

- File --> Load file --> Code Coverage File(s)...
- View --> Open subviews --> Coverage Overview

These are the entry points for a user to load and view coverage data.

Coverage Overview

The Coverage Overview is a dockable widget that provides a function level view of the active coverage data for the database.

Lighthouse Coverage Overview

This table can be sorted by column, and entries can be double clicked to jump to their corresponding disassembly.

Coverage Painting

Lighthouse 'paints' the active coverage data across the three major IDA views as applicable. Specifically, the Disassembly, Graph, and Pseudocode views.

Lighthouse Coverage Painting

Collecting Coverage

At this time, Lighthouse only consumes binary coverage data as produced by DynamoRIO's drcov code coverage module.

Collecting blackbox coverage data with drcov is relatively straightforward. The following example demonstrates how coverage was produced for the boombox.exe testcase provided in this repository.

..\DynamoRIO-Windows-7.0.0-RC1\bin64\drrun.exe -t drcov -- boombox.exe

This command will produce a .log file consisting of the coverage data upon termination of the target application.

Other Coverage Sources

drcov was selected as the initial coverage data source due to its availability, adoption, multi-platform (Win/Mac/Linux), and multi-architecture (x86/AMD64/ARM) support.

Intel's PIN for example does not come with a default code coverage pintool. It appears that most implement their own solution and there is no clear format for Lighthouse to standardize on. In the future, Lighthouse may ship with its own pintool.

While Lighthouse is considered a prototype, internally it is largely agnostic of its data source. Future work will allow one to drop a loader into the parsers folder without any need for code changes to Lighthouse. Right now, this is not the case.

Future Work

Time and motivation permitting, future work may include:

  • Multi file/coverage support
  • Profiling based heatmaps/painting
  • Automatic parser pickup
  • Parsers for additional coverage sources, eg PIN
  • Improved Pseudocode painting

Authors

lighthouse's People

Contributors

gaasedelen avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.