Published: 2006-04-19,
:2006-04 - 19を発表しました、
Last Updated: 2006-04-19 20:58:31 UTC by Johannes Ullrich (Version: 1)
最新アップデート:2006-04-19 ヨハンネス・ウルリッヒによっての20:58:31の UTC (バージョン:1)

If you run phpBB, you are probably familiar with bots attempting to attack your sites. Typically, you will find entries in your web log like the following:
もしあなたが phpBB を走らせるなら、あなたはロボットがあなたのサイトを攻撃しようと試みるという状態で、おそらく親しみがあります。 典型的に、あなたは次のことのようなあなたの web ログに項目を見いだすでしょう:
viewtopic.php? [...] &highlight=%2527%252esystem(chr(99)%252echr [...]
viewtopic.php ? [・・・。]& = %の2527%の 252esystem を強調してください(chr (99)% 252echr [・・・。]

I omited the long string of URL encoded hex characters. If you run phpBB, grep your Apache access log for 'viewtopic.php', 'highlight' and 'system':
私は URL でコードされた16進法の文字の長いストリングを omited しました。 もしあなたが phpBB を走らせるなら、「viewtopic.php」、「ハイライト」と「システム」のためにあなたのアパッチアクセスログを grep してください:

grep viewtopic < access_log | grep highlight | grep system
grep viewtopic < access_log | grep ハイライト | grep システム

Now the part you are interested in is what is attempted to be executed as part of the "system" call. In order to quickly decode it, use php's "urldecode" function. Just open a shell, and enter:
今あなたが興味を持っている部分は「システム」コールの一部として実行されるために試みられることです。 速くそれを解読するために、 php の「urldecode」機能を使ってください。 ただシェルを開いて、そして入ってください:

$ php -e
$ php e
print urldecode(" ... [paste gibberish here ] ... ");
urldecode を印刷する(」・・・。[ここにたわ言をペーストしてください]・・・. 「);
?>
?>

Make sure you do not copy any quotes. This will likely reveal an ftp command and with that the location of the actual bot code. Let us know what you find. I posted a quick analysis of a typical phpBB bot here Important: a few users reported Antivirus alerts after clicking this URL. Since it quotes parts from the bot, it likely triggers some signatures. However, the page wil not execute any malware (trust me ;-) )
あなたがクォートをコピーしないことを確認してください。 これは多分 ftp コマンドとそれで実際のロボットコードの場所を開示するでしょう。 我々にあなたが何を見いだすか知らせてください。 私はここ(で・に) 重要な 典型的な phpBB ロボットの速い解析をポストしました:この URL をクリックした後で、少数のユーザーが反ウイルスの警告を報告しました。 それがロボットから部分を引用しますから、それは多分若干の署名を引き起こします。 しかしながら、ページ wil はどんなも悪性ソフト(信じてください ;-))を実行しません

These bots typically work all very much alike:
これらのロボットはすべて同様に典型的に機能します:

  1. search google for vulnerable systems
    検索が傷つきやすいシステムのために Google で検索します
  2. send the exploit
    exploit を送ってください
  3. the exploit will trigger the download and execution of a perl script
    偉業は perl スクリプトのダウンロードと実行を引き起こすでしょう
  4. the perl script will join an IRC channel and wait for commands.
    perl スクリプトは IRC チャネルに入って、そしてコマンドを待つでしょう。
Typically, the bot is able to launch DDoS attacks, execute local system commands and infect other phpBB systems. In the particular sample analyzed above, the bot makes an attempt to fix the actual vulnerability. If this is successful or not would depend on the bots ability to write to these files (after all, the bot will run as the apache user).
典型的に、ロボットは DDoS 攻撃を開始して、ローカルなシステムコマンドを実行して、そして他の phpBB システムを感染させることが可能です。 上に分析された特定のサンプルで、ロボットは実際の弱点を直す試みをします。 これが成功しているかどうかはこれらのファイルに書き込むべきロボット能力(結局のところ、ロボットは apache ユーザーとして作動するでしょう)に依存するでしょう。
Couple simple counter measures to keep in mind:
念頭におくべき単純なカウンター基準をつないでください:
  • First of all don't forget to patch your systems. Its all too easy to forget random web applications like phpBB.
    まず第一に、あなたのシステムにパッチを当てることを忘れないでください。 そすべて phpBB のような任意の Web アプリケーションを忘れるにはあまりにも容易.
  • make /tmp a non-executable partition. (and link /usr/tmp and /var/tmp to it). Its not perfect, but most of the web based exploits need a place to write their files to, and /tmp is the most common location available.
    実行可能でない分割をして / tmp してください。(そしてリンク / usr / tmp とそれへの /var/tmp). (彼・それ)らのファイルを書き込むべき場所と / が tmp するその完ぺきではないが、最も Web ベースの偉業の必要は利用可能な最も普通の場所です。
  • block outbound ftp/web traffic from your web server. Many web servers do not need outbound traffic on port 80/21.
    あなたの Web サーバから外行きの ftp / Web トラフィックをふさいでください。 多くの Web サーバが港80/21に外行きのトラフィックを必要としません。
  • run php in "safe mode"
    「安全なモード」で php を走らせてください
  • for extra credit: chroot apache (not all that easy, but very effective once it is done).
    余分のクレジットのために: (それほど容易ではないが、それがされる途端に非常に有効な) chroot apache 。
  • use mod_security (thanks to Ramon for reminding me about mod_security. its GGGrreat!)
    mod_security (ラモンのおかげで私に mod_security. のことを思い出させることに対して、その GGGrreat !)を使います
And don't forget: These bots will run on any platform which has php and perl installed. You may see them on Linux, OS X, Solaris ... maybe even Windows if the bot gets the paths right.
そして忘れないでください:これらのロボットは php を持っているどんなプラットホーム上ででも走るでしょう、そして perl がインストールしました。 もしロボットがパスを正しくするなら、あなたは Linux 、 OS X、ソラリス...多分 Windows の上にさえ(彼・それ)らを見てもよいです。
(出展:SANS)