-----BEGIN PGP SIGNED MESSAGE----- Translations of CA-96.11.interpreters_in_cgi_bin_dir, (c) 1996,1997 by Carnegie Mellon University, with special permission from the Software Engineering Institute. Accuracy and interpretation of this translation are the responsibility of the Japan Computer Emergency Response Team/Coordination Center. The SEI has not participated in this translation. The CERT* Advisories and other CERT publications are available on the Internet (http://www.cert.org/ or ftp://info.cert.org/pub/). Readers may learn about the latest updates to these publications at these locations. *Registered in the U.S. Patent and Trademark Office. ============================================================================= CERT(*) Advisory CA-96.11 Original issue date: May 29, 1996 Last Revised: September 24, 1997 Updated copyright statement A complete revision history is at the end of this file. Topic: Interpreters in CGI bin Directories - ----------------------------------------------------------------------------- ============================================================================= CERT(*) 勧告 CA-96.11 初版: 1996年5月29日 最終改訂: 1997年9月24日 著作権表示の部分を更新した。 完全な改訂履歴はこの勧告の最後に添付されている。 主題: CGI bin ディレクトリの中のインタプリタ - ----------------------------------------------------------------------------- Many sites that maintain a Web server support CGI programs. Often these programs are scripts that are run by general-purpose interpreters, such as /bin/sh or PERL. If the interpreters are located in the CGI bin directory along with the associated scripts, intruders can access the interpreters directly and arrange to execute arbitrary commands on the Web server system. This problem has been widely discussed in several forums. Unfortunately, some sites have not corrected it. Web サーバを運営している多くのサイトが、CGI プログラムを利用している。これ らのプログラムの多くは、/bin/sh や PERL のような汎用的なインタプリタによっ て実行されるスクリプトである。もし、これらのインタプリタをスクリプトととも に CGI bin ディレクトリに置いていると、侵入者にそれらのインタプリタに直接 アクセスされ、Web サーバ上の任意のコマンドを実行されてしまう。この問題は、 いくつかの公の場で広く議論された。残念ながら、この問題を修正していないサイ トがある。 The CERT Coordination Center recommends that you never put interpreters in a Web server's CGI bin directory. CERT コーディネーションセンターは、Web サーバの CGI bin ディレクトリにイン タプリタを置かないことを推奨する。 We will update this advisory as we receive additional information. Please check advisory files regularly for updates that relate to your site. 新たな情報を得た場合は、この勧告を更新する。自分のサイトに関連した勧告の改 訂に備え、定期的に勧告を確認して頂きたい。 - ----------------------------------------------------------------------------- I. Description I. 解説 To execute CGI scripts, a Web server must be able to access the interpreter used for that script. Early documentation for Netscape and other servers recommended placing the interpreters in the CGI bin directory to ensure that they were available to run the script. CGI スクリプトを実行するために、Web サーバはスクリプトのインタプリタに アクセスできる必要がある。Netscape やその他のサーバの初期の説明書では、 スクリプトの起動を確実にするために、インタプリタを CGI bin ディレクト リに置くことを推奨していた。 All programs in the CGI bin directory can be executed with arbitrary arguments, so it is important to carefully design the programs to permit only the intended actions regardless of what arguments are used. This is difficult enough in general, but is a special problem for general-purpose interpreters since they are designed to execute arbitrary programs based on their arguments. *All* programs in the CGI bin directory must be evaluated carefully, even relatively limited programs such as gnu-tar and find. CGI bin ディレクトリに置かれたプログラムは、任意の引数を指定して実行で きる。そこで、どんな引数が指定されようとも、意図した動作のみを行うよう にプログラムを慎重に設計することが重要である。一般的にこのような設計は 困難であるが、これは汎用インタプリタに固有の問題である。なぜならば汎用 インタプリタは、引数に従って任意のプログラムを実行するように設計されて いるためである。CGI bin ディレクトリに置く全てのプログラムは、gnu-tar や find のような比較的機能の限定されたプログラムでさえも慎重に評価され なければならない。 Note that the directory for CGI programs is typically called "cgi-bin" but the server may be configured to use a different name. CGI プログラムのディレクトリは、典型的には "cgi-bin" と呼ばれているが、 サーバによっては違う名前を使うように設定されているかもしれない。 II. Impact II. 影響 If general-purpose interpreters are accessible in a Web server's CGI bin directory, then a remote user can execute any command the interpreters can execute on that server. もし、Web サーバの CGI bin ディレクトリに汎用インタプリタが置かれ、そ れがアクセス可能な状態であれば、Web サーバ上でインタプリタから起動でき る任意のコマンドを、リモートユーザに実行されてしまう。 III. Solution III. 対策 The solution to this problem is to ensure that the CGI bin directory does not include any general-purpose interpreters, for example + PERL + Tcl + UNIX shells (sh, csh, ksh, etc.) この問題の解決方法は、CGI bin ディレクトリに汎用インタプリタを置かない ことである。汎用インタプリタには以下のようなものがある。 + PERL + Tcl + UNIX シェル (sh、csh、ksh など) A variety of methods can be used to safely install such interpreters; methods vary depending on the system and Web server involved. これらのインタプリタを安全にインストールするには様々な方法がある。その 方法は、システムや Web サーバによって異なる。 On Unix systems, the location of the interpreter is given on the first line of the script: Unix システムでは、インタプリタの位置がスクリプトの第 1 行目で指定され る: #! /path/to/interpreter On other systems, such as NT, there is an association between filename extensions and the applications used to run them. If your Web server uses this association, you can give CGI scripts an appropriate suffix (for example, ".pl" for PERL), which is registered to the appropriate interpreter. This avoids the need to install the interpreter in the CGI bin directory, thus avoiding the problem. NT などの他のシステムでは、ファイルを実行するアプリケーションはファイ ル名の拡張子に対応づけられている。Web サーバがこの対応関係を利用してい るならば、適切なインタプリタを登録してある適切な拡張子を CGI スクリプ トに与えればよい (たとえば PERL には ".pl")。このようにすれば、CGI bin ディレクトリにインタプリタをインストールする必要がなく、問題を避けられ る。 Check with your Web server vendor for specific information. 読者の Web サーバのベンダから特定の情報が得られないか確認すること。 Netscape reports that the 2.0 versions of their FastTrack and Enterprise Servers, (both the current Beta and upcoming final versions), do support file interpreter associations. Netscape は、FastTrack と Enterprise Server (両者は現在ベータバージョ ンであり、最終バージョンは近日出荷) のバージョン 2.0 で、ファイルとイ ンタプリタの対応付けをサポートすると報告した。 Further reading: 次に読むべき文献: Tom Christiansen has a Web page with details about this problem and a script that can be used to test for it: Tom Christiansen は Web ページを公開し、この問題の詳細を述べると共 に、問題をテストするスクリプトを提供している。 http://perl.com/perl/news/latro-announce.html Lincoln Stein's WWW Security FAQ includes a section on "Problems with Specific Servers," which discusses this and related problems: Lincoln Stein の WWW Security FAQ は、"Problems with Specific Servers" という章を設けて、この問題と関連する問題について議論して いる。 http://www.genome.wi.mit.edu/WWW/faqs/www-security-faq.html - --------------------------------------------------------------------------- The CERT Coordination Center thanks Lincoln Stein, Tom Christiansen, and the members of AUSCERT and DFN-CERT for their contributions to the information in this advisory. - --------------------------------------------------------------------------- - --------------------------------------------------------------------------- CERT コーディネーションセンターは、この勧告を作成するにあたって情報を提供し ていただいた Lincoln Stein 氏と Tom Christiansen 氏、そして AUSCERT と DFN-CERT のメンバに感謝する。 - --------------------------------------------------------------------------- If you believe that your system has been compromised, contact the CERT Coordination Center or your representative in the Forum of Incident Response and Security Teams (FIRST). もし、自分のサイトのシステムが侵入されたと思ったときは、CERT コーディネーショ ンセンター、あるいは近くの FIRST (Forum of Incident Response and Security Teams) 加盟チームに連絡して欲しい。 We strongly urge you to encrypt any sensitive information you send by email. The CERT Coordination Center can support a shared DES key and PGP. Contact the CERT staff for more information. 電子メールで重要な情報を送るときは、暗号化することを強く要請する。CERT コー ディネーションセンターは、DES と PGP を使用できる。詳細は CERT スタッフに問 い合わせて欲しい。 Location of CERT PGP key CERT の PGP 公開鍵の入手場所 ftp://info.cert.org/pub/CERT_PGP.key CERT Contact Information - ------------------------ Email cert@cert.org Phone +1 412-268-7090 (24-hour hotline) CERT personnel answer 8:30-5:00 p.m. EST (GMT-5)/EDT(GMT-4), and are on call for emergencies during other hours. Fax +1 412-268-6989 Postal address CERT Coordination Center Software Engineering Institute Carnegie Mellon University Pittsburgh PA 15213-3890 USA CERT へのコンタクト方法 - ----------------------- 電子メール cert@cert.org 電話 +1 412-268-7090 (24-hour hotline) CERT personnel answer 8:30-5:00 p.m. EST (GMT-5)/EDT(GMT-4), and are on call for emergencies during other hours. ファックス +1 412-268-6989 住所 CERT Coordination Center Software Engineering Institute Carnegie Mellon University Pittsburgh PA 15213-3890 USA CERT publications, information about FIRST representatives, and other security-related information are available for anonymous FTP from CERT の発行文書、FIRST に関する情報、その他セキュリティに関する情報は、 anonymous FTP により以下から入手できる。 http://www.cert.org/ ftp://info.cert.org/pub/ CERT advisories and bulletins are also posted on the USENET newsgroup CERT 勧告と公報は、USENET の次のニュースグループにも投稿されている。 comp.security.announce To be added to our mailing list for CERT advisories and bulletins, send your email address to CERT 勧告と公報を提供するメーリングリストを購読したい場合は、次のアドレスに 自分の電子メールアドレスを書いて送って欲しい。 cert-advisory-request@cert.org - ------------------------------------------------------------------------------ Copyright 1996 Carnegie Mellon University. Conditions for use, disclaimers, and sponsorship information can be found in http://www.cert.org/legal_stuff.html and ftp://ftp.cert.org/pub/legal_stuff . If you do not have FTP or web access, send mail to cert@cert.org with "copyright" in the subject line. Copyright 1996 Carnegie Mellon University. 使用条件、免責事項、スポンサーと の契約に関する情報については、http://www.cert.org/legal_stuff.html あるいは ftp://ftp.cert.org/pub/legal_stuff から入手できる。もし、FTP や web による アクセスが不可能な場合は、cert@cert.org 宛にメールを送って欲しい。そのとき にはサブジェクト行に "copyright" と書くこと。 CERT is registered in the U.S. Patent and Trademark Office. CERT は合衆国特許商標庁に登録済みである。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Revision history Sep. 24, 1997 Updated copyright statement Aug. 30, 1996 Removed references to CA-96.11.README. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 改訂履歴 1997年9月24日 著作権表示の部分を更新した。 1996年8月30日 勧告 CA-96.11.README ファイルへの参照を取り除いた。 - --------------------------------------------------------------------------- JPCERT/CC 改訂履歴 2000年8月25日 最新情報の URL の更新 1999年8月9日 ヘッダの誤字の修正。 フッタの更新。 1999年3月15日 初版 ====================== この文書の取扱に関する注意事項 ====================== この文書は、原著作権者から翻訳の許諾を受け、JPCERT/CC が独自に翻訳し た文書です。この翻訳文書を商業目的に使用することを禁止します。また JPCERT/CC の許諾なく再配布することを禁止します。 翻訳にあたっては、誤訳や誤解を生じるような表現をなくすように努力して おりますが、もし万が一不具合を見つけた場合には、JPCERT/CC にご連絡頂け れば幸いです。また、それ以外にも、この翻訳に関して質問等がある場合には、 JPCERT/CC にご連絡をお願い致します。連絡先は次の通りです。 info@jpcert.or.jp この翻訳文書は、随時更新される可能性がありますので、最新情報について は、次を参照してください。 http://www.jpcert.or.jp/tr/cert_advisories/ また翻訳文書の原文書も随時更新される可能性がありますので、そちらも参 照してください。翻訳文書と原文書のバージョンが異なる場合には、原文書が 最新情報です。 ===================== JPCERT/CC からのお知らせとお願い ===================== 本文書で解説した不正アクセスも含め、インターネット上で引き起こされる さまざまな不正アクセスに関する情報がありましたら、JPCERT/CC 所定の報告 様式にご記載のうえ、関連するログファイルのメッセージとともに、次のアド レスまでお送りください。 info@jpcert.or.jp 報告様式等、JPCERT/CC への連絡方法につきまして、詳しくは次の URL を ご参照下さい。 http://www.jpcert.or.jp/contact.html JPCERT/CC に頂いた報告は、報告者の了解なしに、そのまま他組織等に開示 することはありません。JPCERT/CC の組織概要につきましては、次の URL を ご参照ください。 http://www.jpcert.or.jp/ JPCERT/CC では、不正アクセスに関する情報を迅速にご提供するために、メー リングリストを開設しています。登録の方法等、詳しくは、次の URL をご参 照ください。 http://www.jpcert.or.jp/announce.html __________ 注: この文書は、不正アクセスに対する一般的な情報提供を目的としており、特定 の個人や組織に対する個別のコンサルティングが目的ではありません。そのため、 個別の問題に関するお問い合わせ等に必ずお答えできるとは限りません。また、お 答えできる場合でもご回答が遅れる可能性があります。 JPCERT/CC は、この文書に記載された情報の内容が正確であるよう努めていますが、 正確性を含め一切の品質についてこれを保証致しません。この文書に記載された情 報に基づいて、貴方あるいは貴組織がとられる行動、あるいはとられなかった行動 によって、直接的、間接的または偶発的に引き起こされた結果に対して、JPCERT/CC は何ら保証致しません。 -----BEGIN PGP SIGNATURE----- Version: 2.6.3ia iQCVAwUBOaXoUIx1ay4slNTtAQHHlQQAuEgxATUEAxIP1ekbDzhR1+H0DwehBDOY pgt0U/hP05obRfXlQnmM5n+qA2UPVXkXL26oNg+P16S2Vp6pPpLlo1SQNACnbBNl y1DG8z9TNIccIlUNGDVN6yiaPhKWiVL4WviyMrnYxaWMk5yYjW36XvPRuCWHGxrW MH620O/AMUc= =1TrI -----END PGP SIGNATURE-----