Advertisement
ShoLah0

Debian Lenny Bash update

Oct 27th, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. #first find out the version you have so you know what to get for the patches and source files
  2. dpkg-query -l|grep bash
  3. ii bash 4.1-3 The GNU Bourne Again SHell
  4.  
  5. #do this in the /usr/src dir
  6. cd /usr/src
  7. wget http://ftp.gnu.org/gnu/bash/bash-4.1.tar.gz
  8. tar zxvf bash-4.1.tar.gz
  9. cd bash-4.1
  10.  
  11. # fetch all patches, including latest ones that patches CVE-2014-6271
  12. for i in $(seq -f "%03g" 0 14); do
  13. wget -nv http://ftp.gnu.org/gnu/bash/bash-4.1-patches/bash41-$i
  14. patch -p0 < bash41-$i
  15. done
  16.  
  17. # check if yacc is installed. if not - install yacc
  18. apt-get install bison
  19.  
  20. # configure,compile and install bash (this will install bash into /usr/local/bin/bash)
  21. ./configure && make
  22. make install
  23.  
  24. # make a symlink from /bin/bash to the new binary
  25. mv /bin/bash /bin/bash.old
  26. ln -s /usr/local/bin/bash /bin/bash
  27.  
  28. # check that you're not vulnerable anymore wiith the output of the following
  29. # it should not output vulnerable word anymore
  30. env x='() { :;}; echo vulnerable' bash -c echo
  31.  
  32. #you can Delete the old one thats a problem
  33. rm /bin/bash.old
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement