新型のXBashボットネットマルウェアがWindowsとLinuxでCryptoMiningからRansomwareの違う動作をします

2018.09.25

投稿者 :Justin Brunnette

カテゴリ: IT News

最近涼しくなりましたね。ジャスティンです。

セキュリティ界も最近おとなしくしてなくて面白くなってきています。
元の記事は:

https://researchcenter.paloaltonetworks.com/2018/09/unit42-xbash-combines-botnet-ransomware-coinmining-worm-targets-linux-windows/

[日本語]


サイバーセキュリティ界からのニュースはロシアが多く注目を集めています。 たとえばアメリカの大統領選挙期間中にDNCサーバーがロシアからハッキングされたり、ウクライナにPetya / NotPetya のランサムウェアでサイバー攻撃し、ウクライナのGDPの最大0.5%に相当するを通じて経済的損害賠償に成功されました。 だが他のサイバーセキュリティ超大国である中国からの興味深い展開も出てきてます。 中国圏のハッキング組織「Iron Group」は、興味深い機能を備えた「XBash」という新しい破壊的なランサムウェアを開発しました。



Palo Alto Network(パロアルトネットワーク)のUnit 42(ユニット42)の研究者は、野生のXBashを発見しました。XBashの名前はコードの元のモジュールをベースとして付けたのです。 この新しいシステムは、ボットネット、暗号化、仮想通貨マイニング、自己伝播など、さまざまな戦略を組み合わせられています。 Unit42はもともと、Linuxベースのサーバーに感染する新しい種類のマルウェアを調査してから見つかりました。 このLinux型のウィルスは、ボットネットとランサムウェアを組み合わせて感染させ、データを破壊し、被害者から金銭を奪うことを発見しました。
 
XBashには、企業イントラネット内の脆弱なサーバーの調査に使用されるC2サーバーからの多数のドメイン名とIPアドレスのコードが含まれています。 この戦略は、MiraiやGafgytのボットネットと違い、一般的にIPアドレスのみをスキャンするだけではありません。 ウィルス対策のハニーポットの導入は通常IPアドレスのみなので、分析が難しいという追加の利点もあります。
 
Xbashは3種類のURIをターゲットします:
1)/ domain / phpmyadminまたは/ domain / allで全ドメインリストを取得
2)/ port / tcp8080、/ port / udp1900はTCPまたはUDPを介してIPアドレスを取得する ポート
3)/ cidirを使用してIPアドレスのCIDIRのリストを取得します。
 
Xbashは、ブルートフォース攻撃に使用される脆弱なパスワードのリストを取得するために、URIリクエスト "/ p"も送信します。 以下は、XbashがRsyncのようなサービスにブルートフォースを行うサンプルコードです。
 

 

 

ポートの開設、弱い資格情報または脆弱なパッチが正常に見つかったら、C2サーバーに報告します。
 
XBashは、MySQL、MongoDB、PostgreSQLなどのデータベースをターゲットし、その内容を削除します。 データベースにアクセスするためには、被害者はビットコインで支払う必要があるというメッセージが、「PLEASE_READ_ME_XYZ」という名前の新しいデータベースに置き換えられます。 しかし、XBashコードのさらなる調査では、マルウェアが削除されたデータベースのバックアップを作成したという証拠はないです。つまり、被害者のデータが身代金を支払うかどうかに関わらずすべて失われます。
 
XBashが被害ネットワークで動作しているHadoop、Redis、またはActiveMQを検出すると、XBashはそれを利用して増殖させます。 サービスをうまく利用できるようになると、C2コマンドを実行してPythonスクリプトをダウンロードしたり、新しいcronジョブを作成して既存のコイン・マイニング・システムを強制的に停止させて、Xbashのコイン・マイニング・システムを使用します。
 
XBashはRedisとHTTPサービスを使用して、RedisサービスがLinuxまたはWindowsサーバーにインストールされているかどうかを判断します。 XBashがWindowsサーバーにある場合は、Windowsスタートアップアイテムが作成されます。 スタートアップアイテムはC2サーバーからHTMLまたはScriptletファイルをダウンロードしてJSまたはVBコードを実行し、PowerShellを悪質なPE実行ファイルまたはPE DLLファイルに実行します。
これらのPEファイルは、コインマイニングシステムまたはランサムウェアであり、Linux Serverバージョンと同様に動作します。
 
Unit42は、攻撃者がドメイン名をスキャンして企業のイントラネットを攻撃することで攻撃を拡大していることを警告しています。 彼らはまた、脆弱性が新規であるか古いか、またはCVEが割り当てられているかどうかにかかわらず、どこからでも脆弱性を収集することによって犠牲者を増やしています。
 

[English]


 

XBash Botnet Malware Behaves Differently in Windows and Linux From CryptoMining to Ransomware

 

In much of the news in the cyber security realm, Russia seems to be taking up much of the spotlight. Though with good reason too, as the country successfully hacked the DNC servers during the American Presidential campaign as well as cyber attack to Ukraine through the Petya/NotPetya ransomwares costing up to 0.5% of Ukraine’s GDP in economic damages. But much of the news from Russia is overshadowing some interesting developments from the other cybersecurity superpower, China. The Chinese speaking hacking organization, Iron Group, has launched a new destructive ransomware called XBash with interesting capabilities.

 

Researchers at Palo Alto Network’s Unit 42 have discovered XBash in the wild and dubbed it XBash based on the code’s original module. This new strain has combined a large array of strategies such as botnets, cryptomining ransomware and self-propagation. Unit 42 was originally investigating a new type of malware infecting Linux based servers. They found that this Linux stain combined a botnet with ransomware to infect, destroy data and extort money from their victims.

 

XBash contains code of a number of domain names and IP addresses from its C2 servers used for probing for vulnerable servers inside corporate intranets. This strategy is different from other Linux botnets such as Mirai and Gafgyt which typically only scanned for IP addresses. This also has the added benefit of being difficult to analyze for researchers as honeypot deployments are usually for IP addresses only.

 

Unit 42 explain that there are 3 types of URI targeted: 1) /domain/phpmyadmin or /domain/all used to get a list of domains, 2) /port/tcp8080, /port/udp1900 to get IP addresses through TCP or UDP ports or 3) /cidir to get a list of CIDIR of IP addresses.

 

XBash will also send a URI request “/p” to get a list of vulnerable passwords used for brute forcing attacks. Below is a sample code of how XBash may brute force a service like Rsync.

 

 

After it has successfully found port openings, weak credentials or vulnerable patches, it will report it back to a C2 server.

 

XBash will target databases such as MySQL, MongoDB and PostgreSQL and delete its contents. It replaces it with a new database with the name “PLEASE_READ_ME_XYZ” with a message stating that in order to regain access to the database, the victim must pay in bitcoins. But upon further investigation into XBash code, there appears to be no evidence of the malware making a backup of the deleted database, meaning that all the victims data will be lost whether they pay the ransom or not.

 

If XBash finds Hadoop, Redis or ActiveMQ running in their victim network, it exploits it for propagation. When it successfully able to exploit the services, it will execute a shell command to download from their C2 servers Python scripts or create a new cron job to kill any existing coin mining system to use Iron groups own coin mining system.

 

XBash uses Redis and HTTP service to determine whether the Redis service is installed on a Linux or Windows server. When XBash is on a Windows server, it will create a Windows startup item. The startup item will download HTML or Scriptlet file from their C2 server to execute JS or VB code which will in turn run a PowerShell to a malicious PE executable or PE DLL file.

These PE files are coin mining systems or ransomware malware, behaving similarly to the Linux Server version.