Windows Server 2016/2019在Owin.dll上错误地返回Authenticode签名



Owin.dll,Nuget.org上Owin包内的程序集,没有Authenticode签名。但是,在Windows Server 2016和Windows Server 2019上,Get-AuthenticatedSignature(和sigcheck.exe(错误地报告Owin.dll不具有验证码签名。

如果您部署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.0libnet40Owin.dll | Format-List

在Windows Server 2019上,它返回带有指纹AE9C1AE54763822EEC42474983D8B635116C8452和时间戳证书指纹893ED0E4D032C3855D5D2296B2DE2DD1AFB897DD的签名证书。

在Windows Server 2016上,它返回指纹为E85459B23C232DB3CB94C7A56D4678F58E8E51E和时间戳证书指纹为CFC3E3018EA65666DCE484FC7016EB412F108A9的签名证书。

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

这是怎么回事?为什么这个特定程序集在这些特定版本的Windows中会以这种方式运行?

虽然签名不是Owin.dll本身的一部分,但Windows Server有一个"安全目录";(在%SystemRoot%System32CatRoot下(,其通过名称/散列来标识Owin.dll。安全目录由Microsoft签名,它是Get-AuthenticodeSignature返回的安全目录的签名证书。实际上,它只是一个";分离的";验证码签名,而不是嵌入在.dll.中

最新更新