Skip to content

Best way to use Kaiju/FN2Hash to match between two programs? #31

Description

@MattMills

Is your feature request related to a problem? Please describe.
I currently use fn2hash/kaiju to reconcile functions/symbols between a version of an application that doesn't have any symbols, and a version that has debug symbols. As these are slightly different versions compiled on the same OS with the same compiler, it is highly successful.

However, what I don't see within Kaiju is how to "import" or resolve the existing list of fn2hashes against a second application in a useful way. Currently I use a self-built postgres database to match fn2hashes across multiple versions, as my primary use case was resolving symbols from an unlabeled stack trace (it has export symbols + an offset, and my web app resolves the offset into the actual address and then the relevant symbol via fn2hash or some other custom code).

Describe the solution you'd like
fn2hash identifies many of the useful functions, it seems like all it needs is a mechanism to apply fn2hash.csv from one program and all the symbols (and probably other ghidra stuffs would be useful, like creating functions where they don't exist) onto a second program, or perhaps being able to keep a database of multiple fn2hash sets from different programs and being able to match them during the analysis process.

Describe alternatives you've considered
I've considered writing a python script to apply the symbol data naively using just the address of known function matches, but I figured their may be better solutions, so I thought I'd bring it up here and see if it sparked any interest or suggestions.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions