IDA Pro 重命名导入

逆向工程 艾达 idapro插件 x64 idapro-sdk 我在
2021-06-19 22:41:26

此 PE 文件会破坏其导入地址表。但是,所有的函数地址都在这个_rdata段中:

rdata_segment

重命名这些函数的任何直接方法?

3个回答

在将进程的内存转储到磁盘之前,请使用像Scylla这样的工具来重建导入表。

西拉

在调试器中,选择导入表并运行idc\renimp.idc.

来自文件的最高评论:

/*
   Rename imports.

   This script renames entries of a dynamically built import table.
   For example, from a table like this:

      dd offset ntdll_NtPowerInformation
      dd offset ntdll_NtInitiatePowerAction
      dd offset ntdll_NtSetThreadExecutionState
      dd offset ntdll_NtRequestWakeupLatency
      dd offset ntdll_NtGetDevicePowerState
      dd offset ntdll_NtIsSystemResumeAutomatic
      dd offset ntdll_NtRequestDeviceWakeup
      dd offset ntdll_NtCancelDeviceWakeupRequest
      dd offset ntdll_RtlQueryRegistryValues


   it will create a table like this:

      NtPowerInformation dd offset ntdll_NtPowerInformation
      NtInitiatePowerAction dd offset ntdll_NtInitiatePowerAction
      NtSetThreadExecutionState dd offset ntdll_NtSetThreadExecutionState
      NtRequestWakeupLatency dd offset ntdll_NtRequestWakeupLatency
      NtGetDevicePowerState dd offset ntdll_NtGetDevicePowerState
      NtIsSystemResumeAutomatic dd offset ntdll_NtIsSystemResumeAutomatic
      NtRequestDeviceWakeup dd offset ntdll_NtRequestDeviceWakeup
      NtCancelDeviceWakeupRequest dd offset ntdll_NtCancelDeviceWakeupRequest
      RtlQueryRegistryValues dd offset ntdll_RtlQueryRegistryValues

   Usage: select the import table and run the script.

   Known problems: if the dll name contains an underscore, the function
   names might be incorrect. Special care is taken for the ws2_32.dll but
   other dlls will have wrong function names.

*/

您很可能正在使用进程转储。这些地址将取决于 Windows 版本和服务包。如果您有机会在 VM 中运行它,请尝试波动性。做一个procdump然后impscan。impscan 可以为您提供一个 idc,将这些地址重命名为它们各自的 API 名称。

即使使用非 PE 注入代码,此方法也能很好地工作。

https://github.com/volatilityfoundation/volatility/wiki/Command%20Reference%20Mal#impscan