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

IDA Share Folder

  • copy linux_server from dbgsrv to C:\PROGRA~1\IDA6.8\linux

Linux

  • Mount windows share to locahost
mount -t cifs //192.168.1.105/linux -o username=test,password=password /mnt/linux
  • 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:

IDA Pro opens linux demo file

IDA Pro debugs linux demo file

  • Open menu Debugger >> Remote Linux Debugger.

Remote Linux Debugger

Debugging

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

int __cdecl main(int argc, const char **argv, const char **envp)
{
  int v3; // ST10_4@1

  v3 = add(1, 2);
  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


版权声明:本文为u011130746原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。