Windows 模块名称与其映像文件名不同
因此,在windbg上调试一个可执行文件后,我注意到模块名与映像名不同 在首次加载可执行文件并在入口点之前设置断点时,Windows 模块名称与其映像文件名不同,windows,windbg,portable-executable,Windows,Windbg,Portable Executable,因此,在windbg上调试一个可执行文件后,我注意到模块名与映像名不同 在首次加载可执行文件并在入口点之前设置断点时,lm vm/!对于每个_模块命令都显示了这一点 start end module name 00a30000 00a38000 Injection C (no symbols) Loaded symbol image file: C:\Users\user\Downloads\Bird.exe Image path:
lm vm
/!对于每个_模块
命令都显示了这一点
start end module name
00a30000 00a38000 Injection C (no symbols)
Loaded symbol image file: C:\Users\user\Downloads\Bird.exe
Image path: Injection.exe
Image name: Injection.exe
Browse all global symbols functions data
Timestamp: Mon May 24 22:30:53 2021 (60AC0CFD)
CheckSum: 00000000
ImageSize: 00008000
如上所示,图像名称
字段与加载的符号图像文件名称不对应
知道为什么吗?它是否与.pdb
文件路径有关
我在PE格式中找不到任何与此相关的信息
如何才能做到这一点呢?有人提到,这两种方法在文档中可能会有很大的不同 事实上!对于_,每个_模块都有两个命令字符串,一个是@#ModuleName,另一个是@#ImageName 我没怎么看,但有时我会看到像foo_1480xxx等的替代品 你是否有一个二进制文件显示了这种行为 编辑 只需浏览一下文件,就会在二进制文件中显示pdb文件的名称 是注射.pdb 编译后,可执行文件已重命名
F:\Latebird>ls
LateBird.exe
F:\Latebird>file LateBird.exe
LateBird.exe: PE32 executable (console) Intel 80386, for MS Windows
F:\Latebird>certutil -hashfile LateBird.exe sha1
943710a2a04caeae3ab21cc8be83ebc1d556e127
F:\Latebird>certutil -hashfile LateBird.exe md5
c8e3b7b9dc2541574335f9141e3ca4bf
F:\Latebird>dbh LateBird.exe
LateBird [1000000]: i
ModuleName : LateBird
ImageName : LateBird.exe
LoadedImageName : F:\Latebird\LateBird.exe
LoadedPdbName :
CVSig : 0x53445352
CVData : C:\Users\Dynamic\source\repos\Injection\Release\Injection.pdb
PdbAge : 0xa
PdbUnmatched : false
MachineType : I386
LateBird [1000000]:
为了再次确认,我编译了一个Messagebox,并在编译后将其重命名将其加载到windbg并检查lmvm 结果如下
ls -lg
total 17
-rwxr-xr-x 1 12800 LateBird.exe
-rw-r--r-- 1 165 LateBirdie.cpp
cat LateBirdie.cpp
#include <windows.h>
int WINAPI WinMain (_In_ HINSTANCE,_In_opt_ HINSTANCE,_In_ LPSTR,_In_ int ){
return MessageBoxA(NULL, "LateBirdie", "Early Birdie", 0);
}
cl /Zi /W4 /analyze /Od /nologo LateBirdie.cpp /link /release user32.lib /entry:WinMain
LateBirdie.cpp
file LateBirdie.exe
LateBirdie.exe: PE32+ executable (GUI) x86-64, for MS Windows
ren LateBirdie.exe EarlyBirdie.exe
cdb -c ".reload /f; lmvm *bird*;q" EarlyBirdie.exe | awk "/Reading/,/quit/"
0:000> cdb: Reading initial command '.reload /f; lmvm *bird*;q'
Reloading current modules
start end module name
00007ff6`87e50000 00007ff6`87e54000 LateBirdie F:\Latebird\LateBirdie.pdb
Loaded symbol image file: F:\Latebird\EarlyBirdie.exe
Image path: LateBirdie.exe
Image name: LateBirdie.exe
Timestamp: Tue Jun 1 02:56:35 2021 (60B5548B)
CheckSum: 0000FCA9
ImageSize: 00004000
Translations: 0000.04b0 0000.04e4 0409.04b0 0409.04e4
Information from resource tables:
quit:
ls-lg
总数17
-rwxr-xr-x 1 12800 LateBird.exe
-rw-r--r--1165 LateBirdie.cpp
猫拉特伯蒂
#包括
int WINAPI WinMain(_In_uHinstance,_In_opt_HINSTANCE,_In_LPSTR,_In_int){
返回MessageBoxA(NULL,“迟到的小鸟”,“早起的小鸟”,0);
}
cl/Zi/W4/analyze/Od/nologo LateBirdie.cpp/link/release user32.lib/entry:WinMain
LateBirdie.cpp
文件LateBirdie.exe
LateBirdie.exe:PE32+可执行文件(GUI)x86-64,适用于MS Windows
ren LateBirdie.exe EarlyBirdie.exe
cdb-c“.reload/f;lmvm*bird*;q“EarlyBirdie.exe | awk”/Reading/,/quit/”
0:000>cdb:读取初始命令'.reload/f;lmvm*鸟*;q'
重新加载电流模块
起始端模块名称
00007ff6`87e50000 00007ff6`87e54000晚鸟F:\Latebird\LateBirdie.pdb
加载的符号图像文件:F:\Latebird\EarlyBirdie.exe
图像路径:LateBirdie.exe
图像名称:LateBirdie.exe
时间戳:星期二6月1日02:56:35 2021(60B5548B)
校验和:0000FCA9
图像大小:00004000
翻译:0000.04b0 0000.04e4 0409.04b0 0409.04e4
资源表中的信息:
退出:
Yep,这里是二进制:(链接有效期为10天)顺便说一下,这是一个捕获标志挑战,因此您的AV可能会将其标记为恶意软件。