如何找出从编译的 c/c++ 中调用了哪些 Win API 函数动态链接库
我有一个已编译的 C/C++ Dll。
我想知道这个Dll调用了哪个外部API函数。
您知道有什么工具可以提供这些信息吗?
谢谢。
I have a compiled C/C++ Dll.
I would like to know which external API function is called by this Dll.
Do you know any tools which can provide these informations.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
您可以使用 Dependency Walker 查看 DLL 的 API 导入。当然,这并不能告诉您 DLL 是否进行动态加载或 COM 使用。
接下来,您可以使用更重的 logexts Windbg 的扩展,它将在运行时转储所有 API 调用。
You can use Dependency Walker to see API imports of a DLL. Of course that doesn't tell you if the DLL does dynamic loading, or COM usage.
Next to that you could use the much heavier logexts extension to windbg, which will dump all API calls at runtime.
将
dumpbin
实用程序与/imports
命令行选项结合使用。还有一个作为 GUI 的depends.exe
实用程序。请注意,这些不会告诉您有关使用
GetProcAddress
链接的函数,也不会告诉您通过 COM 访问的接口。Use the
dumpbin
utility with the/imports
command-line option. There's also adepends.exe
utility which as a GUI.Beware that these won't tell you about functions which you link to use
GetProcAddress
, nor about interfaces which you access via COM.Dependency Walker (depends.exe) 将是您的朋友。
Dependency Walker (depends.exe) will be your friend.
外部 API 是什么意思(您是否考虑将 WINAPI 作为外部 API?)。
如果 Windows API 不是外部 API,那么我们可以使用 DumpBin.exe 显示二进制文件中使用的所有外部 API。
如果您想查看可执行文件的依赖 dll/exe,则可以使用 Depend.exe。
What does mean by external API(are you considering WINAPI as an external API ?).
if windows API is not an external API then we can use to DumpBin.exe to display all external api used in the binary.
if you want to see the dependent dll/exe of an executable then you can use Depend.exe.
AFAIK,依赖遍历器仅显示直接调用的函数,而不显示通过函数指针调用的函数。如果您想要查找调用的所有 API,请记录对 GetProcAddress 的所有调用。
AFAIK, dependency walker only shows functions that are called directly, not the ones that are called via function pointers. If you want to find all the APIs that are called, log all the calls to GetProcAddress.
Ida Pro,普遍接受的反汇编程序。它有单独的导入和导出功能选项卡。它在逆向工程领域还有其他几种用途。
Ida Pro, The universally accepted disassembler. It has seperate tab for Import and Export Function.It has several other uses in the field of reverse engineering.