Shell Shock instalacja łatki: Różnice pomiędzy wersjami
Z ToProste
m |
m |
||
Linia 8: | Linia 8: | ||
to znaczy że masz problem! | to znaczy że masz problem! | ||
Niżej zamieszone są skrypty które załatają tę lukę. | 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: | ||
+ | <syntaxhighlight lang="text"> | ||
+ | bash: warning: x: ignoring function definition attempt | ||
+ | bash: błąd importu definicji funkcji dla `x' | ||
+ | this is a test | ||
+ | </syntaxhighlight> | ||
Wersja z 21:01, 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"