Self-diagnosis and repair of "shell-breaking vulnerabilities"

Source: Internet
Author: User

Self-diagnosis and repair of "shell-breaking vulnerabilities"

Self-diagnosis and repair of [Shell Cracking vulnerabilities] a Bash vulnerability, also known as a "Shell Cracking Vulnerability", can cause remote attackers to execute arbitrary code on the affected system, multiple System services can be affected: Web, ssh, gitlab, DHCP, and so on. The famous vulnerability CVE database issued two vulnerability numbers: CVE-2014-6271 and CVE-2014-7169 this is caused by the incomplete patches of the Bash official "CVE-2014-7169" vulnerability that was fixed for the first time by being bypassed (that is, the CVE-2014-7169 ). The methods for diagnosing and testing the two vulnerabilities are as follows:

CVE-2014-6271 vulnerability diagnosis test:

Open the terminal and enter env x = '() {:;}; echo vulnerable 'bash-C' echo hello'. Then, run the following command:

[Root @ localhost ~] # Env x = '() {:;}; echo vulnerable 'bash-C' echo hello'

Vulnerable

Hello

Indicates that the vulnerability exists. if:

[Root @ localhost ~] # Env x = '() {:;}; echo vulnerable 'bash-C' echo hello'

Bash: warning: x: ignoring function definition attempt

Bash: error importing function definition for 'X'

 

Hello

 

It indicates that the CVE-2014-6271 vulnerability has been fixed.

CVE-2014-7169 vulnerability diagnosis test:

Open the terminal and enter rm./echo; env X = '() {(a) => \ 'bash-C' echo date'; cat echo and run the following command:

[Root @ localhost ~] # Rm./echo; env X = '() {(a) => \ 'bash-C' echo date'; cat echo

Bash: X: line 1: syntax error near unexpected token '='

Bash: X: line 1 :''

Bash: error importing function definition for 'X'

Fri Sep 26 12:03:35 CST 2014

Successful real date results indicate that the CVE-2014-7169 vulnerability exists.

Currently, most of the operating systems have been deployed to fix these 2 vulnerabilities, but then some did not upgrade in time, especially for Patch bypass CVE-2014-7169 vulnerabilities.

Upgrade Method:

Ubuntu/Debian: apt-get upgrade

 

RedHat/CentOS/Fedora: yum update-y bash

We recommend that you restart the instance after the upgrade and perform the diagnosis again. Currently, the tested OS results are as follows: [for test time and source update problems, see your diagnosis results.]

OS CVE-2014-6271 CVE-2014-7169

Ubuntu repair

CentOS repair unrepaired

Unrepaired by Debian

Redhat repair and repair

 

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.