< ページ移動: 1 2 >
CentOS 4.9bash 3.0-27.el4という環境。試しに以下のスクリプトを実行。# env x='() { :;}; echo vulnerable' bash -c "echo this is a test"vulnerablethis is a testecho vulnerable が実行されてしまってるんでアカン。
# wget --no-check-certificate https://ftp.gnu.org/gnu/bash/bash-3.0.16.tar.gz
# wget --no-check-certificate https://ftp.gnu.org/gnu/bash/bash-3.0-patches/bash30-017# wget --no-check-certificate https://ftp.gnu.org/gnu/bash/bash-3.0-patches/bash30-018# wget --no-check-certificate https://ftp.gnu.org/gnu/bash/bash-3.0-patches/bash30-019
# tar xfz bash-3.0.16.tar.gz# cd bash-3.0.16/# patch -p0 < ../bash30-017# patch -p0 < ../bash30-018# patch -p0 < ../bash30-019何のエラーも出ず、無事終了
# ./configure
# make# make installこれまた何のエラーも出さずサクっと終了。
# which bash/usr/local/bin/bash無事インストールされている。# /usr/local/bin/bash# env x='() { :;}; echo vulnerable' bash -c "echo this is a test"this is a testうむ。echo vulnerable が実行されない。バッチリ。
# /bin/bash# env x='() { :;}; echo vulnerable' bash -c "echo this is a test"this is a test