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
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
124 | WordPress 4.4 “Clifford” | 관리자 | 2015.12.31 | 40 |
123 | iptables port redirection | 관리자 | 2015.12.31 | 40 |
122 | WordPress 4.6 Release Candidate | 관리자 | 2016.07.28 | 42 |
121 | Moving Toward SSL | 관리자 | 2016.12.02 | 42 |
120 | mod_rpaf on aws elb | 관리자 | 2016.06.17 | 43 |
119 | Apache Tomcat Versions – Which Do I Want? | 관리자 | 2016.06.24 | 44 |
118 | WordPress 4.7.2 Security Release | 관리자 | 2017.01.27 | 45 |
117 | Changing Screen Size/Resolution of CentOS GUEST on VirtualBox | 관리자 | 2017.05.31 | 45 |
116 | Support for SATA and SAS disk drives with a size of 2TB or greater | 관리자 | 2017.07.07 | 45 |
115 | WordPress 4.6 “Pepper” | 관리자 | 2016.08.17 | 46 |
114 | 최신 버전 XE에서 config.inc.php 호출 내용 변경 | 관리자 | 2015.12.31 | 47 |
113 | Mozilla SSL Configuration Generator | 관리자 | 2016.10.15 | 47 |
112 | Secure by Default in MySQL 5.7 | 관리자 | 2015.12.31 | 48 |
111 | install proftpd with account in sql | 관리자 | 2016.01.26 | 48 |
110 | WordPress 4.8 Beta 1 | 관리자 | 2017.05.13 | 48 |