If the Linux server has a bash shell vulnerability, it may cause the remote attacker operating system to execute arbitrary commands, the threat level is higher, then how do we know whether the Linux system is The vulnerability exists, how to fix it? Let's take a look at it with Xiaobian.
Question: I want to know if my Linux server has a bash shelling vulnerability and how to protect my Linux server from shelling.
On September 24, 2014, a security researcher named Stefan · Shazella discovered a name called "Broken Shell" (Shellshock, also known as "Bash Gate" & rdquo; or & ldquo; Bash vulnerability & rdquo; bash vulnerability. If the vulnerability is penetrated, the remote attacker can execute any program code by outputting the function definition in a specially crafted environment before calling the shell. The code inside these functions can then be executed immediately when bash is called.
Note that the broken shell to bash vulnerabilities affect version 1.14 to 4.3 (the current version). Although there is no authoritative and complete fix for this vulnerability at the time of this writing, although major Linux distributions (Debian, Red Hat, CentOS, Ubuntu, and Novell/Suse) have been released to partially address patches related to this vulnerability. (CVE-2014-6271 and CVE-2014-7169), and it is recommended to update bash as soon as possible and check for updates within a few days (LCTT, you may have a complete solution when you see this article).
Detecting Shell Vulnerabilities
To check if there is a shelling vulnerability in your Linux system, enter the following command in the terminal.
$ env x=‘() { :;}; echo “Your bash version is vulnerable”& rsquo; bash -c “echo This is a test”
If your The Linux system has been exposed to the shelling vulnerability, and the command output will look like this:
Your bash version is vulnerableThis is a test
In the above command, an environment variable named x It has been set up for the user environment. As we have seen, it is not assigned (is a virtual function definition), followed by an arbitrary command (red), which will be executed before the bash call.
Applying a fix for a shell vulnerability
You can install a newly released bash patch as follows.
On Debian and its derivatives:
# aptitude update && aptitude safe-upgrade bash
On Red Hat-based distributions:
# yum update bash
before patch:
Debian:
CentOS:
after the patch:
Debian:
CentOS:
Note that before or after installing the patch, bash each version release did not change & mdash occur; & mdash; but you You can see that the patch has been installed by running the update command (it is likely to require confirmation before installation).
If for some reason you can't install the patch, or if the patch for your distribution has not yet been released, then it is recommended that you try another shell until the fix appears.
The above is the detection and repair method of bash shelling vulnerability in Linux system. Hurry to detect whether there is a bash shelling vulnerability in your system to prevent the server from being attacked.
If the Linux system crashes, the data inside will be lost. Serious damage to the database, learn how
The MAC address is the physical address of the network card, which users can modify. Today Xiaobian
I believe many people know what system files are, but few people know what the text stream is. In fa
In Linux systems, if the program in tomcat is unstable, tomcat will report an excep
How to install Linux using the pidstat command
Fedora system ifconfig and netstat command can not find a solution
How to configure dynamic IP service for Linux system
How to install Linux using dstat monitoring tool
Linux how to use the ss command to view the socket status
How to create and use XFS system in Linux system
What can I do if I can't access mysql under Linux?
Ubuntu wireless network card search can not find a solution
How to configure HTTP load balancing system
How to install boost library in Linux system
How to initialize the CentOS server
Linux/Ubuntu 11.10 How to build Android4.0.3 development environment
The screenshot function in Windows 8 tablet mode introduces
How to use the xp virtual machine that comes with WIN7
Steel ambition 4 how to make dumplings Steel ambition 4 dumplings method introduction
How to install and use Glances in Linux
Windows 7 IIS7.5 installation method and illustration tutorial
Windows 8 Gadgets help you get the new system done easily
Win10 registry how to quickly locate the same name by the right button
Win10 system can not save the picture after the screenshot solution