https://www.52pojie.cn/thread-1023342-1-1.html
https://github.com/corkami/pics/blob/master/binary/README.md
https://blog.kowalczyk.info/articles/pefileformat.html
https://axcheron.github.io/pe-format-manipulation-with-pefile/
https://github.com/erocarrera/pefile
https://en.wikipedia.org/wiki/Portable_Executable
https://resources.infosecinstitute.com/topic/2-malware-researchers-handbook-demystifying-pe-file/
https://github.com/MicrosoftDocs/win32/blob/docs/desktop-src/Debug/pe-format.md
什么是可执行文件
dumpbin /headers calc.exe
可执行文件(executable file)指的是可以由操作系统加载的可执行文件。
可执行文件格式:
- windows:PE(portable exectable)文件结构
- windows pe 结构定义在 WINNT.h 中,image format
- linux:ELF(executable and link format)
使用领域:
- 病毒&反病毒
- 外挂&反外挂
- 加壳&脱壳
- 无源码修改功能&汉化
- Hot Patching
DOS&PE头
dos:5A 4D
PE: 45 50
dos 头中0x003c 的数据就是pe头在文件中的偏移 .
比如下面:0x003c 位置的数据为 0x0108 , 0x0108 就是45 50 pe 头
pe文件结构
运行前后的差异
节表
40字节