====== v2.1.12 bash 脆弱性の確認 ====== [[http://d.hatena.ne.jp/Kango/20140925/1411612246|bashの脆弱性(CVE-2014-6271) #ShellShock の関連リンクをまとめてみた - piyolog]] から引用させていただいてます。 ===== 脆弱性検証コード 簡易チェック ===== 以下のコマンドを実行して「vulnerable」が表示された場合、CVE-2014-6271の影響を受ける可能性があります。 $ env x='() { :;}; echo vulnerable' bash -c "echo this is a test" \\ ==== コマンドが実行できた場合(脆弱性あり)に表示される内容 ==== vulnerable this is a test \\ ==== パッチ適用後に表示される内容 ==== bash: warning: x: ignoring function definition attempt bash: error importing function definition for `x' this is a test \\ ==== v2.1.10 での確認 ==== user1@plum:~$ cat /etc/version MA-E3xx firmware version 2.1.10 (Wed Sep 17 09:32:31 JST 2014) user1@plum:~$ env x='() { :;}; echo vulnerable' bash -c "echo this is a test" vulnerable this is a test user1@plum:~$ **脆弱性あり** \\ ==== v2.1.12 での確認 ==== user1@plum:~$ cat /etc/version MA-E3xx firmware version 2.1.12 (Fri Sep 26 10:59:35 JST 2014) user1@plum:~$ env x='() { :;}; echo vulnerable' bash -c "echo this is a test" bash: warning: x: ignoring function definition attempt bash: error importing function definition for `x' this is a test user1@plum:~$ \\ ==== v2.2.0rc1 での確認 ==== user1@plum:~$ cat /etc/version MA-E3xx firmware version 2.2.0rc1 (Fri Sep 26 11:45:43 JST 2014) user1@plum:~$ env x='() { :;}; echo vulnerable' bash -c "echo this is a test" bash: warning: x: ignoring function definition attempt bash: error importing function definition for `x' this is a test user1@plum:~$