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
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
154 | FortiGate configure manage ip on CLI | 관리자 | 2016.03.16 | 16 |
153 | php + freetds for mssql on linux | 관리자 | 2016.02.24 | 17 |
152 | USE Method: Linux Performance Checklist | 관리자 | 2016.04.06 | 17 |
151 | mysql-5.7 Server Error Codes and Messages | 관리자 | 2016.04.06 | 19 |
150 | 알아두면 유용한 안드로이드 스튜디오의 단축키 | 관리자 | 2016.02.12 | 20 |
149 | Experiment: WordCamp Incubator | 관리자 | 2016.02.19 | 20 |
148 | firewalld 기반의 접근제어 사용하기 | 관리자 | 2016.03.15 | 21 |
147 | WordPress 4.5 RC2 | 관리자 | 2016.04.11 | 21 |
146 | install pptpd on linux (centos) | 관리자 | 2016.02.26 | 22 |
145 | jetpack 4.0 fatal error | 관리자 | 2016.04.22 | 22 |
144 | mysql-5.7 Client Error Codes and Messages | 관리자 | 2016.04.06 | 23 |
143 | Contributor Weekend: Global WordPress Translation Day | 관리자 | 2016.04.08 | 24 |
142 | can’t start httpd(apache-2.4) with ssl module | 관리자 | 2015.12.31 | 26 |
141 | 안드로이드 스튜디오 단축키 (공식) | 관리자 | 2016.02.12 | 28 |
140 | keepalive + LVS on centos7 | 관리자 | 2016.03.31 | 30 |