gpt4 book ai didi

文件签名 : How do I make sure that a Windows DLL isn't modified?

转载 作者:行者123 更新时间:2023-12-04 14:45:17 31 4
gpt4 key购买 nike

我曾经问过一个问题here如果 Windows DLL 由 Microsoft 签名。我意识到它们是,一个好 friend 告诉我 SigCheck实用程序可以提供有关文件签名的信息;但还有一个问题:

虽然 SigCheck 会告诉我文件是否已签名,但我需要确保 Microsoft 签署了该文件并且之后没有其他人更改过它。我的意思是,如果有人篡改文件,然后再次对该文件签名(当然,签名上有 Microsoft 的名字)怎么办?

我怎样才能绝对确定该文件是真实的?

最佳答案

"I mean, what if someone tampers the file, and then signs the file again (with the name of Microsoft on the signature, of course)?"

由于数字签名的性质,这是不可能的。为生成数字签名,Microsoft 对文件进行哈希处理,然后使用他们的私钥(只有他们自己知道)对该哈希进行加密。据我了解,其他供应商将使用来自 other Certificate Authorities 的私钥Windows 默认配置为信任。

Windows 检查文件时,会使用相应的公钥解密签名。然后将该签名与当前签名进行比较。如果它们匹配,则该文件来自 Microsoft。如果它们不匹配,则文件已被篡改。

因此,让文件看起来像是被微软“签名”的唯一方法就是窃取他们的私钥。阅读 digital signature article on Wikipedia .

有关该过程实际如何工作的更多详细信息,请阅读 "Signing and Checking Code with Authenticode""Introduction to Code Signing"在 MSDN 上。

关于文件签名 : How do I make sure that a Windows DLL isn't modified?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/622147/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com