Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

介绍下 HTTPS 中间人攻击 #45

Open
hanyueqiang opened this issue Jan 6, 2021 · 0 comments
Open

介绍下 HTTPS 中间人攻击 #45

hanyueqiang opened this issue Jan 6, 2021 · 0 comments

Comments

@hanyueqiang
Copy link
Owner

https协议由 http + ssl 协议构成

中间人攻击过程如下:

  • 服务器向客户端发送公钥。
  • 攻击者截获公钥,保留在自己手上。
  • 然后攻击者自己生成一个【伪造的】公钥,发给客户端。
  • 客户端收到伪造的公钥后,生成加密hash值发给服务器。
  • 攻击者获得加密hash值,用自己的私钥解密获得真秘钥。
  • 同时生成假的加密hash值,发给服务器。
  • 服务器用私钥解密获得假秘钥。
  • 服务器用加秘钥加密传输信息
    防范方法:

服务端在发送浏览器的公钥中加入CA证书,浏览器可以验证CA证书的有效性

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant