加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

Windows – 如何从32位WOW进程中的64位进程中枚举模块

发布时间:2020-12-13 20:26:36 所属栏目:Windows 来源:网络整理
导读:我需要在Windows中的32位WOW进程中检索64位进程的所有模块,EnumProcessModules将按照描述进行失败: If this function is called from a 32-bit application running on WOW64,it can only enumerate the modules of a 32-bit process. If the process is a
我需要在Windows中的32位WOW进程中检索64位进程的所有模块,EnumProcessModules将按照描述进行失败:

If this function is called from a 32-bit application running on WOW64,it can only enumerate the modules of a 32-bit process. If the process is a 64-bit process,this function fails and the last error code is ERROR_PARTIAL_COPY (299).

所以对于EnumProcessModulesEx和CreateToolhelp32Snapshot.

你有什么想法如何实现吗?

谢谢.

没有进入未记录的API,你不能这样做.一般来说,由于地址空间差异,从32位进程读取64位进程的内存将无法正常工作.

具有LIST_MODULES_32BIT和LIST_MODULES_64BIT过滤器标志的EnumProcessModulesEx有这样的说法:

This function is intended primarily for 64-bit applications. If the function is called by a 32-bit application running under WOW64,the dwFilterFlag option is ignored and the function provides the same results as the EnumProcessModules function.

您可以通过将程序转换为64位,使用不合格的64位COM服务器(特别是使用DLL surrogate)或与您进行通信的单独进程来实现.或者,根据您的进程相对于目标进程何时启动,您可以使用WMI获取模块加载事件.参见Win32_ModuleLoadTrace事件.

Process Explorer,一个32位的exe,可以显示32位和64位进程的模块,但它真的是冒烟和镜像:32位exe包含64位版本的本身,写入磁盘和在64位机器上执行.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读