Blog

3CXのソフトウェア・サプライチェーン侵害: 北朝鮮の攻撃者による過去のソフトウェア・サプライチェーン攻撃が発端となっている疑い

Jeff Johnson, Fred Plan, Adrian Sanchez, Renato Fontana, Jake Nicastro, Dimiter Andonov, Marius Fodoreanu, Daniel Scott
Apr 20, 2023
12 min read
|   Last update Nov 10, 2023
Supply Chain
Malware
North Korea

2023年3月、Mandiantコンサルティングは、3CX Desktop Appソフトウェアに関わるサプライチェーン侵害の調査に対応しました。この対応中、Mandiantは、3CXのネットワークへの初期侵入ベクターがTrading Technologies社のWebサイトからダウンロードされた不正ソフトウェア経由であることを確認しました。これは、Mandiantがソフトウェア・サプライチェーン攻撃から別のソフトウェア・サプライチェーン攻撃につながるのを観測した初めてのケースです。

 

概 要

3CX Desktop Appは、チャット、ビデオ通話、音声通話を含むコミュニケーションをユーザーに提供するエンタープライズソフトウェアです。2023年3月下旬、ソフトウェア・サプライチェーン侵害により、3CXの正規のソフトウェアをトロイの木馬化したバージョンを、3CXのWebサイトからダウンロードさせる手法でマルウェアが拡散されました。影響を受けたソフトウェアは3CX DesktopApp 18.12.416以前のもので、ダウンローダーであるSUDDENICONを実行する不正なコードが含まれており、GitHubでホストされている暗号化されたアイコンファイルから追加のコマンド&コントロール(C2)サーバーを受信しました。復号化されたC2サーバーは、ブラウザ情報を盗むデータマイナーであるICONICSTEALERとして特定された第3ステージをダウンロードするために使用されました。Mandiantはこの活動を、北朝鮮との関連性が疑われるクラスターであるUNC4736として追跡しています。

3CX software supply chain compromise linked to Trading Technologies software supply chain compromise
図1:3CXソフトウェアのサプライチェーン侵害とTrading Technologiesソフトウェアのサプライチェーン侵害の関連性

ソフトウエア・サプライチェーン・エクスプロイトの解説

Mandiantコンサルティングは、3CXのサプライチェーン侵害に関する調査を行い、初期侵入ベクターである、Trading Technologiesが提供するソフトウェアパッケージ「X_TRADER」の改ざんされたインストーラに始まる、過去のソフトウェア・サプライチェーン侵害を通じて配布されたマルウェア混入ソフトウェアパッケージを発見しました(図1)。Mandiantは、複雑なロードプロセスにより、多段式モジュラーバックドアであるVEILEDSIGNALとそのモジュールが展開されたことを突き止めました

VEILEDSIGNALバックドアの解析

Mandiant Consultingは、不正なモジュラーバックドア「VEILEDSIGNAL」の展開につながるX_TRADER_r7.17.90p608.exe (MD5: ef4ab22e565684424b4142b1294f1f4d) というファイル名のインストーラーを特定しました。

X_TRADERプラットフォームは2020年に提供が終了したとされていますが、2022年になっても正規のTrading TechnologiesのWebサイトからダウンロードすることが可能でした。このファイルは、「Trading Technologies International, Inc」というサブジェクトで署名されており、同じデジタル証明書で署名された実行ファイルSetup.exeが含まれていました。不正なソフトウェアのデジタル署名に使用されたコード署名証明書は、2022年10月に期限切れとなるよう設定されていました。

インストーラには Setup.exe が含まれており、実行すると2つのトロイの木馬化されたDLLと無害な実行ファイルをドロップします。Setup.exeは、無害な実行ファイルを使用して、不正なDLLの1つをサイドロードします。サイドローディングは、正規のWindows実行ファイルに依存して、正規の依存関係を装った不正なファイルをロードして実行するものです。ロードされた不正なDLLは、SIGFLIPとDAVESHELLを含み、それを使用して、もう一方のドロップされた不正な実行ファイルからペイロードを復号しメモリにロードします。SIGFLIPは、RC4ストリーム暗号に依存して選択したペイロードを復号化し、バイトシーケンスFEEDFACEを使用して、復号化の段階でシェルコード(この場合はDAVESHELL)を検出します。

SIGFLIPとDAVESHELLは、モジュール型バックドアであるVEILEDSIGNALと、それに対応する2つのモジュールを抽出し実行します。VEILEDSIGNALは、プロセスインジェクションとコマンド&コントロール(C2)サーバーとの通信のために、抽出された2つのモジュールに依存します。

