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?
1 Answer
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