简体   繁体   English

丢失SSL证书的后果

[英]Consequences of losing SSL Certificate

I was designing a system where there is a chance of losing the SSL certificate to the attacker. 我在设计一个系统,在这个系统中可能会丢失SSL证书给攻击者。

But I am not clear that if the certificate is compromised which all attacks are possible? 但是我不清楚,如果证书受到威胁,则可能进行所有攻击?

  1. Man in the middle attack 中间人袭击
  2. Impersonated attack 冒充攻击

I want to continue to use SSL certificates to encrypt the communication channel (ie prevent man in the middle attack) 我想继续使用SSL证书来加密通信通道(即,防止中间人攻击)

For authentication I want to send data to predefined end points asynchronously depending on the querying user (Very similar to how we get email notification when we or the attacker tries to reset our login credential) 对于身份验证,我想根据查询用户将数据异步发送到预定义的端点(非常类似于当我们或攻击者尝试重置登录凭据时如何获取电子邮件通知)

This is coming from How can a process authenticate and communicate securely with another process on the same host 这来自一个进程如何与同一主机上的另一个进程进行身份验证和安全通信

Presumably, you're not talking only about losing the certificate, but having its private key compromised. 大概,您并不是在谈论丢失证书,而是在泄露其私钥。

In this case, someone in possession of the private key could perform a MITM attack, provided that they're also in a position to do so. 在这种情况下,拥有私钥的人可以执行MITM攻击,前提是他们也可以这样做。

I'll clarify my question, does using the same public and private key pair by user and the attacker lead to generation of same symmetric key every time or the key pair is used to generate a random symmetric key for every communication channel, in which case man in the middle attack is prevented 我将澄清我的问题,用户和攻击者每次使用相同的公钥和私钥对是否会导致每次生成相同的对称密钥,或者密钥对用于为每个通信通道生成随机的对称密钥,在这种情况下男子在中间攻击被阻止

Random symmetric keys are generated for every connection (unless SSL/TLS sessions are re-used, but that's more about optimisation, distinct clients or connections done after a certain period of time will have distinct symmetric keys). 将为每个连接生成随机的对称密钥(除非重新使用SSL / TLS会话,但这更多是关于优化,特定客户端或在一定时间后完成的连接将具有不同的对称密钥)。 Having new symmetric keys every time certainly doesn't prevent MITM attacks on its own, since the negotiation of new symmetric keys is authenticated with the certificate: that's what prevents MITM attacks. 每次拥有新的对称密钥当然不能单独防止MITM攻击,因为新的对称密钥的协商已通过证书进行了身份验证:这就是防止MITM攻击的原因。

If you're really worried about your private key being copied from your machine, you could use an HSM module (Java supports PKCS#11). 如果您真的担心要从计算机上复制私钥,则可以使用HSM模块(Java支持PKCS#11)。

This being said, since you seem to assume that there can be someone in a position to perform a MITM attack on your machine, using a communication between two processes on the same machine, it sounds like you're assuming your machine is compromised. 话虽如此,由于您似乎假设可以使用同一台计算机上的两个进程之间的通信来使某人能够对您的计算机执行MITM攻击,因此听起来您好像在假设您的计算机已受到威胁。 In this case, your chances of success in using SSL/TLS to protect whatever you're trying to protect are limited. 在这种情况下,成功使用SSL / TLS保护您要保护的内容的机会有限。 It sounds like there's a bigger problem with the general approach. 听起来,通用方法存在更大的问题。

I'll clarify my question, does using the same public and private key pair by user and the attacker lead to generation of same symmetric key every time or the key pair is used to generate a random symmetric key for every communication channel, in which case man in the middle attack is prevented 我将澄清我的问题,用户和攻击者每次使用相同的公钥和私钥对是否会导致每次生成相同的对称密钥,或者密钥对用于为每个通信通道生成随机的对称密钥,在这种情况下男子在中间攻击被阻止

New symmetric keys are generated for every SSL session, based on random numbers chosen by both the client and the server. 根据客户端和服务器选择的随机数,为每个SSL会话生成新的对称密钥。 (There are actually several different symmetric keys used in one TLS session, for different cryptographic services, and in each direction of communication.) (实际上,一个TLS会话中使用了几种不同的对称密钥,分别用于不同的加密服务以及每个通信方向。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM