2

I am now trying to figure out the innards of a custom made program that I've found difficult to debug using a debugger.

The program starts by using a bash script wrapper to process input parameters, and then execute an encrypted perl script, which somehow starts another process which is a binary executable and cannot be started independently(even if I add all the parameters as seen using ps au when it is running normally, it still says some .so file is missing).

Now suppose one wants to debug this binary using something like IDA, how do you set it up? Take IDA as an example, in the "process option" I have used the bash wrapper in "App path", the binary as "input file path", and it turns out the debugger would not go into the binary's space, and just stays in the exceptions inside glibc library and none of the breakpoints set in the binary would be reached. (However the program was running fine, just that debugger cannot go inside.)

Any thoughts about what is happening and the right way of doing it?

2
  • 2
    "(even if I add all the parameters as seen using ps au when it is running normally, it still says some .so file is missing)" probably means the starter script messes around with LD_LIBRARY_PATH, LD_PRELOAD or something similar. The first thing i'd try to do is strace -f -s 9999 <bash_script> and maybe add -v execve to see the parameters and environment when the binary process gets started. Commented Dec 29, 2014 at 7:46
  • Thanks, this is quite helpful. It was indeed some LD_ related problem. Commented Jan 1, 2015 at 14:40

0

Your Answer

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