[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

security/audit/packages.wml



小林です。

標題のページを翻訳しました。
コミット済みですが査読をお願いいたします。


原文:

#use wml::debian::template title="Auditing Package Prioritization Guidelines"
#use wml::debian::recent_list

<p>When performing an audit of the Debian distribution one of the
first problems is deciding which packages to examine.</p>

<p>Ideally all packages would be examined, but due to the sheer size
of the archive there has to be a simple way of prioritizing the
work.</p>

<p>As a simple set of guidelines the packages worth examination first
are:</p>

<ol>
<li>Any binary which is installed setuid or setgid.</li>

<li>Anything which provides a service over a network.</li>

<li>Any remotely accessible CGI/PHP scripts.</li>

<li>Anything which contains a cronjob or other automated script which
runs with root privileges.</li>

</ol>

<p>Popular packages should generally receive a higher priority, since any
 problems in them will affect a greater number of users.</p>

<p>The <a href="http://popcon.debian.org/";>Debian Popularity
Contest</a> keeps a running survey to show what packages are most
popular among the volunteers in the survey.</p>

<p>In particular, take a look at the <a
href="http://popcon.debian.org/by_vote";> packages sorted by vote</a>.
The "by vote" list ranks packages by how often they're used by the
people participating in the survey.</p>

<p>If a package is important to security, especially if it meets one
of the criteria above, and it's popular (according to a survey like
this one), then it's <i>definitely</i> a candidate for review.</p>


<h2><tt>setuid</tt> and <tt>setgid</tt> binaries</h2>

<p><tt>setuid</tt> and <tt>setgid</tt> binaries are the traditional
targets for security audits, as compromising a vulnerable binary with
either of these permissions can lead to a local user gaining access to
privileges they shouldn't otherwise have.</p>

<p>To aid the search there is a list of all the setuid and setgid
binaries contained in the current stable release in a searchable form
here:</p>

<ul>

<li><a href="http://shellcode.org/Setuid/";>Searchable setuid/setgid
list</a></li>

</ul>

<p>When it comes to choosing these binaries it's important to remember
that some such binaries are more security sensitive than others.
setuid(root) binaries should be examined ahead of setgid(games) and
setuid(bugs) for example.</p>


<h2>Network Servers</h2>

<p>Networking servers are another obvious source of inspiration when
it comes to performing a security audit, as an exploitable problem in
them could lead to attackers compromising machines remotely.</p>

<p>Remote compromises are usually much more severe than local
compromises.</p>

<h2>Online Scripts</h2>

<p>Online scripts, especially CGI scripts, are really in the same
class as network servers - although your webserver itself may be
secure the scripts which run upon it are just as important.</p>

<p>A bug in a script that is available across the network is as
serious as a bug in a server listening for connections - both could
allow your machine to be compromised equally.</p>

<h2>Cronjobs and system services</h2>

<p>Whilst there aren't many of these around it's worth looking at the
automatic scripts, cronjobs, etc, which are included inside
packages.</p>

<p>A lot of supporting things run as root by default for cleaning
logfiles, etc.</p>

<p>Successful exploitation of a symlink attack could result in a local
compromise.</p>


翻訳:

#use wml::debian::template title="監査パッケージ優先順位付けガイドライン"
#use wml::debian::recent_list
#use wml::debian::translation-check translation="1.10"

<p>Debian ディストリビューションの監査を実行する際に最初に生じる問題の一つは、
監査対象のパッケージを決定することです。</p>

<p>理想的にはすべてのパッケージを監査することになるでしょうが、
アーカイブ全体には膨大な数のパッケージがあるので、
作業に優先順位をつける簡単な方法がなくてはなりません。</p>

<p>単純なガイドラインとしては、最初に監査する価値があるのは以下のパッケージです。</p>

<ol>
<li>setuid や setgid をされてインストールされているあらゆるバイナリ。</li>

<li>ネットワーク越しにサービスを提供するあらゆるもの。</li>

<li>リモートからアクセス可能なあらゆる CGI/PHP スクリプト。</li>

