<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Think &#38; Create &#187; Linux</title>
	<atom:link href="https://blog.thinkreatesoft.net/tag/linux/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.thinkreatesoft.net</link>
	<description>～ 想像と創造をあなたに ～</description>
	<lastBuildDate>Thu, 30 Jul 2015 13:25:56 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<atom:link rel='hub' href='https://blog.thinkreatesoft.net/?pushpress=hub'/>
	<item>
		<title>bash の脆弱性「ShellShock」</title>
		<link>https://blog.thinkreatesoft.net/information-technology/security/bash-securityhole-shellshock.html</link>
		<comments>https://blog.thinkreatesoft.net/information-technology/security/bash-securityhole-shellshock.html#comments</comments>
		<pubDate>Sat, 27 Sep 2014 11:35:32 +0000</pubDate>
		<dc:creator><![CDATA[Asterism]]></dc:creator>
				<category><![CDATA[セキュリティ]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.thinkreatesoft.net/?p=260</guid>
		<description><![CDATA[　こんにちは。 当サイト管理人のAsterismです。 　Unix系OS（LinuxやMac OS X)でShellShockと呼ばれる脆弱性が騒がれております。 WindowsXPサポート終了後、Linuxをインストー [&#8230;]]]></description>
				<content:encoded><![CDATA[<section>
<p>
　こんにちは。<br />
当サイト管理人のAsterismです。
</p>
<p>
　<i>Unix系OS</i>（<i>Linux</i>や<i>Mac OS X</i>)で<strong>ShellShock</strong>と呼ばれる脆弱性が騒がれております。<br />
<i>WindowsXP</i>サポート終了後、<i>Linux</i>をインストールした人も多いと思われます。
</p>
<p>
　私もテスト用に<i>Linux</i>の一つである<i>Ubuntu 14.04 LTS</i>をインストールしたPCがあります。<br />
他人事ではありませんので、この脆弱性が存在するのか調べてみました。
</p>
</section>
<p><span id="more-260"></span></p>
<section>
<h2 class = "headline">脆弱性の内容 </h2>
<p>
　<i>bash</i>と呼ばれるシェル（<i>Windows</i>でいうコマンドプロンプトのようなもの)の不具合で、<br />
<i>bash</i>を呼び出すことさえできれば(cgiのsystem関数などで)サーバー上の任意のプログラムを実行できてしまうという不具合です。
</p>
<p>
　この脆弱性はウェブアプリをインターネットで公開している場合に悪用される可能性があります。
</p>
<p>
　この脆弱性は、致命的な脆弱性のため、いろいろなサイトで取り上げられています。<br />
<a href="http://www.ipa.go.jp/security/ciadr/vul/20140926-bash.html" title="IPA" target="_blank"><b>IPA</b> (http://www.ipa.go.jp/security/ciadr/vul/20140926-bash.html)</a><br />
<a href="http://www.atmarkit.co.jp/ait/articles/1409/26/news071.html" title="@IT" target="_blank"><b> @IT</b> (http://www.atmarkit.co.jp/ait/articles/1409/26/news071.html)</a> <br />
<a href="http://itpro.nikkeibp.co.jp/atcl/news/14/092601079/" title="ITpro" target="_blank"><b> ITpro</b> (http://itpro.nikkeibp.co.jp/atcl/news/14/092601079/)</a>
</p>
<p>
<a href="http://www.agilegroup.co.jp/technote/bash-update.html" title="アジャイル株式会社" target="_blank"><b>アジャイル株式会社</b> (http://www.agilegroup.co.jp/technote/bash-update.html)</a><br />
では脆弱性の試験方法も記載されておりました。
</p>
</section>
<section>
<h2 class = "headline">脆弱性のテストをしてみました</h2>
<p>
　上節の<a href="http://www.agilegroup.co.jp/technote/bash-update.html" title="アジャイル株式会社" target="_blank"><b>アジャイル株式会社</b></a>に掲載されていた試験方法を使って<i>Ubuntu 14.04 LTS</i>でテストを行ってみました。<br />
まず、「端末」を起動します。端末の起動方法は一番左上のアイコン「コンピューターとオンラインリソースを検索」をクリックして<br />
「端末」と入力すればアプリケーション欄に端末アイコンが表示されるのでこれをクリックすれば起動できます。<br />
<a href="http://blog.thinkreatesoft.net/wp/wp-content/uploads/2014/09/Screenshot_ubuntu_start_terminal_2014-09-27.png"><img src="http://blog.thinkreatesoft.net/wp/wp-content/uploads/2014/09/Screenshot_ubuntu_start_terminal_2014-09-27-300x225.png" alt="ubuntuで端末起動" width="300" height="225" class="alignnone size-medium wp-image-261" /></a></p>
<div class="shellwindow">
ユーザー名@デバイス名:~$<br />

</div>
<p>
と表示された真っ黒な画面がでてきますので、
</p>
<div class="shellwindow">
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
</div>
<p>
と入力します。
</p>
<div class="shellwindow">
vulnerable<br />
this is a test
</div>
<p>
と表示されました。<strong style = "color: red;">これはアウトです！</strong>
</p>
<p>　echo とは、単にecho の後の文字列を表示するためのコマンドなのですが<br />
問題になるのは、'　'で囲まれた中<br />
これは文字列を意味するので、コマンドではありません。<br />
にも関わらず、<strong style = "color: red;">「vulnerable」と出てきてしまったのが問題なのです</strong>
</p>
<p>試しに、この脆弱性を使ってgeditを起動してみます。
</p>
<div class="shellwindow">
env x='() { :;}; gedit' bash
</div>
<p>
・・・<br />
<strong style = "color: red;">起動してしまいました。</strong></p>
<p><a href="http://blog.thinkreatesoft.net/wp/wp-content/uploads/2014/09/Screenshot_ubuntug_gedit_2014-09-27.png"><img src="http://blog.thinkreatesoft.net/wp/wp-content/uploads/2014/09/Screenshot_ubuntug_gedit_2014-09-27-300x225.png" alt="ShellShock gedit起動" width="300" height="225" class="alignnone size-medium wp-image-264" /></a>
</p>
</section>
<section>
<h2 class = "headline">Ubuntuの更新後、再テスト</h2>
<p>
　幸いにも2014年9月27日現在にはすでに<i>Ubuntu14.04 LTS</i>では<i>bash</i>の脆弱性に対応したパッチが提供されていました。<br />
さっそく<i>Ubuntu</i>の更新です。<br />
GUIでわかりやすく更新してみます。
</p>
<p>　システム設定→詳細で、詳細ウインドウを表示します。<br />
<a href="http://blog.thinkreatesoft.net/wp/wp-content/uploads/2014/09/Screenshot_ubuntu_system_setting_2014-09-27.png"><img src="http://blog.thinkreatesoft.net/wp/wp-content/uploads/2014/09/Screenshot_ubuntu_system_setting_2014-09-27-300x214.png" alt="Screenshot_ubuntu_system_setting_2014-09-27" width="300" height="214" class="alignnone size-medium wp-image-267" /></a><br />
<br />
<a href="http://blog.thinkreatesoft.net/wp/wp-content/uploads/2014/09/Screenshot_ubuntu_update_2014-09-27.png"><img src="http://blog.thinkreatesoft.net/wp/wp-content/uploads/2014/09/Screenshot_ubuntu_update_2014-09-27-300x165.png" alt="Ubuntu 詳細" width="300" height="165" class="alignnone size-medium wp-image-266" /></a><br />
右下のボタンが「更新をインストール」となっていたら、即インストールします。<br />
(しばらく更新していませんでしたので、再起動が必要でした)</p>
<p>再び「端末」を起動して、もう一度
</p>
<div class="shellwindow">
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
</div>
<p>
と入力します。<br />
今度は、
</p>
<div class="shellwindow">
bash: 警告: x: ignoring function definition attempt<br />
bash: `x' の関数定義をインポート中にエラーが発生しました<br />
this is a test
</div>
<p>と出てきました。これで一安心です。</p>
</section>
<section>
<h2 class = "headline">まとめ</h2>
<p>
　今回の騒動は、コンピュータを外部(インターネット)に公開していない場合はあまり脅威ではない騒動ですが、<br />
ウェブサーバー等で外部に公開している場合、脅威になります。
</p>
<p>
　LinuxはPC以外にもいろいろなインターネットに接続する機器(ルータやWebカメラなど)にも搭載されています。<br />
機器のメーカーから新しいファームウェアが公開されたら即アップデートしてください。</p>
</section>
<section>
]]></content:encoded>
			<wfw:commentRss>https://blog.thinkreatesoft.net/information-technology/security/bash-securityhole-shellshock.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
