https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-0235
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-0235
파일명 : cve-2015-0235.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] = ' '; 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 -o check_ghost cve-2015-0235.c
./check_ghost
실행후
vulnerable : 취약점을 가지고 있으므로 패치가 필요
not vulnerable : 취약점이 패치되어 있음
물론 업데이트 이후 완전한 적용을 위해 리부팅을 진행해야함~
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
49 | PHP + redis(phpredis) 연동하기 | 위대한유저 | 2015.06.04 | 257 |
48 | REDIS-3.0.1 설치 하기 | 위대한유저 | 2015.06.04 | 394 |
47 | 리눅스에서 arp cache 삭제/초기화 하는 방법 | 위대한유저 | 2015.05.29 | 34004 |
46 | 윈도우에서 ARP CACHE 삭제/초기화 하는 방법 | 위대한유저 | 2015.05.29 | 2694 |
45 | XE 1.8.2까지의 버전에서 슬라이드 사용안함 속성이 반영 안되는 문제 | 위대한유저 | 2015.05.21 | 1754 |
44 | creative commons licenses | 위대한유저 | 2015.05.21 | 125 |
43 | installation documentation for Redmine 1.4.0 and higher | 위대한유저 | 2015.05.13 | 227 |
42 | POODLE SSLV3.0 취약점 해결을 위한 HTTPD 설정 (CVE-2014-3566) | 위대한유저 | 2015.05.13 | 340 |
41 | boot single mode in centos7 or rhel7 | 위대한유저 | 2015.05.07 | 206 |
40 | Creating default object from empty value in PHP5.4 | 위대한유저 | 2015.04.29 | 107 |
39 | TOMCAT + APACHE BY MOD_PROXY | 위대한유저 | 2015.04.28 | 483 |
38 | UBUNTU DESKTOP CHANGE RESOLUTION ON VIRTUALBOX | 위대한유저 | 2015.04.23 | 147 |
37 | PERMIT ROOT LOGIN AT UBUNTU | 위대한유저 | 2015.04.23 | 143 |
36 | Red Hat Enterprise Linux technology capabilities and limits | 위대한유저 | 2015.04.20 | 333 |
35 | net use 사용시 시스템 오류 58(이)가 생겼습니다. | 위대한유저 | 2015.04.08 | 6082 |