百度360必应搜狗淘宝本站头条
当前位置:网站首页 > 技术文章 > 正文
安全漏洞 CVE-2015-7547 修复与测试

安全漏洞 CVE-2015-7547 修复与测试

  • 网站名称:安全漏洞 CVE-2015-7547 修复与测试
  • 网站分类:技术文章
  • 收录时间:2025-09-23 16:47
  • 网站地址:

进入网站

“安全漏洞 CVE-2015-7547 修复与测试” 网站介绍

前提:

  1. 这个bug在去年最初报出来是作为crash问题报的,当时没有深究背后的远程代码执行的可能性。后来Google的工程师偶然发现这个问题,深究后发现问题不是crash那么简单
    https://googleonlinesecurity.blogspot.com/2016/02/cve-2015-7547-glibc-getaddrinfo-stack.html

  2. The glibc DNS client side resolver is vulnerable to a stack-based buffer overflow when the getaddrinfo() library function is used. Software using this function may be exploited with attacker-controlled domain names, attacker-controlled DNS servers, or through a man-in-the-middle attack.

  3. 也就是说只要使用glibc的getaddrinfo()进行DNS查询,而查询结果是黑客能控制的,那么就可能会被攻击。控制查询结果,可以通过控制DNS服务器,或者中间人攻击,或者控制域名本身(因为查询结果就是域名的信息)让受害者去查询。

测试:

  1. https://github.com/fjserna/CVE-2015-7547

  2. 下载后 执行 python CVE-2015-7547-poc.py

  3. 编译 gcc CVE-2015-7547-client.c -o client 

  4. 执行 ./client 文件

    • 如果返回 段错误(Segmentation fault)  有漏洞

    • 如果返回 client: getaddrinfo: Name or service not known 漏洞已修复

修复:

  1. 升级 glibc 到 2.12-1.166.el6_7.7
    https://www.centos.org/forums/viewtopic.php?t=56467

  2. 执行命令 yum install glibc-2.12-1.166.el6_7.7

  3. 升级完成之后测试,测试截图