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 | Testing the Fastest Way to Import a Table into MySQL (and some interesting 5.7 performance results) | 관리자 | 2015.12.31 | 51 |
48 | $_SERVER[‘SERVER_SOFTWARE’]=’Apache’ in wp-config.php | 관리자 | 2016.06.24 | 50 |
47 | jsp 에서 사용자가 생성한 java class 호출 하기 | 관리자 | 2015.12.31 | 50 |
46 | 웹사이트 보안 개발 가이드 20160421 | 관리자 | 2017.07.25 | 49 |
45 | WordPress 4.8 Beta 1 | 관리자 | 2017.05.13 | 48 |
44 | install proftpd with account in sql | 관리자 | 2016.01.26 | 48 |
43 | Secure by Default in MySQL 5.7 | 관리자 | 2015.12.31 | 48 |
42 | Mozilla SSL Configuration Generator | 관리자 | 2016.10.15 | 47 |
41 | 최신 버전 XE에서 config.inc.php 호출 내용 변경 | 관리자 | 2015.12.31 | 47 |
40 | WordPress 4.6 “Pepper” | 관리자 | 2016.08.17 | 46 |
39 | Support for SATA and SAS disk drives with a size of 2TB or greater | 관리자 | 2017.07.07 | 45 |
38 | Changing Screen Size/Resolution of CentOS GUEST on VirtualBox | 관리자 | 2017.05.31 | 45 |
37 | WordPress 4.7.2 Security Release | 관리자 | 2017.01.27 | 44 |
36 | Apache Tomcat Versions – Which Do I Want? | 관리자 | 2016.06.24 | 44 |
35 | mod_rpaf on aws elb | 관리자 | 2016.06.17 | 43 |