Shell Shock instalacja łatki: Różnice pomiędzy wersjami

Z ToProste
Skocz do: nawigacji, wyszukiwania
m
m (Zabezpieczył Shell Shock instalacja łatki ([edit=sysop] (na zawsze) [move=sysop] (na zawsze)))
(Brak różnic)

Wersja z 21:45, 25 wrz 2014

Używasz Linuxa? Sprawdź czy Twój bash jest odporny na Shell Shock. Wydaj w konsoli następujące polecenie:

env x='() { :;}; echo vulnerable' bash -c "echo this is a test"

jeśli wynikiem jest:

vulnerable
this is a test

to znaczy że masz problem! Niżej zamieszone są skrypty które załatają tę lukę.

Po załataniu basha prawidłowa reakcja na ww. polecenie powinna wyglądać tak:

bash: warning: x: ignoring function definition attempt
bash: błąd importu definicji funkcji dla `x'
this is a test


Patch dla Debian 6

# check to ensure vulnerable
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
# make sure you are on debian 6
cat /etc/issue
 
# add the LTS sec repo
echo "#LTS security" >> /etc/apt/sources.list
echo "deb http://http.debian.net/debian/ squeeze-lts main contrib non-free" >> /etc/apt/sources.list
echo "deb-src http://http.debian.net/debian/ squeeze-lts main contrib non-free" >> /etc/apt/sources.list
 
# update and install patched bash
apt-get update
apt-get install bash
 
# run a new shell
bash
# check patch success
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"


Patch dla Debian 7

# check to ensure vulnerable
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
# make sure you are on debian 7
cat /etc/issue
 
# update and install patched bash
apt-get update
apt-get install bash
 
# run a new shell
bash
# check patch success
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"


Patch dla Centos 6/7

# check vulnerability
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
 
yum -y install bash
or 
yum -y update
 
# check patch success
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"