联系方式 /Contact

咨询热线:

0551-64287617

售后支持:

0551-64238225

传真:

0551-64390832

地址:

中国*安徽省合肥市高新区西二环与望江西路交口西南角亚夏汽车大厦20楼

官方微信 Official:

Linux glibc幽灵漏洞来袭 紧急修补方案

2015-1-29 | 阅7636
分享到:
来源:八度网络 [打印] [关闭]  

幽灵漏洞是Linux glibc库上出现的一个严重的安全问题,他可以让攻击者在不了解系统的任何情况下远程获取操作系统的控制权限。
目前他的CVE编号为CVE-2015-0235。更多关于漏洞介绍可百度查询,在这里就不作论述了,检查服务器是否存在漏洞操作办法如下:
CVE-2015-0235:Linux Glibc幽灵漏洞允许黑客远程获取系统权限测试漏洞是否存在:把下面的代码保存为gistfile1.c
————————————————复制以下代码—————————————————
#include <netdb.h>  
#include <stdio.h>  
#include <stdlib.h>  
#include <string.h>  
#include <errno.h>  
#define CANARY "in_the_coal_mine"  
struct {  
  char buffer[1024];  
  char canary[sizeof(CANARY)];  
} temp = { "buffer", CANARY };  
int main(void) {  
  struct hostent resbuf;  
  struct hostent *result;  
  int herrno;  
  int retval;  
  /*** strlen (name) = size_needed - sizeof (*host_addr) - sizeof (*h_addr_ptrs) - 1; ***/  
  size_t len = sizeof(temp.buffer) - 16*sizeof(unsigned char) - 2*sizeof(char *) - 1;  
  char name[sizeof(temp.buffer)];  
  memset(name, '0', len);  
  name[len] = '\0';  
  retval = gethostbyname_r(name, &resbuf, temp.buffer, sizeof(temp.buffer), &result, &herrno);  
  if (strcmp(temp.canary, CANARY) != 0) {  
puts("vulnerable");  
exit(EXIT_SUCCESS);  
  }  
  if (retval == ERANGE) {  
puts("not vulnerable");  
exit(EXIT_SUCCESS);  
  }  
  puts("should not happen");  
  exit(EXIT_FAILURE);  
}
 —————————————————————————————————————————
在服务器上执行: 
gcc gistfile1.c -o CVE-2015-0235 
./CVE-2015-0235 
如果提示:vulnerable 就说明存在漏洞。
修复方法:执行这些命令即可。
yum clean all 
yum makecache 
yum -y install glibc* 
如还有疑问或者未能解决的,请您尽快联系我司。
技术部技术电话:400-988-9998  8801 
技术专属QQ: 6214100
八度网络技术部
2015.01.29