Code Monkey home page Code Monkey logo

idapathfinder's Introduction

DESCRIPTION

	IDAPathFinder is a scriptable IDA plugin for identifying and graphing call paths between functions and code blocks.
	It can plot paths between one or many functions and generates interactive call graphs.

INSTALLATION

	To install IDAPathFinder, just run the included install.py script:

		$ python install.py /path/to/your/ida/install/directory

USAGE

	After installation, IDAPathFinder's graphing options will be listed in the IDA GUI under 'View -> Graphs'. 
	Please refer to the Wiki page [http://code.google.com/p/idapathfinder/wiki/idapathfinder?tm=6] for screen shots 
	and more detailed information.

SCRIPTING

	IDAPathFinder is fully scriptable, and can be easily integrated into other IDA scripts or plugins.

	The IDAPathFinder module works by first specifying a destination, then finding all paths between the destination and a source.
	Once these paths have been generated, IDAPathFinder can optionally be instructed to display a call graph of the results.

	There are two classes for finding paths: FunctionPathFinder (for finding function call paths) and BlockPathFinder (for
	finding call paths between code blocks inside a function). Both function identically from an API perspective.

	Let's start by finding all the paths between the 'main' function and the 'sprintf' function:

		import idc
		import pathfinder

		pf = pathfinder.FunctionPathFinder(idc.LocByName('sprintf'))
		results = pf.paths_from(idc.LocByName('main'))

	The address passed to FunctionPathFinder should be the address of the destination function.
	Likewise, if using BlockPathFinder, it should be the address of the beginning of the destination code block.

	The paths_from method returns a list of lists, containing all the unique paths found between 'main' and 'sprintf'. Each
	entry in each list is the effective address of a node in the path:

		results = [
				[51024, 107732, 203048],
				[51024, 124236, 203048],
				[51024, 124236, 159980, 203048]
		]

	Multiple results can be appended together if desired:

		results += pf.paths_from(idc.LocByName('foo'))
		results += pf.paths_from(idc.LocByName('bar'))

	Additional filters may be specified when calling the paths_from method as well. The following excludes any path that
	traverses the function 'foo':

		results = pf.paths_from(idc.LocByName('sprintf'), excludes=[idc.LocByName('foo')])

	Finally, if you wish to plot a graph of these results inside of IDA, you can use IDAPathFinder's PathFinderGraph class:

		pathfinder.PathFinderGraph(results, title='My graph').Show()
		

idapathfinder's People

Watchers

James Cloos 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.