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中间人攻击?如何防御? #32

Open
GGXXMM opened this issue Aug 11, 2019 · 0 comments
Open

HTTPS中间人攻击?如何防御? #32

GGXXMM opened this issue Aug 11, 2019 · 0 comments
Labels

Comments

@GGXXMM
Copy link
Owner

GGXXMM commented Aug 11, 2019

HTTPS中间人攻击

中间人攻击,是指攻击者与通信的两端分别建立独立的联系,并交换其所收到的数据,使通信的两端认为他们正在通过一个私密的连接与对方直接对话。
HTTPS也存在中间人攻击,其攻击的具体过程如下:
1、服务器向客户端发送公钥。
2、攻击者截获公钥,保留在自己手上。
3、然后攻击者自己生成一个【伪造的】公钥,发给客户端。
4、客户端收到伪造的公钥后,生成加密hash值发给服务器。
5、攻击者获得加密hash值,用自己的私钥解密获得真秘钥。
6、同时生成假的加密hash值,发给服务器。
7、服务器用私钥解密获得假秘钥。
8、服务器用假秘钥加密传输信息。

如何防御?

1、不要随意连入公共场合内的WiFi,或者使用未知代理服务器
2、不要安装不可信或突然出现的描述文件,信任伪造的证书;(如某12306,在正规渠道下载系统以及浏览器)
3、客户端需对服务器证书进行单独的对比校验,确认证书不是伪造的:

  • 查看证书是否过期
  • 服务器证书上的域名是否和服务器的实际域名相匹配
  • 校验证书链
  • 打包证书校验

参考:http://ju.outofmemory.cn/entry/327252

@GGXXMM GGXXMM added the 网络 label Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant