GithubHelp home page GithubHelp logo

thespitefuloctopus / capa-explorer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ninewayhandshake/capa-explorer

0.0 0.0 0.0 903 KB

capa explorer for Cutter.

License: Apache License 2.0

Python 100.00%

capa-explorer's Introduction

capa-explorer

Capa explorer for Cutter.

The goal of this is to port the functionality of the capa IDA plugin to Cutter.

Features

  • Display capa results in an interactive tree view of rule matches and their locations in the current database
  • Search for keywords or phrases found in the Rule Information, Address, or Details columns
  • Display rule source content when a user hovers their cursor over a rule match
  • Double-click Address column to view associated feature in the Cutter Disassembly view
  • Limit tree view results to the function currently displayed in the Cutter Disassembly view; update results as a user navigates to different functions
  • Automatically update results when Cutter is used to rename a function
  • Select one or more checkboxes to highlight the associated addresses in the Cutter Disassembly view
  • Right-click a function match to rename it; the new function name is propagated to Cutter
  • Right-click to copy a result by column or by row
  • Sort results by column
  • Create flags and flagspaces from the loaded matches
  • Automatically rename functions with capa matches based on the detected capabilities

Installation

First locate the directory used by cutter for loading plugins.

The simplest way to do this is to open cutter and go to Edit menu -> Preferences -> Plugins. The directory you are looking for should be displayed at the top.

Inside that directory you should find a directory named python. Download or clone this repository, and move capa_explorer_plugin to the python directory.

Usage

Use capa standalone which can be downloaded here

https://github.com/mandiant/capa/releases

Issue the following command to create a JSON report of the binary.

capa.exe -j sample.exe > sample.exe.json

Open the binary in Cutter and and select "Load JSON file" in the drop down menu in the top right corner of the capa explorer widget to load the report.

Known limitations

  • The plugin currently uses r2's ecH command to highlight instructions, while this works the support seems limited in Cutter and at times it can be slow. Ideally BIHighlighter should be used but due to a bug this is currently not exposed in CutterCore. https://github.com/radareorg/cutter/issues/2395
  • The main difference between this plugin and the IDA version is that this plugin does not implement a feature extractor and relies on th JSON exports from the IDA plugin or the standalone tool. I have not looked into the possibility of implementing feature extraction with radare2. This may or may not be something I do in the future.
  • The plugin has been developed for Cutter version 1.12 and Ive experienced crashes with earlier versions so make sure to check the version you are running if you are experiencing issues.
  • This is my first attempt at a Cutter plugin so there are very likely bugs.
  • This plugin does not currently handle rebasing, thats on the todo list.

Other issues

If you encounter bugs or have suggestions which are not among the known limitations please create an issue, or even better, a pull request.

Credits

I want to thank Mandiant and the FLARE team for creating capa and making it available to everyone. Most of the code in this repo is taken directly from the official capa IDA plugin and and have received slight modifications to make it work in Cutter. The main goal was to make the user experice as close as possible to the original plugin.

https://github.com/mandiant/capa

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.