1

Is it possible to call a function of a binary and obtain its result (without calling other functions), to isolate; are there any tools to do this?

3
  • Is the binary a dynamically-linked ELF?
    – julian
    Dec 1, 2019 at 1:08
  • Yes it's a dynamically-linked ELF @julian
    – jukebox
    Dec 1, 2019 at 10:54
  • Then you can use LIEF as mentioned below
    – julian
    Dec 1, 2019 at 11:02

1 Answer 1

3

You can use Ida's Appcall functionality:

Appcall is a mechanism to call functions inside the debugged program from the debugger or your script as if it were a built-in function. Such a mechanism can be used for debugging, fuzzing and testing applications. Appcall mechanism highly depends on the type information of the function to be called. For that reason it is necessary to have a correct function prototype before doing an Appcall, otherwise different or incorrect results may be returned.

If it's an elf and you don't have Ida, LIEF is a good option. You can see a tutorial to export an internal function and call it here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.