不幸的是,检查微软自己的 DLL 的数字签名,无论它在理论上多么伟大,在实践中都是一个完全没有实际意义的问题。为什么?你会问。因为微软似乎并不关心签署大量他们自己的系统 DLL。
理论上,您可以使用此 C 代码的一个版本来检查可执行文件是否经过数字签名以及可执行文件是否完整/未更改,但如果您实现它并检查可能加载到您的进程中的所有系统 DLL,您将大失所望。
例如,从加载到我的进程中的大约 50 个系统 DLL 中,以下主要库没有签名!
视窗 8.1:
Failed: hr=0x800B0100 "C:\WINDOWS\SYSTEM32\MSIMG32.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\system32\COMDLG32.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\SYSTEM32\WINSPOOL.DRV"
Failed: hr=0x800B0100 "C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.18006_none_623f33d3ecbe86e8\COMCTL32.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\SYSTEM32\oledlg.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.9600.18592_none_933383bf47487fd6\gdiplus.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\SYSTEM32\dbghelp.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\system32\uxtheme.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\SYSTEM32\RICHED20.DLL"
Failed: hr=0x800B0100 "C:\WINDOWS\SYSTEM32\USP10.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\SYSTEM32\msls31.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\system32\msftedit.dll"
视窗 10:
Failed: hr=0x800B0100 "C:\WINDOWS\system32\apphelp.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\System32\COMDLG32.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\SYSTEM32\MSIMG32.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\SYSTEM32\WINSPOOL.DRV"
Failed: hr=0x800B0100 "C:\WINDOWS\SYSTEM32\oledlg.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.14393.953_none_7300116921188239\gdiplus.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\SYSTEM32\dbghelp.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\system32\uxtheme.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\SYSTEM32\RICHED20.DLL"
Failed: hr=0x800B0100 "C:\WINDOWS\SYSTEM32\msls31.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\SYSTEM32\USP10.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\system32\msftedit.dll"
Failed: hr=0x800B0100 "C:\WINDOWS\system32\dataexchange.dll"
如你所见,他们没有希望很快做到这一点。
所以是的....为你感到羞耻,微软!
PS。错误代码0x800B0100
="No signature was present in the subject."