VEILEDSIGNALと付随する2つのコンポーネントは、以下の機能を提供します

  • VEILEDSIGNALバックドアは、インプラントデータの送信、シェルコードの実行、自己終了の3つのコマンドをサポートしています。
  • プロセスインジェクションモジュールは、Chrome、Firefox、Edgeの最初に見つかったプロセスインスタンスにC2モジュールをインジェクションします。また、名前付きパイプを監視し、必要に応じて通信モジュールを再注入します。The process injection module injects the C2 module in the first found process instance of Chrome, Firefox, or Edge. It also monitors the named pipe and reinjects the communication module if necessary.
  • C2モジュールは、Windowsの名前付きパイプを作成し、着信する通信をリスニングし、Galois Counter Mode(GCM)のAES-256で暗号化してC2サーバーに送信します。

特定されたVEILEDSIGNALのサンプル(MD5:c6441c961dcad0fe127514a918eaabd4)のC2コンフィグレーションは、以下のハードコードされたURLに依存していました: www.tradingtechnologies[.]com/trading/order-management.

VEILEDSIGNAL の類似点とコード比較

侵害されたX_TRADERと3CXDesktopAppアプリケーションは、最終的なペイロードは異なるものの、どちらも同じ方法でペイロードを含み、抽出し、実行します。Mandiantはこれらのサンプルを分析し、以下のような類似点を確認しました

  • ペイロードの暗号化と復号化に、SIGFLIPのツールコンフィグレーションで同じRC4キー  3jB(2bsG#@c7 を使用
  • CVE-2013-3900(MS13-098)を活用したGitHubで公開されているプロジェクト、SIGFLIPを使用
  • PE-COFFファイルを位置非依存コードまたはシェルコードに変換し、ペイロードをメモリにロードするために反射的ロード技術を活用する、一般に公開されているオープンソースプロジェクトであるDAVESHELへ依存
  • ペイロードにハードコードされたCookie変数 __tutma を使用
  • どちらのペイロードも、AES-256 GCM暗号でデータを暗号化

3CX構築環境の侵害

攻撃者は、公開されているFast Reverse Proxyプロジェクトのコンパイルバージョンを使用し、攻撃中に3CXの組織内で水平展開しました。ファイル file MsMpEng.exe (MD5: 19dbffec4e359a198daf4ffca1ab9165) は、攻撃者によってC:◆Windows◆System32内にドロップされました。

Mandiantは、攻撃者が認証情報を取得し、水平展開しながら、環境全体を通して攻撃者の手順を再構築することができました。最終的に、攻撃者はWindowsとmacOSの両方の構築環境を侵害することができました。Windowsの構築環境では、攻撃者はTAXHAULランチャーとCOLDCATダウンローダーを展開し、IKEEXTサービスを通じてDLLのサイドローディングを実行し、LocalSystem権限で実行することで永続化しました。macOS の構築サーバーは、Launch Daemons を永続化メカニズムとして使用する POOLRAT バックドアで侵害されていました。

以前のレポートでは、macOSビルドサーバーがSIMPLESEAで侵害されていたことが報告されています。Mandiant Intelligenceはサンプルの分析を完了し、新しいマルウェアファミリーではなく、バックドアPOOLRATであると判断しました。

攻撃グループ: UNC4736

UNC4736は、Mandiant Intelligenceが追跡している複数の北朝鮮の攻撃者、特に金銭を動機とするサイバー犯罪活動に関与する工作員と、その重なりの程度は様々であることを示しています。これらのクラスターは、暗号通貨およびフィンテック関連サービスに長期にわたって持続的に焦点を当てていることを実証しています。

Mandiantは、UNC4736がCISAによって報告された金銭的動機のある北朝鮮の「AppleJeus」活動に関連していると中程度の確信を持って評価しています。これは、2022年2月に www.tradingtechnologies[.]com の侵害を報告したGoogle TAGの調査結果と一致し、同サイトから侵害されたX_TRADERアップデートの配布に先行してさらに裏付けされています。

  • TAGは、Chromeのリモートコード実行の脆弱性CVE-2022-0609を悪用する北朝鮮の一連の活動を報告し、暗号通貨サービスを標的とする「AppleJeus」と重なることを特定しました。
  • サイト www.tradingtechnologies[.]com は、トロイの木馬化したX_TRADERソフトウェアパッケージを配信することが知られていたわずか2ヶ月前に侵害され、サイトへの訪問者を不正利用する隠しIFRAMEをホストしていました。
  • Mandiantは、3CX環境において、コンフィグレーションされたC2サーバーとして journalide[.]org を使用するPOOLRATバックドアを特定しました。
  • POOLRATの古いサンプル(MD5: 451c23709ecd5a8461ad060f6346930c)は、AppleJeus作戦で使用されたトロイの木馬化CoinGoTradeアプリケーションの一部として過去に CISAによって報告されています(図2)。
    • この古いサンプルのインフラは、同じくAppleJeusの下で追跡された、別のトロイの木馬化された取引アプリケーション、JMT Tradingとも関係があります。
POOLRAT Link to CoinGoTrade and JMT Trading Activity
図2: CoinGoTradeとJMT Trading Activity へのPOOLRATリンク

また、UNC4736とAPT43の活動と考えられる2つのクラスター、UNC3782とUNC4469の間には、脆弱なインフラの重複が確認されました。

  • DNSの解決によって、UNC4736とAPT43につながる活動との関連性が中程度の信頼性を持って確認されています。(表1-3)
  • APT43はしばしば、暗号通貨のユーザーや関連サービスを標的として活動しており、このことは北朝鮮につながるサイバー工作全体において広く行われていることがわかります。
表1: Resolutions for IP 89.45.67.160
DateDomainUNC
2022-12-20curvefinances[.]comUNC4469
2022-12-29pbxphonenetwork[.]comUNC4736
表2: Resolutions for IP 172.93.201.88
DateDomainUNC
2022-04-08journalide[.]orgUNC4736
2021-11-26nxmnv[.]siteUNC3782
表3: Resolutions for IP 185.38.151[.]11
DateDomainUNC
2023-01-09msedgepackageinfo[.]comUNC4736
2023-03-22apollo-crypto.org.shilaerc20[.]comUNC4469

展望と考察

今回確認されたソフトウェアサプライチェーンの侵害は、私たちが知る限り、ソフトウェアサプライチェーンの侵害を連鎖的に引き起こした初めての事例です。特に、今回の調査で明らかになったように、攻撃者が複数の侵入を連鎖させることができる場合、この種の侵害が広がる可能性があることを示しています。UNC4736の活動に関する研究によると、金銭的な動機を持つ北朝鮮の攻撃者と関連している可能性が高いことが示唆されています。連鎖的なソフトウェア・サプライチェーンの侵害は、北朝鮮のオペレーターが、マルウェアを開発・配布するために創造的な方法でネットワークアクセスを悪用し、北朝鮮の利益に沿った活動を行いながらターゲットネットワーク間を移動できることを証明しています。

マルウェアの定義

ICONICSTEALER

ICONICSTEALER は、アプリケーションのコンフィグレーションデータだけでなく、ブラウザの履歴も収集するC/C++データマイナーです。

DAVESHELL

DAVESHELL は、インメモリドロッパーとして機能するシェルコードです。埋め込まれたペイロードは、メモリにマッピングされ実行されます。

SIGFLIP

SigFlip は、authenticode署名されたPE-COFFファイルにパッチを当て、ファイルの署名に影響を与えたり破壊したりせずに任意のコードを注入するためのツールです。

POOLRAT

POOLRAT は、基本的なシステム情報を収集し、コマンドを実行することができるC/C++のmacOSバックドアです。実行されるコマンドは、任意のコマンドの実行、ファイルの安全な削除、ファイルの読み書き、設定の更新などです。

TAXHAUL

TAXHAUL は、実行されると C:\Windows\System32\config\TxR\<machine hardware profile GUID>.TxR.0.regtrans-ms で予測するシェルコードペイロードを復号化するDLLです。Mandiantは、DLLサイドローディングによって TAXHAUL が持続することを確認しています。

COLDCAT

COLDCATは複雑なダウンローダーです。COLDCATはユニークなホスト識別子情報を生成し、CookieヘッダーのデータとともにPOSTリクエストで別ファイルで指定されたC2にビーコンします。短いハンドシェイクの後、マルウェアはレスポンスで実行されるbase64エンコードされたシェルコードを予測します。

VEILEDSIGNAL

VEILEDSIGNALは、C言語で書かれたバックドアで、シェルコードを実行し、自身を終了させることができます。さらに、VEILEDSIGNALは、Windowsの名前付きパイプを介して接続し、コマンド&コントロール(C2)インフラストラクチャと対話する追加モジュールに依存しています。

謝 辞

Michael Bailey、Willi Ballenthin、Michael Barnhart、Jakub Jozwiakの協力とレビューにf深く感謝します。また、Mandiantは、この研究に協力してくれたGoogle Threat Analysis Group (TAG)とMicrosoft Threat Intelligence Center (MSTIC)にも感謝したいと思います。

Technical Annex: MITRE ATT&CK  

Resource Development

  • T1588 Obtain Capabilities  
  • T1588.004 Digital Certificates
  • T1608 Stage Capabilities  
  • T1608.003 Install Digital Certificate

Initial Access

  • T1190 Exploit Public-Facing Application
  • T1195 Supply Chain Compromise  
  • T1195.002 Compromise Software Supply Chain

Persistence

  • T1574 Hijack Execution Flow
  • T1574.002 DLL Side-Loading

Privilege Escalation

  • T1055 Process Injection
  • T1574 Hijack Execution Flow  
  • T1574.002 DLL Side-Loading

Defense Evasion

  • T1027 Obfuscated Files or Information
  • T1036 Masquerading  
  • T1036.001 Invalid Code Signature
  • T1055 Process Injection
  • T1070 Indicator Removal  
  • T1070.001 Clear Windows Event Logs
  • T1070.004 File Deletion
  • T1112 Modify Registry
  • T1140 Deobfuscate/Decode Files or Information
  • T1497 Virtualization/Sandbox Evasion  
  • T1497.001 System Checks
  • T1574 Hijack Execution Flow  
  • T1574.002 DLL Side-Loading
  • T1620 Reflective Code Loading
  • T1622 Debugger Evasion

Discovery

  • T1012 Query Registry
  • T1082 System Information Discovery
  • T1083 File and Directory Discovery
  • T1497 Virtualization/Sandbox Evasion  
  • T1497.001 System Checks
  • T1614 System Location Discovery
  • T1614.001 System Language Discovery  
  • T1622 Debugger Evasion

Command and Control

  • T1071 Application Layer Protocol
  • T1071.001 Web Protocols
  • T1071.004 DNS  
  • T1105 Ingress Tool Transfer
  • T1573 Encrypted Channel
  • T1573.002 Asymmetric Cryptography

Impact

  • T1565 Data Manipulation  
  • T1565.001 Stored Data Manipulation

Technical Annex: Detection Rules

YARA Rules

rule M_Hunting_3CXDesktopApp_Key {

  meta:

    disclaimer = "This rule is meant for hunting and is not tested to run in a production environment"

    description = "Detects a key found in a malicious 3CXDesktopApp file"

    md5 = "74bc2d0b6680faa1a5a76b27e5479cbc"

    date = "2023/03/29"

    version = "1"

  strings:

    $key = "3jB(2bsG#@c7" wide ascii

  condition:

    $key

}

rule M_Hunting_3CXDesktopApp_Export {

  meta:

    disclaimer = "This rule is meant for hunting and is not tested to run in a production environment"

    description = "Detects an export used in 3CXDesktopApp malware"

    md5 = "7faea2b01796b80d180399040bb69835"

    date = "2023/03/31"

    version = "1"

  strings:

    $str1 = "DllGetClassObject" wide ascii

    $str2 = "3CXDesktopApp" wide ascii

  condition:

    all of ($str*)

}

rule TAXHAUL
{
  meta:
  author = "Mandiant"
  created = "04/03/2023"
  modified = "04/03/2023"
  version = "1.0"
  strings:
    $p00_0 = {410f45fe4c8d3d[4]eb??4533f64c8d3d[4]eb??4533f64c8d3d[4]eb}
    $p00_1 = {4d3926488b01400f94c6ff90[4]41b9[4]eb??8bde4885c074}
  condition:
    uint16(0) == 0x5A4D and any of them
}

rule M_Hunting_MSI_Installer_3CX_1

{

meta:

author = "Mandiant"

md5 = "0eeb1c0133eb4d571178b2d9d14ce3e9, f3d4144860ca10ba60f7ef4d176cc736"

strings:

$ss1 = { 20 00 5F 64 33 64 63 6F 6D 70 69 6C 65 72 5F 34 37 2E 64 6C 6C 5F }

$ss2 = { 20 00 5F 33 43 58 44 65 73 6B 74 6F 70 41 70 70 2E }

$ss3 = { 20 00 5F 66 66 6D 70 65 67 2E 64 6C 6C 5F }

$ss4 = "3CX Ltd1" ascii

$sc1 = { 1B 66 11 DF 9C 9A 4D 6E CC 8E D5 0C 9B 91 78 73 }

$sc2 = "202303" ascii

condition:

(uint32(0) == 0xE011CFD0) and filesize > 90MB and filesize < 105MB and all of them

}

rule M_Hunting_TAXHAUL_Hash_1

{

meta:

author = "Mandiant"

disclaimer = "This rule is meant for hunting and is not tested to run in a production environment"

description = "Rule looks for hardcoded value used in string hashing algorithm observed in instances of TAXHAUL."

md5 = "e424f4e52d21c3da1b08394b42bc0829"

strings:

$c_x64 = { 25 A3 87 DE [4-20] 25 A3 87 DE [4-20] 25 A3 87 DE }

condition:

filesize < 15MB and uint16(0) == 0x5a4d and uint32(uint32(0x3C)) == 0x00004550 and any of them

}

rule M_Hunting_SigFlip_SigLoader_Native

{

meta:

author = "Mandiant"

disclaimer = "This rule is meant for hunting and is not tested to run in a production environment"

description = "Rule looks for strings present in SigLoader (Native)"

md5 = "a3ccc48db9eabfed7245ad6e3a5b203f"

strings:

$s1 = "[*]: Basic Loader..." ascii wide

$s2 = "[!]: Missing PE path or Encryption Key..." ascii wide

$s3 = "[!]: Usage: %s <PE_PATH> <Encryption_Key>" ascii wide

$s4 = "[*]: Loading/Parsing PE File '%s'" ascii wide

$s5 = "[!]: Could not read file %s" ascii wide

$s6 = "[!]: '%s' is not a valid PE file" ascii wide

$s7 = "[+]: Certificate Table RVA %x" ascii wide

$s8 = "[+]: Certificate Table Size %d" ascii wide

$s9 = "[*]: Tag Found 0x%x%x%x%x" ascii wide

$s10 = "[!]: Could not locate data/shellcode" ascii wide

$s11 = "[+]: Encrypted/Decrypted Data Size %d" ascii wide

condition:

filesize < 15MB and uint16(0) == 0x5a4d and uint32(uint32(0x3C)) == 0x00004550 and 4 of ($s*)

}

rule M_Hunting_Raw64_DAVESHELL_Bootstrap

{

meta:

author = "Mandiant"

disclaimer = "This rule is meant for hunting and is not tested to run in a production environment"

description = "Rule looks for bootstrap shellcode (64 bit) present in DAVESHELL"

md5 = "8a34adda5b981498234be921f86dfb27"

strings:

$b6ba50888f08e4f39b43ef67da27521dcfc61f1e = { E8 00 00 00 00 59 49 89 C8 48 81 C1 ?? ?? ?? ?? BA ?? ?? ?? ?? 49 81 C0 ?? ?? ?? ?? 41 B9 ?? ?? ?? ?? 56 48 89 E6 48 83 E4 F0 48 83 EC 30 C7 44 24 20 ?? ?? ?? ?? E8 ?? 00 00 00 48 89 F4 5E C3 }

$e32abbe82e1f957fb058c3770375da3bf71a8cab = { E8 00 00 00 00 59 49 89 C8 BA ?? ?? ?? ?? 49 81 C0 ?? ?? ?? ?? 41 B9 ?? ?? ?? ?? 56 48 89 E6 48 83 E4 F0 48 83 EC 30 48 89 4C 24 28 48 81 C1 ?? ?? ?? ?? C7 44 24 20 ?? ?? ?? ?? E8 ?? 00 00 00 48 89 F4 5E C3 }

condition:

filesize < 15MB and any of them

}

rule M_Hunting_MSI_Installer_3CX_1

{

meta:

author = "Mandiant"

disclaimer = "This rule is meant for hunting and is not tested to run in a production environment"

description = "This rule looks for hardcoded values within the MSI installer observed in strings and signing certificate"

md5 = "0eeb1c0133eb4d571178b2d9d14ce3e9"

strings:

$ss1 = { 20 00 5F 64 33 64 63 6F 6D 70 69 6C 65 72 5F 34 37 2E 64 6C 6C 5F }

$ss2 = { 20 00 5F 33 43 58 44 65 73 6B 74 6F 70 41 70 70 2E }

$ss3 = { 20 00 5F 66 66 6D 70 65 67 2E 64 6C 6C 5F }

$ss4 = "3CX Ltd1" ascii

$sc1 = { 1B 66 11 DF 9C 9A 4D 6E CC 8E D5 0C 9B 91 78 73 }

$sc2 = "202303" ascii

condition:

(uint32(0) == 0xE011CFD0) and filesize > 90MB and filesize < 100MB and all of them

}

rule M_Hunting_VEILEDSIGNAL_1

{

meta:

author = "Mandiant"

disclaimer = "This rule is meant for hunting and is not tested to run in a production environment"

md5 = "404b09def6054a281b41d309d809a428, c6441c961dcad0fe127514a918eaabd4"

strings:

$rh1 = { 68 5D 7A D2 2C 3C 14 81 2C 3C 14 81 2C 3C 14 81 77 54 10 80 26 3C 14 81 77 54 17 80 29 3C 14 81 77 54 11 80 AB 3C 14 81 D4 4C 11 80 33 3C 14 81 D4 4C 10 80 22 3C 14 81 D4 4C 17 80 25 3C 14 81 77 54 15 80 27 3C 14 81 2C 3C 15 81 4B 3C 14 81 94 4D 1D 80 28 3C 14 81 94 4D 14 80 2D 3C 14 81 94 4D 16 80 2D 3C 14 81 }

$rh2 = { 00 E5 A0 2B 44 84 CE 78 44 84 CE 78 44 84 CE 78 1F EC CA 79 49 84 CE 78 1F EC CD 79 41 84 CE 78 1F EC CB 79 C8 84 CE 78 BC F4 CA 79 4A 84 CE 78 BC F4 CD 79 4D 84 CE 78 BC F4 CB 79 65 84 CE 78 1F EC CF 79 43 84 CE 78 44 84 CF 78 22 84 CE 78 FC F5 C7 79 42 84 CE 78 FC F5 CE 79 45 84 CE 78 FC F5 CC 79 45 84 CE 78}

$rh3 = { DA D2 21 22 9E B3 4F 71 9E B3 4F 71 9E B3 4F 71 C5 DB 4C 70 94 B3 4F 71 C5 DB 4A 70 15 B3 4F 71 C5 DB 4B 70 8C B3 4F 71 66 C3 4B 70 8C B3 4F 71 66 C3 4C 70 8F B3 4F 71 C5 DB 49 70 9F B3 4F 71 66 C3 4A 70 B0 B3 4F 71 C5 DB 4E 70 97 B3 4F 71 9E B3 4E 71 F9 B3 4F 71 26 C2 46 70 9F B3 4F 71 26 C2 B0 71 9F B3 4F 71 9E B3 D8 71 9F B3 4F 71 26 C2 4D 70 9F B3 4F 71 }

$rh4 = { CB 8A 35 66 8F EB 5B 35 8F EB 5B 35 8F EB 5B 35 D4 83 5F 34 85 EB 5B 35 D4 83 58 34 8A EB 5B 35 D4 83 5E 34 09 EB 5B 35 77 9B 5E 34 92 EB 5B 35 77 9B 5F 34 81 EB 5B 35 77 9B 58 34 86 EB 5B 35 D4 83 5A 34 8C EB 5B 35 8F EB 5A 35 D3 EB 5B 35 37 9A 52 34 8C EB 5B 35 37 9A 58 34 8E EB 5B 35 37 9A 5B 34 8E EB 5B 35 37 9A 59 34 8E EB 5B 35 }

condition:

uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and 1 of ($rh*)

}

rule M_Hunting_VEILEDSIGNAL_2

{

meta:

author = "Mandiant"

disclaimer = "This rule is meant for hunting and is not tested to run in a production environment"

md5 = "404b09def6054a281b41d309d809a428"

strings:

$sb1 = { C1 E0 05 4D 8? [2] 33 D0 45 69 C0 7D 50 BF 12 8B C2 41 FF C2 C1 E8 07 33 D0 8B C2 C1 E0 16 41 81 C0 87 D6 12 00 }

$si1 = "CryptBinaryToStringA" fullword

$si2 = "BCryptGenerateSymmetricKey" fullword

$si3 = "CreateThread" fullword

$ss1 = "ChainingModeGCM" wide

$ss2 = "__tutma" fullword

condition:

(uint16(0) == 0x5A4D) and (uint32(uint32(0x3C)) == 0x00004550) and (uint16(uint32(0x3C)+0x18) == 0x020B) and all of them

}

rule M_Hunting_VEILEDSIGNAL_3

{

meta:

author = "Mandiant"

disclaimer = "This rule is meant for hunting and is not tested to run in a production environment"

md5 = "c6441c961dcad0fe127514a918eaabd4"

strings:

$ss1 = { 61 70 70 6C 69 63 61 74 69 6F 6E 2F 6A 73 6F 6E 2C 20 74 65 78 74 2F 6A 61 76 61 73 63 72 69 70 74 2C 20 2A 2F 2A 3B 20 71 3D 30 2E 30 31 00 00 61 63 63 65 70 74 00 00 65 6E 2D 55 53 2C 65 6E 3B 71 3D 30 2E 39 00 00 61 63 63 65 70 74 2D 6C 61 6E 67 75 61 67 65 00 63 6F 6F 6B 69 65 00 00 }

$si1 = "HttpSendRequestW" fullword

$si2 = "CreateNamedPipeW" fullword

$si3 = "CreateThread" fullword

$se1 = "DllGetClassObject" fullword

condition:

(uint16(0) == 0x5A4D) and (uint32(uint32(0x3C)) == 0x00004550) and (uint16(uint32(0x3C)+0x18) == 0x020B) and all of them

}

rule M_Hunting_VEILEDSIGNAL_4

{

meta:

author = "Mandiant"

disclaimer = "This rule is meant for hunting and is not tested to run in a production environment"

md5 = "404b09def6054a281b41d309d809a428, c6441c961dcad0fe127514a918eaabd4"

strings:

$sb1 = { FF 15 FC 76 01 00 8B F0 85 C0 74 ?? 8D 50 01 [6-16] FF 15 [4] 48 8B D8 48 85 C0 74 ?? 89 ?? 24 28 44 8B CD 4C 8B C? 48 89 44 24 20 }

$sb2 = { 33 D2 33 C9 FF 15 [4] 4C 8B CB 4C 89 74 24 28 4C 8D 05 [2] FF FF 44 89 74 24 20 33 D2 33 C9 FF 15 }

$si1 = "CreateThread" fullword

$si2 = "MultiByteToWideChar" fullword

$si3 = "LocalAlloc" fullword

$se1 = "DllGetClassObject" fullword

condition:

(uint16(0) == 0x5A4D) and (uint32(uint32(0x3C)) == 0x00004550) and (uint16(uint32(0x3C)+0x18) == 0x020B) and all of them

}

rule M_Hunting_VEILEDSIGNAL_5

{

meta:

author = "Mandiant"

disclaimer = "This rule is meant for hunting and is not tested to run in a production environment"

md5 = "6727284586ecf528240be21bb6e97f88"

strings:

$sb1 = { 48 8D 15 [4] 48 8D 4C 24 4C E8 [4] 85 C0 74 ?? 48 8D 15 [4] 48 8D 4C 24 4C E8 [4] 85 C0 74 ?? 48 8D 15 [4] 48 8D 4C 24 4C E8 [4] 85 C0 74 ?? 48 8D [3] 48 8B CB FF 15 [4] EB }

$ss1 = "chrome.exe" wide fullword

$ss2 = "firefox.exe" wide fullword

$ss3 = "msedge.exe" wide fullword

$ss4 = "\\\\.\\pipe\\*" ascii fullword

$ss5 = "FindFirstFileA" ascii fullword

$ss6 = "Process32FirstW" ascii fullword

$ss7 = "RtlAdjustPrivilege" ascii fullword

$ss8 = "GetCurrentProcess" ascii fullword

$ss9 = "NtWaitForSingleObject" ascii fullword

condition:

(uint16(0) == 0x5A4D) and (uint32(uint32(0x3C)) == 0x00004550) and (uint16(uint32(0x3C)+0x18) == 0x020B) and all of them

}

rule M_Hunting_VEILEDSIGNAL_6

{

meta:

author = "Mandiant"

disclaimer = "This rule is meant for hunting and is not tested to run in a production environment"

md5 = "00a43d64f9b5187a1e1f922b99b09b77"

strings:

$ss1 = "C:\\Programdata\\" wide

$ss2 = "devobj.dll" wide fullword

$ss3 = "msvcr100.dll" wide fullword

$ss4 = "TpmVscMgrSvr.exe" wide fullword

$ss5 = "\\Microsoft\\Windows\\TPM" wide fullword

$ss6 = "CreateFileW" ascii fullword

condition:

(uint16(0) == 0x5A4D) and (uint32(uint32(0x3C)) == 0x00004550) and (uint16(uint32(0x3C)+0x18) == 0x010B) and all of them

}

rule M_Hunting_POOLRAT

{

meta:

author = "Mandiant"

disclaimer = "This rule is meant for hunting and is not tested to run in a production environment"

description = "Detects strings found in POOLRAT. "

md5 = "451c23709ecd5a8461ad060f6346930c"

strings:

$hex1 = { 6e 61 6d 65 3d 22 75 69 64 22 25 73 25 73 25 75 25 73 }

$hex_uni1 = { 6e 00 61 00 6d 00 65 00 3d 00 22 00 75 00 69 00 64 00 22 00 25 00 73 00 25 00 73 00 25 00 75 00 25 00 73 }

$hex2 = { 6e 61 6d 65 3d 22 73 65 73 73 69 6f 6e 22 25 73 25 73 25 75 25 73 }

$hex_uni2 = { 6e 00 61 00 6d 00 65 00 3d 00 22 00 73 00 65 00 73 00 73 00 69 00 6f 00 6e 00 22 00 25 00 73 00 25 00 73 00 25 00 75 00 25 00 73 }

$hex3 = { 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 25 73 25 73 25 73 25 73 }

$hex_uni3 = { 6e 00 61 00 6d 00 65 00 3d 00 22 00 61 00 63 00 74 00 69 00 6f 00 6e 00 22 00 25 00 73 00 25 00 73 00 25 00 73 00 25 00 73 }

$hex4 = { 6e 61 6d 65 3d 22 74 6f 6b 65 6e 22 25 73 25 73 25 75 25 73 }

$hex_uni4 = { 6e 00 61 00 6d 00 65 00 3d 00 22 00 74 00 6f 00 6b 00 65 00 6e 00 22 00 25 00 73 00 25 00 73 00 25 00 75 00 25 00 73 }

$str1 = "--N9dLfqxHNUUw8qaUPqggVTpX-" wide ascii nocase

condition:

any of ($hex*) or any of ($hex_uni*) or $str1

}

rule M_Hunting_FASTREVERSEPROXY

{

      meta:

      author = "Mandiant"

      disclaimer = "This rule is meant for hunting and is not tested to run in a production environment"

      md5 = "19dbffec4e359a198daf4ffca1ab9165"

      strings:

      $ss1 = "Go build ID:" fullword

      $ss2 = "Go buildinf:" fullword

      $ss3 = "net/http/httputil.(*ReverseProxy)." ascii

      $ss4 = "github.com/fatedier/frp/client" ascii

      $ss5 = "\"server_port\"" ascii

      $ss6 = "github.com/armon/go-socks5.proxy" ascii

      condition:

      uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and all of them

}

Snort Rules

alert tcp any any -> any any (msg:"Possible malicious 3CXDesktopApp Identified"; content:"raw.githubusercontent.com/IconStorages/images/main/"; threshold:type limit, track by_src, count 1, seconds 3600; sid: 99999999;)

 

alert tcp any any -> any any (msg:"Possible malicious 3CXDesktopApp Identified"; content:"3cx_auth_id=%s\;3cx_auth_token_content=%s\;__tutma=true"; threshold:type limit, track by_src, count 1, seconds 3600; sid: 99999999;)

 

alert tcp any any -> any any (msg:"Possible malicious 3CXDesktopApp Identified"; content:"__tutma"; threshold:type limit, track by_src, count 1, seconds 3600; sid: 99999999;)

 

alert tcp any any -> any any (msg:"Possible malicious 3CXDesktopApp Identified"; content:"__tutmc"; threshold:type limit, track by_src, count 1, seconds 3600; sid: 99999999;)

Mandiant Security Validation

Organizations can validate their security controls using the following actions with Mandiant Security Validation.

VIDName
A106-319Command and Control - UNC4736, DNS Query, Variant #1
A106-321Command and Control - UNC4736, DNS Query, Variant #2
A106-323Command and Control - UNC4736, DNS Query, Variant #3
A106-324Host CLI - UNC4736, 3CX Run Key, Registry Modification
A106-322Malicious File Transfer - UNC4736, SUDDENICON, Download, Variant #1
S100-272Evaluation: UNC4736 Conducting Supply Chain Attack Targeting 3CX Phone Management System

 

※本ブログは、2023年4月20日に公開されたブログ「3CX Software Supply Chain Compromise Initiated by a Prior Software Supply Chain Compromise; Suspected North Korean Actor Responsible」の日本語抄訳版です。