2

My company is looking at implementing a new VPN solution, but require that the connection be maintained programatically by our software. The VPN solution consists of a background service that seems to manage the physical connection and a command line/GUI utilty that initiates the request to connect/disconnect. I am looking for a way to "spy" on the API calls between the front-end utilty and back-end service so that our software can make the same calls to the service. Are there any recommended software solutions or methods to do this?

4

4 回答 4

1

我不明白您为什么要替换该实用程序,而不是简单地从您的应用程序运行该实用程序。

无论如何,您可以运行“dumpbin /imports whatevertheutilitynameis .exe”来查看该实用程序链接到的 API 函数名称的静态列表;这不显示调用它们的顺序,也不显示参数值。

然后,您可以使用系统调试器(例如 Winice 或其他更现代的等价物)在这些 API 上设置断点,以便在实用程序调用这些 API 时中断调试器(然后可以检查参数值)。

于 2009-01-13T19:26:37.140 回答
1

您也许可以使用Spy++等工具收集一些信息来查看 Windows 消息。调试/跟踪工具(Windbg等)可以让您查看正在进行的 API 调用。Sysinternals工具可以在一定程度上向您显示系统信息的使用细节。

尽管我在很大程度上建议不要这样做——是否可以联系解决方案提供商并获取文档?其中一个原因是脆弱性——如果供应商不希望用户使用界面的这一方面,他们更有可能在不通知的情况下更改它。

于 2009-01-13T19:28:31.943 回答
1

Typically, communications between a front-end application and back-end service are done through some form of IPC (sockets, named pipes, etc.) or through custom messages sent through the Service Control Manager. You'll probably need to find out which method this solution uses, and work from there - though if it's encrypted communication over a socket, this could be difficult.

于 2009-01-13T19:20:27.623 回答
1

就像 Harper Shelby 所说,这可能非常困难,但是您可以从filemon开始,它可以告诉您某些进程何时创建或写入文件,regmon可以对注册表的写入和读取执行相同的操作,而wireshark可以监控网络交通。这可以为您提供一些数据,但即使有数据,也可能很难以允许您进行相同调用的方式进行解释。

于 2009-01-13T19:24:52.527 回答