The OpenSSL Heart Bleed vulnerability has been confusing for the past two days. Please read this article to analyze and diagnose the OpenSSL Heartbleed Bug. Currently, we can see that the versions that can exploit this vulnerability are:
OpenSSL 1.0.1 through 1.0.1f (aggressive) are vulnerable
OpenSSL 1.0.1g is NOT vulnerable
OpenSSL 1.0.0 branch is NOT vulnerable
OpenSSL 0.9.8 branch is NOT vulnerable
Run the following command on the self-managed Server:
[root
@server
~]# openssl version
OpenSSL1.
0
.1e-fips 11Feb2013
Obviously, there is a vulnerability on my server, so I downloaded a script: Python script to detect the OpenSSL Heart Bleed vulnerability and test it:
liang
@liang
:~/golang$ python ssltest.py
Enter a host: www.xxxx.com
Testing www.xxxx.com... vulnerable.
This vulnerability indicates that the website can be exploited.
Fortunately, Centos provides the upgrade package to solve this problem:
[root
@server
~]# yum -y install openssl
[root
@server
~]# openssl version -a
OpenSSL1.
0
.1e-fips 11Feb2013
built on:TueApr802:
39
:
29
UTC
2014
platform: linux-x86_64
options: bn(
64
,
64
) md2(
int
) rc4(16x,
int
) des(idx,cisc,
16
,
int
) idea(
int
) blowfish(idx)
compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DKRB5_MIT -m64 -DL_ENDIAN -DTERMIO -Wall-O2 -g -pipe -Wall-Wp,-D_FORTIFY_SOURCE=
2
-fexceptions -fstack-protector --param=ssp-buffer-size=
4
-m64 -mtune=generic -Wa,--noexecstack -DPURIFY -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
OPENSSLDIR:
"/etc/pki/tls"
engines: dynamic
[root
@server
~]# reboot
Install yum-y install openssl first, and then output the openssl version and built date. If the built date is before Apr 8 and 2014, there is a problem. The above shows that the openssl version has been updated, no heartbleed vulnerability exists.
The last step is to restart the server and use the script to detect the problem:
liang
@liang
:~/golang$ python ssltest.py
Enter a host: www.xxxx.com
Testing www.xxxx.com... not vulnerable.
It has been fixed.