Jei forume lankaisi pirmą kartą, kviečiame registruotis ir prisijungti prie diskusijų.
PrisijungtiRegistruotisJei forume lankaisi pirmą kartą, kviečiame registruotis ir prisijungti prie diskusijų.
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
Jei rezultatas:yum update bash -y
apt-get update; apt-get install bash
echo "deb http://http.debian.net/debian/ squeeze-lts main contrib non-free" >> /etc/apt/sources.list
apt-get update; apt-get install bash
echo "deb http://archive.debian.org/debian/ lenny main non-free contrib" >> /etc/apt/sources.list
#!/bin/bash
apt-get update; apt-get install build-essential gettext bison
wget http://ftp.gnu.org/gnu/bash/bash-3.2.tar.gz
tar zxvf bash-3.2.tar.gz
cd bash-3.2
for i in $(seq -f "%03g" 1 54); do
wget -nv http://ftp.gnu.org/gnu/bash/bash-3.2-patches/bash32-$i
patch -p0 < bash32-$i
done
./configure && make
make install
if [ -e /usr/local/bin/bash ]; then
mv /bin/bash /bin/bash.old
ln -s /usr/local/bin/bash /bin/bash
fi
rpm -Uvh http://public-yum.oracle.com/repo/EnterpriseLinux/EL4/latest/i386/getPackage/bash-3.0-27.0.3.el4.i386.rpm
Komentarai
Debian 6. Po atnaujinimo komandos (rašo, kad nereikia atnaujinti) vistiek rašo vulnerable. Kur bėda?
Centos 4 galima pasinaudoti Oracle rpm paketu:
http://public-yum.oracle.com/repo/EnterpriseLinux/EL
4/latest/i386/getPackage/bash-3.0-27.0.1.e14.i386.rpm - transfer fai
led - Unknown or unexpected error "
Nuorodą pataisėme.
Err http://ubuntu-archive.mirror.serveriai.lt raring/main amd64 Packages
404 Not Found
Err http://ubuntu-archive.mirror.serveriai.lt raring/restricted amd64 Packages
404 Not Found
....
pakeiciaum repozitorijas:
https://forumas.dedikuoti.lt/showthread.php?t=568&highlight=raring%2Fmain
update:
apt-get update
suinstaliuojam patch compileri:
apt-get install patch
suinstaliuojam installeri
apt-get install build-essential
ir ivykdom sia seka:
mkdir src
cd src
wget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz
#download all patches
for i in $(seq -f "%03g" 0 25); do wget
http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-$i
; donetar zxvf bash-4.3.tar.gz
cd bash-4.3
#apply all patches
for i in $(seq -f "%03g" 0 25);do patch -p0 < ../bash43-$i; done
#build and install
./configure && make && make install
cd ..
cd ..
rm -r src
rezultatas ivykdzius test komanda:
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
this is a test
Kaip suprantu rezultatas geras?
Taip, reiškia bash pažeidžiamumo nėra.
Nepavyksta atnaujinti Debian 6 bash:
root@server:~# uname -a
Linux server 2.6.32-042stab092.3 #1 SMP Sun Jul 20 13:27:24 MSK 2014 i686 GNU/Linux
root@server:~# echo "deb http://http.debian.net/debian/ squeeze-lts main contrib non-free" >> /etc/apt/sources.list
root@server:~# apt-get update
Hit http://security.debian.org squeeze/updates Release.gpg
Ign http://security.debian.org/ squeeze/updates/main Translation-en
Hit http://ftp.debian.org squeeze Release.gpg
Ign http://ftp.debian.org/debian/ squeeze/main Translation-en
Hit http://http.debian.net squeeze-lts Release.gpg
Ign http://http.debian.net/debian/ squeeze-lts/contrib Translation-en
Ign http://http.debian.net/debian/ squeeze-lts/main Translation-en
Ign http://http.debian.net/debian/ squeeze-lts/non-free Translation-en
Hit http://security.debian.org squeeze/updates Release
Hit http://ftp.debian.org squeeze Release
Hit http://security.debian.org squeeze/updates/main Sources
Hit http://http.debian.net squeeze-lts Release
Hit http://ftp.debian.org squeeze/main Sources
Hit http://security.debian.org squeeze/updates/main i386 Packages
Hit http://ftp.debian.org squeeze/main i386 Packages
Hit http://http.debian.net squeeze-lts/main i386 Packages/DiffIndex
Hit http://http.debian.net squeeze-lts/contrib i386 Packages
Hit http://http.debian.net squeeze-lts/non-free i386 Packages
Reading package lists... Done
root@server:~# apt-get install bash
Reading package lists... Done
Building dependency tree
Reading state information... Done
bash is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 66 not upgraded.
root@server:~# env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
vulnerable
this is a test
ką daryti?
root@server:~# echo "deb http://ftp.us.debian.org/debian squeeze-lts main non-free contrib" >> /etc/apt/sources.list
root@server:~# apt-get update; apt-get install bash
Hit http://ftp.debian.org squeeze Release.gpg
Ign http://ftp.debian.org/debian/ squeeze/main Translation-en
Hit http://http.debian.net squeeze-lts Release.gpg
Ign http://http.debian.net/debian/ squeeze-lts/contrib Translation-en
Ign http://http.debian.net/debian/ squeeze-lts/main Translation-en
Ign http://http.debian.net/debian/ squeeze-lts/non-free Translation-en
Hit http://security.debian.org squeeze/updates Release.gpg
Ign http://security.debian.org/ squeeze/updates/main Translation-en
Hit http://ftp.debian.org squeeze Release
Hit http://security.debian.org squeeze/updates Release
Hit http://http.debian.net squeeze-lts Release
Hit http://ftp.debian.org squeeze/main Sources
Hit http://security.debian.org squeeze/updates/main Sources
Hit http://security.debian.org squeeze/updates/main i386 Packages
Hit http://ftp.debian.org squeeze/main i386 Packages
Hit http://http.debian.net squeeze-lts/main i386 Packages/DiffIndex
Get:1 http://ftp.us.debian.org squeeze-lts Release.gpg [836 B]
Ign http://ftp.us.debian.org/debian/ squeeze-lts/contrib Translation-en
Ign http://ftp.us.debian.org/debian/ squeeze-lts/main Translation-en
Ign http://ftp.us.debian.org/debian/ squeeze-lts/non-free Translation-en
Hit http://http.debian.net squeeze-lts/contrib i386 Packages
Hit http://http.debian.net squeeze-lts/non-free i386 Packages
Get:2 http://ftp.us.debian.org squeeze-lts Release [28.7 kB]
Get:3 http://ftp.us.debian.org squeeze-lts/main i386 Packages [77.1 kB]
Get:4 http://ftp.us.debian.org squeeze-lts/non-free i386 Packages [14 B]
Get:5 http://ftp.us.debian.org squeeze-lts/contrib i386 Packages [14 B]
Fetched 107 kB in 1s (91.2 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
bash is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 66 not upgraded.
root@server:~# env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
vulnerable
this is a test
Jūsų atveju bash paketą reikia perkompiliuoti.