我想知道以下 PE 部分的每个部分都有哪些权限(windows):
.idata
.rsrc
.data
.text
.bss
.rdata
.edata
提前致谢,我无法使用谷歌找到答案。:)
我想知道以下 PE 部分的每个部分都有哪些权限(windows):
.idata
.rsrc
.data
.text
.bss
.rdata
.edata
提前致谢,我无法使用谷歌找到答案。:)
您可以使用 DUMPBIN 来检查部分权限。如果除了可执行文件名称之外没有其他参数运行它,它会显示可执行文件中的部分。
C:\> dumpbin ConsoleApplication1.exe
Microsoft (R) COFF/PE Dumper Version 14.10.24930.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file ConsoleApplication1.exe
File Type: EXECUTABLE IMAGE
Summary
1000 .data
1000 .rdata
1000 .reloc
1000 .rsrc
1000 .text
然后,检查特定部分:
C:\> dumpbin /SECTION:.text ConsoleApplication1.exe
Microsoft (R) COFF/PE Dumper Version 14.10.24930.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file ConsoleApplication1.exe
File Type: EXECUTABLE IMAGE
SECTION HEADER #1
.text name
C2F virtual size
1000 virtual address (00401000 to 00401C2E)
E00 size of raw data
400 file pointer to raw data (00000400 to 000011FF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
60000020 flags
Code
Execute Read <----
Summary
1000 .text
C:\Program Files\Microsoft Visual Studio 14.0>dumpbin c:\Windows\System32\calc.e
xe /headers | grep SECTION -A 14 | grep -A 3 flags
60000020 flags
Code
Execute Read
--
C0000040 flags
Initialized Data
Read Write
--
40000040 flags
Initialized Data
Read Only
--
42000040 flags
Initialized Data
Discardable
Read Only
C:\Program Files\Microsoft Visual Studio 14.0>