从.sys文件中提取证书

4

请问是否可以通过命令行从sys驱动文件中提取数字签名证书?

可以使用第三方工具或内置的Windows工具吗?

谢谢。

1个回答

7

使用PowerShell非常简单:

$driverFile = 'C:\temp\myDriver.sys';
$outputFile = 'C:\temp\output.cer';
$exportType = [System.Security.Cryptography.X509Certificates.X509ContentType]::Cert;

$cert = (Get-AuthenticodeSignature $driverFile).SignerCertificate;
[System.IO.File]::WriteAllBytes($outputFile, $cert.Export($exportType));

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接