OpenSSL vulnerability remedies

Source: Internet
Author: User

CVE-2014-0160 vulnerability background

OpenSSL released a Security Bulletin on April 7, 2014, in OpenSSL1.0.1 there is a serious vulnerability (CVE-2014-0160 ). The OpenSSL Heartbleed module has a BUG. The problem lies in the heartbeat section in the ssl/dl_both.c file. When attackers construct a special data packet, if the user's heartbeat packet cannot provide enough data, the memcpy function will output the data recorded in SSLv3 directly, this vulnerability allows attackers to remotely read up to 64 KB of data in the memory of the OpenSSL server.

In the existing materials, domestic and foreign counterparts have already called this vulnerability a "broken down heart", "Destruction Level", and "most serious this year" vulnerability. As SSL is a mainstream security protocol for encrypted login authentication and network transaction, OpenSSL is a mainstream SSL platform. Therefore, we recommend that network service providers, management institutions, and users pay close attention to the vulnerability handling situation and hope that the majority of users can take corresponding countermeasures.

Distribution of affected versions of OpenSSL

According to the public information, the distribution of the vulnerability impact is as follows.

1. OpenSSL 1.0.1f (affected)

2. OpenSSL 1.0.2-beta (affected)

3. OpenSSL 1.0.1g (not affected)

4. OpenSSL 1.0.0 branch (not affected)

5. OpenSSL 0.9.8 branch (not affected)

The disposal suggestions are as follows:

3.1 What network administrators can do includes

In view of the severity of the vulnerability, if it is determined that the vulnerability exists, it is a better strategy to suspend the service for general network service providers.

If the vulnerability exists, and the service cannot be stopped, you can temporarily stop the https service and switch to the http service during vulnerability repair. However, this poses a risk of plaintext transmission of authentication information, make careful judgments and trade-offs on specific interests.

The specific repair method is as follows:

Upgrade OpenSSL to the latest version 1.0.1g

Regenerate your private key

Request and replace an SSL Certificate

You can also use the-DOPENSSL_NO_HEARTBEATS parameter to recompile a lower version of OpenSSL to disable the Heartbleed module. The latest version of the upgrade address is: https://www.openssl.org/source/. (OpenSSL official)

3.2 our solemn suggestions for common network users include

In view of the severity of this vulnerability, in the future 2 ~ If you do not log on within three days (January 1, April 9, 2014), it is a good response strategy (such as online shopping and online banking payment ).

If you have to perform operations, you can follow the changes to these websites and services.

Login from some mobile clients is an SSL encapsulation, so login from mobile phones is not secure.

Other security enterprise teams will announce the websites that are still problematic or have no problems. Please pay attention to them.

Analysis and Verification

Currently, the exploitation and verification scripts of this vulnerability are widely available. The addresses include.

Http: // fi ***** o. io/Heartbleed/(web test page)

Http: // s3. ***** guin.org/ssltest.py (python script)

Http: // **. * u u.com/s/1nt3BnVB (python script)

Although from the perspective of the security team, we are not suitable for spreading these addresses in plain text, we must remind users that almost all attackers already have relevant resources. In the past 24 hours, this vulnerability has been widely detected and tried. I believe that most websites with vulnerabilities have been attacked more than once.

In view of the severity of the vulnerability and the attack outbreak, we have to break the environment, test and verify the management,

In the first place, select a relatively "lightweight" website for direct verification to analyze the actual consequences of sensitive information. Through the existing testing methods in the network, we found several problematic websites for analysis. To avoid improper behavior, we did not select financial or transaction-related sites.

Problematic website address:

Ap *****. **** .gov.cn (test time)

My-***. in (test time)

Www. shu ****. cn (test time)

Git ***. com (test time)

Feng *****. com (test time)

The obtained information is as follows:

Figure 1 test website 1

After data is sent using the vulnerability exploitation tool, the returned data contains the Intranet IP address, path, and other information.

Figure 2 test website 2

After data is sent using the vulnerability exploitation tool, the returned data contains the APP information, cookie information, and user name information.

Figure 3 test website 3

After data is sent using the vulnerability exploitation tool, the returned data contains mobile phone numbers.

Figure 4 test website 4

After data is sent using the vulnerability exploitation tool, information such as the mailbox and password is displayed in the returned data.

Through the analysis and testing of the above websites, it is found that the vulnerability can indeed obtain memory content with sensitive information. For example, users' cookie information, Intranet IP address, user name, password, mobile phone number, and mailbox. If attackers exploit this vulnerability to attack network transactions, securities, banks, and other networks, they will obtain sensitive information such as user names, passwords, and bank accounts. Remind the website administrator and the user who uses the SSL protocol to connect to the website as soon as possible according to our suggestions.

Network Detection Methods

General Snort rule detection

As we all know that the SSL protocol is encrypted, we have not found a method to extract matching rules. We have attempted to write a detection rule based on the returned data size. We will continue to verify its validity, if you have any questions, please feel free to contact us.

Alert tcp $ EXTERNAL_NET any-> $ HOME_NET 443 (msg: "openssl Heartbleed attack"; flow: to_server, established; content: "| 18 03 |"; depth: 3; byte_test: 2,>, 200, 3, big; byte_test: 2, <, 16385, 3, big; threshold: type limit, track by_src, count 1, seconds 600; reference: cve, 2014-0160; classtype: bad-unknown; sid: 20140160; rev: 2 ;)

Snort rules: This vulnerability mainly targets SSL protocols. The value of \ x18 \ x03 is contained in the first four bytes of the heartbeat packet, while the value of the first and fourth bytes of the packet is converted to a value between 5th and 6th in the big tail mode, some alarm and filtering functions are provided later. logs are recorded every 10 minutes.

Behavior detection

From the perspective of public network administrators, you can detect network connections with multiple 443 ports from the same IP address in a short time. In this way, attackers or bots can scan a large area.

In addition, the attacker may determine whether to continuously obtain data, or detect the connection duration and the number of initial data.

Others

We are verifying whether the host trace and the method of collecting evidence are related to the attack.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.