Code Monkey home page Code Monkey logo

Comments (4)

CasualX avatar CasualX commented on August 25, 2024

Hello insanitybit,

Can you explain for what this function might be used for?

It seems to calculate some hash of all imported functions.

While this function can be implemented no problem using pelite, the python version has some problematic features (hardcoded list of extensions, hardcoded list of ordinals -> function names for some dlls, md5, lowercasing everything).

While these can be worked around, without knowing why one might use this function I don't feel I can make the right decision at the library level and feel it is better left over to the user of pelite to implement this feature.

from pelite.

CasualX avatar CasualX commented on August 25, 2024

I found this interesting article discussing get_imphash: https://www.fireeye.com/blog/threat-research/2014/01/tracking-malware-import-hashing.html

This seems like a very specific feature for a very specific use case which I don't think is appropriate for pelite (the library).

That said making it easy to calculate imphash (making sure pelite supports this use case in a straightforward way) and eg. providing an example that does exactly that seems like a good idea.

from pelite.

insanitybit avatar insanitybit commented on August 25, 2024

Cool, yeah I think that makes sense - it's definitely very specific, but the primitives for implementing it seems relevant to the crate.

A separate crate that actually provides the implementation would probably be more reasonable.

from pelite.

CasualX avatar CasualX commented on August 25, 2024

I've implemented a simplified version of this feature as an example.

Uses the default hasher and not trying to be fancy with imports.

> cargo run --example imphash -- C:\Windows\System32\msvcp140.dll
Import hash is 66182F54652495EE for "C:\\Windows\\System32\\msvcp140.dll".

from pelite.

Related Issues (20)

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.