【问题标题】:Windows Server 2016/2019 incorrectly return Authenticode signature on Owin.dllWindows Server 2016/2019 在 Owin.dll 上错误地返回 Authenticode 签名
【发布时间】:2021-08-22 01:09:32
【问题描述】:

Owin package on Nuget.org 中的程序集 Owin.dll 没有 Authenticode 签名。但是,在 Windows Server 2016 和 Windows Server 2019 上,Get-AuthenticodeSignature(和 sigcheck.exe)错误地报告 Owin.dll 确实具有 Authenticode 签名。

如果您部署 Windows Server VM 并运行此代码,它将返回不同的签名和时间戳证书(我只在 Azure 中这样做过):


> [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
> Invoke-WebRequest "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -OutFile NuGet.exe
> .\NuGet.exe install owin -o .
> Get-AuthenticodeSignature .\Owin.1.0\lib\net40\Owin.dll | Format-List

在 Windows Server 2019 上,它返回带有指纹 AE9C1AE54763822EEC42474983D8B635116C8452 和 TimestamperCertificate Thumbprint 893ED0E4D032C3855D5D2296B2DE2DD1AFB897DD 的 SignerCertificate。

在 Windows Server 2016 上,它返回带有指纹 E85459B23C232DB3CB94C7A56D47678F58E8E51E 和 TimestamperCertificate Thumbprint CFC3E3018EA65666DCE484FC7016EB42D1F108A9 的 SignerCertificate。

其他证书元数据表明这些实际上是来自 Microsoft 的证书。

这里发生了什么?为什么这个特定的程序集在这些特定版本的 Windows 中会以这种方式运行?

【问题讨论】:

    标签: windows owin windows-server authenticode


    【解决方案1】:

    虽然签名不是 Owin.dll 本身的一部分,但 Windows Server 有一个“安全目录”(在 %SystemRoot%\System32\CatRoot 下),它通过名称/哈希标识 Owin.dll。安全目录由 Microsoft 签名,它是由 Get-AuthenticodeSignature 返回的安全目录的签名证书。实际上,它只是一个“分离”的 Authenticode 签名,而不是嵌入到 .dll 中。

    【讨论】:

    • 这是正确的。谢谢! Get-AuthenticodeSignature 文档提示了这一点:If the file is both embedded signed and Windows catalog signed, the Windows catalog signature is used.
    猜你喜欢
    • 2021-10-20
    • 2021-07-04
    • 1970-01-01
    • 2020-03-31
    • 2018-02-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-08-14
    相关资源
    最近更新 更多