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
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
34 | Moving Toward SSL | 관리자 | 2016.12.02 | 42 |
33 | WordPress 4.6 Release Candidate | 관리자 | 2016.07.28 | 42 |
32 | iptables port redirection | 관리자 | 2015.12.31 | 40 |
31 | WordPress 4.4 “Clifford” | 관리자 | 2015.12.31 | 40 |
30 | apache ab failed requests length | 관리자 | 2016.05.10 | 39 |
29 | WordPress 4.5.2 Security Release | 관리자 | 2016.05.07 | 39 |
28 | WordPress 4.5 “Coleman” | 관리자 | 2016.04.13 | 38 |
27 | log timestamp timezone in mysql-5.7 | 관리자 | 2016.05.12 | 37 |
26 | Recompiling VirtualBox kernel modules [FAILED] on centos7.2 or rhel7.2 | 관리자 | 2015.12.31 | 37 |
25 | WordPress 4.6 Beta 1 | 관리자 | 2016.06.30 | 36 |
24 | Optimizing NFS Performance | 관리자 | 2016.05.23 | 34 |
23 | MySQL Fetch Cursor 문 사용방법 | 관리자 | 2016.04.06 | 34 |
22 | /etc/sysconfig/iptables 에 포트 리다이렉션 추가해 주기 | 관리자 | 2016.03.25 | 34 |
21 | WordPress 4.6 Beta 3 | 관리자 | 2016.07.14 | 33 |
20 | 인터넷으로 서비스를 제공하기 위해 챙겨야 할 실용적인 보안 가이드 | 관리자 | 2016.05.24 | 33 |