OpenSSL HeartBleed漏洞自动化检测工具设计与实现
2018-06-29陈希胡峻洁张亮严义兵雷敏
陈希 胡峻洁 张亮 严义兵 雷敏



摘 要:OpenSSL在实现心跳逻辑时,存在编码上的缺陷,导致了HeartBleed漏洞的发生。由于在没有正确执行边界检查的前提下,就执行memcpy( )函数调用受害用户输入内容作为长度参数,使得攻击者可以利用该漏洞远程读取存在漏洞版本的OpenSSL服务器内存中多达64KB的数据。论文文通过分析OpenSSL的工作原理,阐明了HeartBleed漏洞产生的根本原因;设计并实现自动化检测工具,判断服务器是否存在该漏洞,并在实际测试中被成功应用。
关键词:OpenSSL; HeartBleed漏洞; 自动化检测
中图分类号:TP312 文献标识码:A
Design and implementation of automated detection tool for openssl heartbleed vulnerability
Abstract: Heartbeat logic in OpenSSL has a code flaw, leading to the occurrence of HeartBleed vulnerability. The execution of the memcpy( ) function invokes the victim user input content as a length parameter without the proper execution of the boundary check, allowing the attacker to remotely read up to 64KB of data in the OpenSSL server memory where the vulnerability exists. This paper analyzes the principle of OpenSSL and clarifies the root cause of the HeartBleed vulnerability. On this basis, this paper designs and implements the automated detection tool which is successfully applied in the actual test to judge whether the server exists the vulnerability.
Key words: OpenSSL; heartbleed vulnerability; automated detection
1 引言
OpenSSL是一款功能齊全的安全套接字层密码库,其作用是为了实现网络通信的加密与认证功能。OpenSSL囊括了主要的密码算法、常用的密钥和证书封装管理功能以及SSL(Secure Sockets Layer,安全套接层)协议,并提供多样的应用程序供使用,保障了网络通信的安全。
2014年4月8日,OpenSSL 曝出一种名为HeartBleed (CVE ID:CVE-2014-0160)[1]的严重安全漏洞。该漏洞首先被Google研究员尼尔·梅塔(Neel Mehta)发现,起因是他可以从特定服务器上随机获取64KB的工作日志。利用该漏洞,黑客可直接对个人电脑发起“心脏出血”攻击,从存在漏洞版本的OpenSSL服务器内存中读取请求存储位置之外的多达64 KB的数据,这段内存数据可能包含用户名与密码、证书私钥、重要的商业文档等数据。OpenSSL所具有的强大功能使其被广泛应用于各大网银、在线支付、电商网站、门户网站、电子邮件等领域,因此HeartBleed漏洞势必引发巨大的网络灾难。目前,中国国家信息安全漏洞共享平台(CNVD)将该漏洞定级为“高危”[2]。……
