J'ai recherché des informations en ligne et j'ai trouvé un script de vulnérabilité Bash Shell Repair Bash écrit par un maître. Je pensais que c'était très bien, alors je l'ai traîné dans mon blog pour le partager avec tout le monde.
Contenu du script:
La copie de code est la suivante:
# / bac / bash
#Author Alex Fang. Les mises à jour peuvent s'appliquer bientôt.
clair
Echo "Appuyez sur Anykey pour continuer ..." $ Anykey; Lisez n'importe quoi
echo "bbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaasssssssssssssssssshhhhhhhhhhhhhhhhhhh!"
Echo "ShellShockFixer V0.1 par Alex Fang. Liscence: GNU GPLV2"
echo "##########################################################################"
ECHO "Sélectionnez l'option:"
écho "1) centos"
Echo "2) Debian Wheezy"
Echo "3) Debian Squeeze x64 (fourni par Aliyun)"
Echo "4) Debian Squeeze x32 (fourni par Aliyun)"
Echo "5) Ubuntu"
Echo "6) OpenSUSE x64 (bêta, fourni par Aliyun)"
Echo "7) OpenSUSE x32 (Beta Aliyun)"
Echo "8) Aliyun Linux x64"
Echo "9) Aliyun Linux x32"
echo "0) iptables way"
Écho "11) Désactiver les bash temporellement à travers Chmod"
echo "##########################################################################"
lire x
si tester $ x -eq 1; alors
clair
Echo "Fixation ..."
miam nettoie tout
Yum makecache
Yum Update Bash
Echo "Finiy!"
ELIF Test $ x -eq 2; alors
clair
Echo "Fixer pour Debian Wheezy ..."
Mise à jour apt-get
APT-GET -Y INSTALLANCE - BASH DE LA MODIFICATION
Echo "Finiy!"
ELIF TEST $ X -EQ 3; alors
Echo "Fixation pour Debian Squeeze x64 ..."
wget http://mirrors.aliyun.com/debian/pool/main/b/bash/bash_4.1-3+deb6u2_amd64.deb && dpkg -i bash_4.1-3 + deb6u2_amd64.deb
Echo "Finiy!"
ELIF Test $ x -eq 4; alors
Echo "Fixation pour Debian Squeeze x32 ..."
wget http://mirrors.aliyun.com/debian/pool/main/b/bash/bash_4.1-3+deb6u2_i386.deb && dpkg -i bash_4.1-3 + deb6u2_i386.deb
Echo "Finiy!"
Test ELF $ x -eq 5; alors
Echo "Fixation pour Ubuntu ..."
Mise à jour apt-get
APT-GET -Y INSTALLANCE - BASH DE LA MODIFICATION
Echo "Finiy!"
ELIF Test $ x -eq 6; alors
Echo "Fixation pour OpenSUSE x64"
wget http://mirrors.aliyun.com/fix_stuff/bash-4.2-68.4.1.x86_64.rpm && rpm -UVH BASH-4.2-68.4.1.x86_64.rpm
Echo "Finiy!"
Test ELF $ x -eq 7; alors
Echo "Fixation pour OpenSUSE x32"
wget http://mirrors.aliyun.com/fix_stuff/bash-4.2-68.4.1.i586.rpm && rpm -uvh bash-4.2-68.4.1.i586.rpm
Echo "Finiy!"
Test ELF $ x -eq 8; alors
Echo "Fixation pour Aliyun Linux x64 ..."
wget http://mirrors.aliyun.com/centos/5/updates/x86_64/rpms/bash-3.2-33.el5_10.4.x86_64.rpm && rpm -UVH BASH-3.2-33.el5_10.4.x86_64.rpm
Echo "Finiy!"
Test ELF $ x -eq 9; alors
Echo "Fixation pour Aliyun Linux x32 ..."
wget http://mirrors.aliyun.com/centos/5/updates/i386/rpms/bash-3.2-33.el5_10.4.i386.rpm && rpm -UVH BASH-3.2-33.el5_10.4.i386.rpm
ELIF Test $ x -eq 0; alors
Echo "Déployer les règles iptables ..."
iptables --Apnd Input -M String --algo kMP - hex-string '| 28 29 20 7b |' - Drop
Iptables Using -M String - hex-String '| 28 29 20 7b |'
Echo "Finition ..."
ELIF TEST $ X -EQ 11; alors
Echo "Chmod Way Configuration ..."
chmod bœuf bash
Echo "Finition ..."
autre
Echo «opération non valide».
sortie
FI