Saturday 17 September 2011

My WinDBG remote debugging trial on "Two Firewall" scenario

You can do remote debugging with WinDBG, basically use the following instructions(with the displaying order).

  • At debuggee side, run dbgsrv.exe –t tcp:port=1012,password=longjump
  • At debugger side, run windbg –premote tcp:port=1012,server=debuggee’s ip,password=longjump

Pretty easy, isn’t it? Well, you probably know the question I am going to ask, what about the situation when the debuggee is behind a firewall?

As a matter of fact, the debugger himself is generally behind the firewall as well. As a developer, you might be able to persuade your network administrator to modify the firewall settings for your debug purpose, but it’s simply not practical to ask your client to change his firewall, so the forwarded connection to the Debuggee is unfeasible.

MS documentation provides an example titled “Two Firewalls” which sounds exactly what I wanted. Actually there is a bit difference, it is about kernel debugging while I only wanted to debug the user mode application. Anyway, it has a backward connection between the repeater and the debuggee, it is called “smart client” in WinDBG. I decided to have a go. Please read my full story here.

No comments: