系统相关
首页 > 系统相关> > 在Linux中不信任中间CA?

在Linux中不信任中间CA?

作者:互联网

this blog起.

Intermediate CAs are certificates signed by a root CA that can sign arbitrary certificates for any websites.

They are just as powerful as root CAs, but there’s no full list of the ones your system trusts, because root CAs can make new ones at will, and your system will trust them at first sight. There are THOUSANDS logged in CT.

This month an interesting one popped up, generated apparently in September 2015: “Blue Coat Public Services Intermediate CA”, signed by Symantec. (No certificates signed by this CA have reached the CT logs or Censys so far.)

I thought it would be a good occasion to write up how to explicitly untrust an intermediate CA that would otherwise be trusted in OS X. It won’t stop the root CA from handing a new intermediate to the same organization, but better than nothing.

当我在Ubuntu中尝试博客中的步骤时,我下载了这个证书https://crt.sh/?id=19538258.当我打开.crt时,它会导入到Gnome Keyring中,但是在导入后我无法找到“untrust”证书的方法.

解决方法:

只是为了让事情变得困难,Linux拥有多个用于处理证书的库.

如果您使用的是Mozilla的NSS,则可以使用certutil的-t trustargs选项主动不信任(他们的术语)证书:

$certutil -d <path to directory containing database> -M -t p -n "Blue Coat Public Services Intermediate CA"

对于Firefox,<包含数据库的目录的路径>通常是〜/ .mozilla / firefox /< ???> .profile其中< ???>是一些随机看的字符. (certutil例如在ubuntu的libnss3-tools包中)

细目如下:

-M修改数据库

-t p将信任设置为“禁止”

-n对指定证书执行操作

即使在NSS中,并非所有应用程序共享同一个数据库;所以你可能不得不重复这个过程.例如,要对Chrome执行相同操作,请更改-d< path>到-d sql:.pki / nssdb /.

$certutil -d sql:.pki/nssdb/ -M -t p -n "Blue Coat Public Services Intermediate CA"

但是,并非所有应用程序都使用NSS,因此这不是一个完整的解决方案.例如,我不相信使用OpenSSL库可以做到这一点.

因此,使用OpenSSL提供其证书链构建(TLS,IPSec等)的任何应用程序都会信任具有Blue Coat证书的链,并且除了删除从其签署的根CA之外,您无法做任何事情.您的信任主机商店(考虑到它是一个赛门铁路根CA,因为您最终不信任互联网的一半,这将是愚蠢的),而依赖NSS的应用程序可以更精细地配置为不信任任何具有Blue Coat证书的链.

例如,我相信OpenVPN使用OpenSSL作为证书库,因此如果您连接到使用OpenVPN的商业VPN提供商,大哥可能会在您不知情的情况下收听您的OpenVPN流量.如果您真的关心这一点,那么请检查您的商业VPN提供商的根CA是谁 – 如果是Symantec / Verisign,那么可能是时候抛弃他们了?

请注意,SSH不使用X509证书,因此您可以使用SSH连接和隧道,而无需担心Blue Coat MITM攻击.

标签:linux,ssl,openssl,nss,certificates
来源: https://codeday.me/bug/20190808/1625512.html