天天看點

Remote Debugging with IDA Pro

How to debug linux program on Windows ?

Lab setup

  • Windows: (IP: 192.168.1.105)
  • Linux: (IP: 192.168.1.103)

Windows (IDA Pro)

  • Install IDA Pro 6.8 on Windows.
  • Create a share folder linux in C:\PROGRA~1\IDA6.8
Remote Debugging with IDA Pro
  • copy linux_server from dbgsrv to C:\PROGRA~1\IDA6.8\linux

Linux

  • Mount windows share to locahost
  • copy the program called demo to /mnt/linux
cd /mnt/linux && chmod u+x linux_server && ./linux_server
           
  • Open file on windows, it will show as follow:
Remote Debugging with IDA Pro
Remote Debugging with IDA Pro
  • Open menu Debugger >> Remote Linux Debugger.
Remote Debugging with IDA Pro
Remote Debugging with IDA Pro

As you see, you can disassmble the prog code as follow:

int __cdecl main(int argc, const char **argv, const char **envp)
{
  int v3; // [email protected]

  v3 = add(, );
  printf("a + b = %d", v3);
  return v3;
}
           

References

https://www.hex-rays.com/products/ida/index.shtml

http://www.woodmann.com/TiGa/idaseries.html

https://www.hex-rays.com/products/ida/support/freefiles/remotedbg.pdf

繼續閱讀