.rdata和.idata段之间有什么区别?

Ada*_*der 20 windows reverse-engineering portable-executable

我在IDA注意到,我分析的PE文件不仅包括该.rdata部分,还包括.idata.有什么不同?

And*_* H. 41

总结典型的段名称:

.text: Code 
.data: Initialized data
.bss: Uninitialized data
.rdata: Const/read-only (and initialized) data
.edata: Export descriptors
.idata: Import descriptors
.reloc: Relocation table (for code instructions with absolute addressing when
          the module could not be loaded at its preferred base address)
.rsrc: Resources (icon, bitmap, dialog, ...)
.tls: __declspec(thread) data (Fails with dynamically loaded DLLs -> hard to find bugs)
Run Code Online (Sandbox Code Playgroud)

正如Martin Rosenau所提到的,细分名称只是典型的.真实的段类型在段标题中指定,或者通过使用段中存储的数据来定义.


Mar*_*nau 8

实际上,Windows会忽略段的名称.

有些链接器使用不同的段名称,甚至可以在".text"段中存储导入描述符,导出描述符,资源等,而不是使用单独的段.

但是,为这样的元数据创建单独的部分似乎更简单,因此大多数链接器将使用单独的部分.

这意味着:章节".idata",".rddd",".rsr",... 包含程序数据(尽管它们的名称以"data"结尾)但它们包含操作系统使用的元信息.例如,".rsrc"部分包含有关在资源管理器中查看可执行文件时显示的图标的信息.

".idata"包含有关程序所需的所有DLL文件的信息.