<li>root 権限で実行される cronjob やその他の自動化スクリプトを含んでいるあらゆるもの。</li>

</ol>

<p>一般に、人気があるパッケージは優先順位を上げてください。
これらのパッケージに何らかの問題があれば、より多くのユーザに影響があるからです。</p>

<p><a href="http://popcon.debian.org/";>Debian 人気コンテスト</a>では、
調査に参加しているボランティアにどのパッケージが最も人気があるのかを明らかにするための調査を行い続けています。</p>

<p>特に、<a href="http://popcon.debian.org/by_vote";>投票による (by vote)
パッケージの順序付け</a>を見てください。この<q>投票による</q>リストでは、
調査に参加しているユーザがどの程度の頻度でパッケージを使用しているかによって、
パッケージを順位付けています。</p>

<p>パッケージが (特に上述の基準のいずれかを満たすなど) セキュリティ上重要であり、
(このような調査で) 人気もある場合は、<em>間違いなく</em>監査の対象です。</p>


<h2><tt>setuid</tt> や <tt>setgid</tt> をされたバイナリ</h2>

<p><tt>setuid</tt> や <tt>setgid</tt>
をされたバイナリは、伝統的にセキュリティ監査の対象となっています。
これらのパーミッションのいずれかを持つ脆弱なバイナリを突く侵害行為で、ローカルユーザは、
本来持っていない権限を利用する手段を得ることが可能だからです。</p>

<p>検索の補助となる手段として、現行安定版 (stable) リリースに含まれる setuid や setgid
をされたバイナリの完全な一覧が、検索可能なかたちでこちらに存在します。</p>

<ul>

<li><a href="http://shellcode.org/Setuid/";>setuid/setgid の検索可能な一覧</a></li>

</ul>

<p>setuid や setgid
をされたバイナリの中からどれを選択するかに関しては、
そのようなバイナリの中でもセキュリティ問題への繋がりやすさに差がある、
ということを覚えておくことが重要です。例えば、setuid(root)
をされたバイナリは、setgid(games) や setuid(bugs)
をされたバイナリよりも先に監査すべきです。</p>


<h2>ネットワークサーバ</h2>

<p>セキュリティ監査の実施ということになると、明らかに思い浮かびやすいもう 1
つの対象はネットワークに繋がったサーバです。
ネットワークに繋がったサーバに悪用可能な問題があると、
攻撃者がリモートからマシンを侵害できるようになりうるからです。</p>

<p>通常、
リモートからのセキュリティ侵害はローカルからのセキュリティ侵害よりもはるかに重大です。</p>

<h2>オンラインのスクリプト</h2>

<p>オンラインのスクリプト、特に CGI スクリプトは、実はネットワークサーバと同等です。
ウェブサーバ自体は安全かもしれませんが、その上で動作するスクリプトも同程度に重要なのです。</p>

<p>ネットワーク越しに利用可能なスクリプトのバグは、
接続を待ち受けているサーバのバグと同程度に重大です。
どちらのバグでもマシンへのセキュリティ侵害が可能になってしまうからです。</p>

<h2>cronjob やシステムのサービス</h2>

<p>あちこちに多数あるわけではありませんが、
パッケージ内に含まれている自動化スクリプトや cronjob などには目を通す価値があります。</p>

<p>ログファイルの掃除などに使用される多くのサポートツールが、デフォルトでは root
権限で実行されます。</p>

<p>シンボリックリンク攻撃の悪用が成功してしまうと、
ローカルからの侵害を招く可能性があります。</p>


-- 
|:  Noritada KOBAYASHI
|:  Dept. of General Systems Studies,
|:  Graduate School of Arts and Sciences, Univ. of Tokyo
|:  E-mail: nori1@xxxxxxxxxxxxxxxxxxxxxxx (preferable)
|:          nori@xxxxxxxxxxxxxxxxxxx
|:  Key fingerprint = AB26 9533 81DA 997B 3C06  4380 19BB ADA0 695C 9F53