Coder Social home page Coder Social logo

Comments (13)

mr-tz avatar mr-tz commented on May 25, 2024

Does it fail to annotate all calls or just this one?
It appears that the plugin fails to identify the function call. Is there a cross-reference from the import table to the CreateFileA call?

from flare-ida.

confile avatar confile commented on May 25, 2024

It fails to annotate everything. But, I can see the additional segment called .msdn.

Is there a cross-reference from the import table to the CreateFileA call?

What do you mean by that?

I attached to files I checked.
reverseMe.exe.zip

from flare-ida.

confile avatar confile commented on May 25, 2024

Here is the IDA output I get

malware-windows_10_pro_x64

from flare-ida.

confile avatar confile commented on May 25, 2024

@mr-tz Do you have any idea how to solve this?

from flare-ida.

mr-tz avatar mr-tz commented on May 25, 2024

The sample calls the functions from the import address table via an intermediate thunk function. For example the call to CreateFileA is made via the function at offset 0x401283. The plugin does not currently support the annotation of function arguments for such calls.

from flare-ida.

confile avatar confile commented on May 25, 2024

Could you please add this to the plugin?

from flare-ida.

mr-tz avatar mr-tz commented on May 25, 2024

It shouldn't be too hard to add this feature, but I cannot promise a solution soon. We will keep this issue open to track it.

from flare-ida.

confile avatar confile commented on May 25, 2024

@mr-tz Could you give me some hint where to start, then I will try to add it and push a change?

from flare-ida.

mr-tz avatar mr-tz commented on May 25, 2024

Thanks, that would be great! One solution would be to add the respective call offsets to the library_calls dictionary.

from flare-ida.

confile avatar confile commented on May 25, 2024

Well, then you have to give some more details on what to do.

from flare-ida.

williballenthin avatar williballenthin commented on May 25, 2024

you need to update the implementation of the get_imports function called here: https://github.com/fireeye/flare-ida/blob/master/python/flare/IDB_MSDN_Annotator/__init__.py#L527

you should enumerate functions and detect when they are thunks to other imports, mark them as such, and find a way to update the library_calls dictionary, as @mr-tz suggested. if you have trouble following the information flow, try adding some calls to logging.debug(…) so you can see the data formats.

from flare-ida.

confile avatar confile commented on May 25, 2024

Any more hint which APIs are relevant here?

from flare-ida.

mr-tz avatar mr-tz commented on May 25, 2024

I would probably look at the following functions first:

  • idc.get_func_flags() using idc.FUNC_THUNK
  • idc.get_func_name()
  • idautils.Functions() might help as well

from flare-ida.

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.