Verify digital signature within system32/drivers folder

做~自己de王妃 提交于 2019-12-13 18:17:52

问题


I've spent all night researching this without a solution.

I'm trying to verify the digital signature of a file in the drives folder (C:\Windows\System32\drivers*.sys) pick whatever one you want. I know that the code is correct because if you move the file from that folder to C:\ the test works.

WinVerifyTrust gives error 80092003 http://pastebin.com/nLR7rvZe

CryptQueryObject gives error 80092009 http://pastebin.com/45Ra6eL4

What's the deal?


回答1:


0x80092003 = CRYPT_E_FILE_ERROR = An error occurred while reading or writing to the file.

0x80092009 = CRYPT_E_NO_MATCH = No match when trying to find the object.

I'm guessing you're running on a 64-bit machine and WOW64 file system redirection is redirecting you to syswow64\drivers, which is empty. You can disable redirection with Wow64DisableWow64FsRedirection().




回答2:


if you right click and view properties of file can you see a digital signature? most likely your file is part of a catalogue and you need to use the catalogue API to extract the cert from cert DB and verify it.



来源:https://stackoverflow.com/questions/9339842/verify-digital-signature-within-system32-drivers-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!