检查电脑中是否存在危险证书

检查电脑中是否存在危险证书

原文:https://kompost.cn/posts/check-and-remove-untrusted-cert/

  1. 下载软件:https://learn.microsoft.com/zh-cn/sysinternals/downloads/sigcheck
  2. 分别运行两个命令:
  • sigcheck.exe -tv
  • sigcheck.exe -tuv

删除证书#

方法一:手动删除
打开 certlm.msc 和 certmgr.msc 里,在“受信任的根证书颁发机构”和“第三方根证书颁发机构”里找到对应的根证书,右键菜单删除。
方法二:使用以下 Powershell 脚本。(功能接口参考3)
脚本文件命名为 remove-rootca.ps1
在 Powershell 命令行窗口中执行 . .\remove-rootca.ps1 -Thumbprint 59973EC928CD924B5E4DC2ABAC727301ACCFDCAC 删除指定的根证书
系统存储中的证书需要在管理员权限下执行,否则提示拒绝访问

Copy
param( [string]$Thumbprint=$(throw "Parameter missing: -Thumbprint Thumbprint") ) $CAStores="cert:\currentuser\root", "cert:\currentuser\authroot", "cert:\localmachine\root", "cert:\localmachine\authroot" $exist = 0 foreach ($store in $CAStores) { $location = $store+"\"+$Thumbprint if(Test-Path -Path $location) { $exist = 1 Remove-Item -Path $location -Force } } if ($exist -eq 0) { Write-Host "Thumbprint does not exist." }
posted @   佰大于  阅读(245)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
CONTENTS
点击右上角即可分享
微信分享提示