Blog
Inside the SOC
QakNote感染:ネットワークに基づく多様な攻撃経路の探索






刻々と変化する脅威の中で、世界中のセキュリティベンダーは、既知の攻撃ベクトルや脅威に対して迅速に適応し、反応し、対応することを強いられています。このような状況の中、悪意のある脅威アクターは、ネットワークにアクセスするための新しい方法を常に探しています。ネットワークの脆弱性を利用した新たな攻撃や、新しい配信方法など、攻撃者とその手法は絶えず進化しています。脅威インテリジェンスを活用して、ネットワークに対する既知の脅威を常に把握することは組織にとって重要ですが、インテリジェンスだけでは、ますます多様化する攻撃者から身を守るには不十分です。新たな脅威を検知し、それに対応できる自律的な意思決定者を持つことは、ネットワークの侵害を防ぐために最も重要なことです。
2023年1月末、脅威アクターはOneNoteの添付ファイルを悪用して、マルウェア株であるQakbotをユーザーのデバイスに配信するようになりました。この新しい配信方法が広く採用された結果、2023年1月末から2023年2月末までの間に、Darktraceの顧客ベースにおいてQakbotの感染が急増しました。自己学習型AIを活用した Darktrace は、キルチェーンの複数の段階でこの脅威を検知し、対応することで、顧客のネットワークに損害を与え、広範な侵害を防ぐことができました。
QakbotとOneNoteの最近の兵器化
Qakbotは、2007年に銀行情報などの機密データを盗むために設計されたバンキング型トロイの木馬として初めて登場しました。それ以来、Qakbotは、バックドア、ペイロード配信、偵察、ラテラルムーブメント、データ漏えいなどの機能を備えた、高度にモジュール化された多目的ツールに進化しています。Qakbotの主要な配信方法は常にEメールベースですが、脅威アクターは状況の変化に直面し、QakbotのEメールベースの配信方法を変更することが知られています。2022年前半、Microsoftは、XL4とVBAマクロをデフォルトでブロックするバージョンのOfficeの展開を開始しました[1]/[2]/[3]。この変更以前は、QakbotのEメールキャンペーンは、悪意のあるマクロを含むOfficeの添付ファイルを含む詐欺的なEメールの拡散で構成されているのが普通でした。マイクロソフトがマクロをデフォルトでブロックするようになったことで、脅威アクターはOffice添付ファイルによるQakbotの配信を中止し、HTMLスマグリングと呼ばれる手法で主にHTML添付ファイルを使用するようになったようです [4]/[5]。2022年5月にMicrosoft Support Diagnostic Tool(MSDT)のFollina脆弱性(CVE-2022-30190)が公開された後 [6]、Qakbotのアクターはこの脆弱性を利用して、Qakbotペイロードのメールベースの配信を促進すると見られています[7]/[8]/[9]。
QakbotのアクターがEメールベースの配信方法を適応させる傾向にあることを考えると、彼らが2022年12月に出現したOneNoteベースの斬新な配信方法をいち早く利用したことは驚くことではありません。2022年12月以降、脅威アクターはOneNoteの添付ファイルを使用して、Formbook [10] から AsynRAT [11] 、Emotet [12] まで、さまざまなマルウェア株を配信していることが確認されています。OneNoteドキュメントを悪用してマルウェアを配信することは、OneNoteがHTAファイル、CMDファイル、BATファイルなどの実行可能なファイルタイプを埋め込むことができるために可能になっているのです。2023年1月末、アクターはOneNoteの添付ファイルを利用してQakbotを配信し始めました[13]/[14]。Qakbotのアクターがこの新しい配信方法を採用したことで、より広い脅威ランドスケープとDarktrace の顧客ベース全体で、Qakbotの感染が急増することになりました。
観測された一連の活動
2023年1月31日から2月24日にかけて、Darktraceはその顧客基盤において以下の活動パターンのバリエーションを観察しました:
1. ユーザーの端末がOneNote関連のエンドポイントに通信する
2. ユーザーの端末が、空のHostヘッダー、5桁または6桁の数字と'.dat'で構成されるターゲットURI、cURLまたはPowerShellを参照するUser Agentヘッダーで外部GET要求を行う。このGETリクエストに対して、DLLファイルが応答する
3. ユーザーのデバイスが、ポート443および2222を介したSSL接続を珍しい外部エンドポイントに行い、ポート65400を介したTCP接続を23.111.114[.]52に行う
4. ユーザーのデバイスは、bonsars[.]com(IP:194.165.16[.]56)という外部ホストに対して443番ポートでSSL接続を行い、78.31.67[.]7に対して443番ポートでTCP接続を行う
5. ユーザーの端末が内部システムのEndpoint Mapperサービスを呼び出し、Service Control Manager(SCM)に接続する
6. ユーザーのデバイスが、アルゴリズムで生成された名前と「.dll」または「.dll.cfg」というファイル拡張子を持つファイルを、社内システムのSMB共有にアップロードする
7. ユーザー端末が「.dll」「.dll.cfg」ファイルをアップロードしたシステムに対してサービスコントロール要求を行う
これらの活動の連鎖をさらに調査したところ、悪意のあるOneNoteの添付ファイルとの相互作用によって開始されたQakbot感染の一部であることが判明しました。

配信フェーズ
悪意のあるOneNoteの添付ファイルをユーザーが操作した場合、デバイスがOneNote関連のエンドポイント(www.onenote[.]com、contentsync.onenote[.]com、learningtools.onenote[.]com など)へのHTTPS接続によって証明され、通常とは異なる外部エンドポイントからQakbot DLLを取得する結果となりました。悪意のあるOneNoteの添付ファイルをユーザーが操作した結果、cURLを使用してQakbot DLLを取得したケースもあれば、PowerShellを使用してQakbot DLLをダウンロードしたケースもありました。これらの結果は、武器となったOneNoteの添付ファイルに埋め込まれた実行ファイルの内容の違いを反映しています。cURLとPowerShellのUser Agentヘッダに加えて、これらのOneNote添付ファイルとの対話によって引き起こされたHTTPリクエストには、空のホストヘッダやターゲットURIの最後のセグメントが5桁または6桁と'.dat'からなるといった他の特徴もありました。




コマンド&コントロール フェーズ
Qakbot DLLを取得した後、ユーザーのデバイスは、ポート443および2222を介して非常に珍しい外部のエンドポイントに多数のSSL接続を行い、ポート65400を介して23.111.114[.]52に大量のTCP接続を行うことが確認されました。これらの接続は、Qakbotに感染したデバイスがコマンド&コントロール(C2)インフラストラクチャと通信していることを示していました。また、Qakbotに感染したデバイスは、xfinity[.]com、yahoo[.]com、verisign[.]com、oracle[.]com、broadcom[.]com などの正規エンドポイントに断続的に接続しているのが確認されており、おそらくQakbotによる接続チェックのためと考えられます。


Cobalt StrikeとVNCフェーズ
Qakbotに感染したデバイスは、C2サーバーとの通信を確立した後、外部エンドポイントである bonsars[.]com へのSSL接続と、外部エンドポイントである 78.31.67[.]7 へのTCP接続が確認されています。bonsars[.]comへのSSL接続はCobalt Strike BeaconからのC2接続であり、78.31.67[.]7へのTCP接続はQakbotのVNC (Virtual Network Computing) モジュールからのC2接続でした [15]/[16].これらの接続の発生は、行為者がQakbotの感染を利用して、VNCペイロードとともにCobalt Strike Beaconを感染したシステム上にドロップしたことを示しています。Cobalt StrikeとVNCの導入により、行為者はQakbotに感染したシステムへの「ハンズオンキーボード」アクセスが可能になったと思われます。


横移動のフェーズ
Qakbotに感染したシステムにCobalt Strike BeaconとVNCモジュールを投下した後、感染者は強化された足場を利用して、内部システムのサービスコントロールマネージャ(SCM)に接続し、ラテラルムーブメントに備えました。SCMに接続する前に、感染したシステムはEndpoint Mapperサービスを呼び出しており、内部システムで公開されているMicrosoft Remote Procedure Call(MSRPC)サービスを特定するためと思われます。MSRPCサービスであるService Control Manager(SCM)は、Cobalt Strikeがリモートシステム上でサービスを作成・開始するために悪用することが知られています。このサービスへの接続は、svcctl RPCインターフェースへのOpenSCManager2(Opnum:0x40)およびOpenSCManagerW(Opnum: 0xf)コールによって証明されました。

社内システムでSCMに接続した後、感染したデバイスはSMBを使用して、「.dll」「.dll.cfg」拡張子のファイルをSMB共有に配布していることが確認されました。これらのアップロードの後、svcctlインターフェースへのCreateWowService(Opnum:0x3c)の呼び出しがあり、アップロードされたペイロードを実行するためのものと思われます。アップロードされたファイルの命名規則から、それらはQakbotのペイロードであることがわかります。

幸いなことに、観測されたQakNoteの感染は、これ以上エスカレートすることはありませんでした。もしこれらの感染が拡大した場合、ランサムウェアのような追加の悪意のあるペイロードを広範囲に爆発させる結果になっていた可能性があります。
DarktraceによるQakNoteの活動のカバレッジ
図1は、Darktraceの顧客基盤で確認された QakNote 感染に関わるステップを示したものです。攻撃者がこのチェーンに沿ってどこまで進んだかは、次の3つの要因によって部分的に決定されます:
- 対象顧客が Darktrace/Email を利用しているかどうか
- 対象顧客が RESPOND/Network を利用しているかどうか
- Darktrace DETECT/Networkのアラートに対して、対象となる顧客が対処したかどうか
Darktrace/Email が存在すると、通常、QakNote 感染は初期感染段階を通過することができなくなります。RESPOND/Networkの存在により、観測されたアクティビティチェーンは大幅に減速しましたが、セキュリティチームによって軽減されずに放置された感染は、攻撃チェーンに沿ってさらに進行することができました。
Darktrace は、顧客ベースで検知されたQakNoteメールにさまざまなプロパティを確認しました。OneNoteの添付ファイルは通常、「application/octet-stream」ファイルまたは「application/x-tar」ファイルのいずれかとして検知されました。武器化されたOneNoteの添付ファイルには悪意のあるファイルが埋め込まれている場合もあれば、OneNoteファイルには代わりに悪意のあるリンク(通常は「.png」または「.gif」リンク)が埋め込まれている場合もありました。Darktrace が観測したすべてのケースで、QakNoteのメールは「RE」または「FW」で始まる件名を使用し、そのメールが既存のメールチェーンもしくはスレッドの一部であると受信者に思わせるように操作していました。また、ヘッダーに個人名を記載することで、受信者が知っているユーザーになりすますケースもありました。多くの場合、QakNoteのメールは、乗っ取られた可能性の高いメールアカウントから発信されたものと思われます。このようなソーシャルエンジニアリングは、既知の連絡先やサービスに対するユーザーの信頼を利用し、悪意のあるメールを開封させ、セキュリティツールによる検知を困難にするもので、脅威アクターがよく用いる手法です。
観測されたQakNoteのメールは、偽の返信方法を使用し、不明なEメールアカウントから送信され、異常なMIMEタイプの添付ファイルを含んでいたため、以下のDarktrace/Email モデルを侵害することになりました:
- Association / Unknown Sender
- Attachment / Unknown File
- Attachment / Unsolicited Attachment
- Attachment / Highly Unusual Mime
- Attachment / Unsolicited Anomalous Mime
- Attachment / Unusual Mime for Organisation
- Unusual / Fake Reply
- Unusual / Unusual Header TLD
- Unusual / Fake Reply + Unknown Sender
- Unusual / Unusual Connection from Unknown
- Unusual / Off Topic
既知のユーザーになりすましたQakNoteのメールは、以下のDETECT およびRESPOND/Email モデルを侵害しています:
- Unusual / Unrelated Personal Name Address
- Spoof / Basic Known Entity Similarities
- Spoof / Internal User Similarities
- Spoof / External User Similarities
- Spoof / Internal User Similarities + Unrelated Personal Name Address
- Spoof / External User Similarities + Unrelated Personal Name Address
- Spoof / Internal User Similarities + Unknown File
- Spoof / External User Similarities + Fake Reply
- Spoof / Possible User Spoof from New Address - Enhanced Internal Similarities
- Spoof / Whale
観測されたメールに対してDarktrace が取るアクションは、最終的にDarktrace/Email モデルに違反しているかどうかで決定されます。なりすましモデルに違反していないメール(なりすましインジケータがないため)は、「添付ファイルの変換」アクションを受け取りました。このアクションは、疑わしい添付ファイルを無効化されたPDFに変換するもので、この場合、悪意のあるOneNoteの添付ファイルをうまく非武装化しました。なりすましモデル(なりすましインジケータが存在するため)に違反したQakNoteメールには、最も強力なアクションである「メッセージを保留する」アクションが適用されました。このアクションは、疑わしいメールが受信者のEメールボックスに届くのを防ぐものです。



適切なEメールセキュリティツールがなかったためと思われますが、脅威アクターがQakNoteのキルチェーンの第1段階を通過できた場合、その後のステップの実行には、Darktrace/Networkからの強い介入がありました。
悪意のあるOneNoteの添付ファイルを使用すると、Hostヘッダーが空で、cURLまたはPowerShell User Agentヘッダーが付いたHTTP GETリクエストによって、デバイスがリモートサーバーからQakbot DLLを取得するようになりました。これらの異常なHTTP動作は、以下のDarktrace/Network のモデルブリーチを引き起こしました:
- Device / New User Agent
- Device / New PowerShell User Agent
- Device / New User Agent and New IP
- Anomalous Connection / New User Agent to IP Without Hostname
- Anomalous Connection / Powershell to Rare External
- Anomalous File / Numeric File Download
- Anomalous File / EXE from Rare External Location
- Anomalous File / New User Agent Followed By Numeric File Download
RESPOND/Networkが有効なお客様には、これらのブリーチにより、以下のような自律的なアクションが発生しました:
- Enforce group pattern of life for 30 minutes
- Enforce group pattern of life for 2 hours
- Block connections to relevant external endpoints over relevant ports for 2 hours
- Block all outgoing traffic for 10 minutes


Qakbot DLLのダウンロードに成功し、中断することなくQakbot C2サーバーに接続し、その後、Cobalt StrikeおよびVNC C2接続に至りました。これらのC2活動は、以下のDETECT/Networkモデルの違反につながりました:
- Compromise / Suspicious TLS Beaconing To Rare External
- Compromise / Large Number of Suspicious Successful Connections
- Compromise / Large Number of Suspicious Failed Connections
- Compromise / Sustained SSL or HTTP Increase
- Compromise / Sustained TCP Beaconing Activity To Rare Endpoint
- Compromise / Beaconing Activity To External Rare
- Compromise / Slow Beaconing Activity To External Rare
- Anomalous Connection / Multiple Connections to New External TCP Port
- Anomalous Connection / Multiple Failed Connections to Rare Endpoint
- Device / Initial Breach Chain Compromise
RESPOND/Networkが有効なお客様には、これらの違反により、RESPOND が自律的に以下のアクションを実行しました:
- Block connections to relevant external endpoints over relevant ports for 1 hour

C2接続が許可された場合、アクターはSMBとService Control Managerの使用を通じて横方向に移動しようとしました。このラテラルムーブメントにより、以下のDETECT/Network モデルに違反しました:
- Device / Possible SMB/NTLM Reconnaissance
- Anomalous Connection / New or Uncommon Service Control
RESPOND/Networkを有効にしているお客様には、これらの侵害により、RESPOND が自律的に以下の動作を行うようになりました:
- Block connections to relevant internal endpoints over port 445 for 1 hour

Darktraceの顧客ベースで観測された QakNote 感染にはいくつかのステップがあり、それぞれのステップでDarktrace からアラートと自律的な予防措置が引き出されました。 DETECTが発したアラートを自律的に深堀調査することで、DarktraceのCyber AI Analyst は、観測されたQakNote感染の異なるステップを1つのインシデントに結びつけることができました。そして、インシデントログを作成し、発見された活動の詳細な詳細を提示し、顧客のセキュリティチームに完全な可視性を提供しました。

結論
QakNote 感染という新たな脅威に直面したDarktrace は、常に進化し続ける脅威の中で、発生した脅威を自律的に検知し対応する能力を示しました。Darktrace が顧客ベースで観測した攻撃チェーンは、悪意のあるOneNoteの添付ファイルによるQakbotの配信、QakbotのC2通信のためのポート65400と2222の使用、「ハンズオンキーボード」活動のためのCobalt Strike BeaconとVNCの使用、ラテラルムーブメント用のSMBとサービスコントロールマネージャの使用です。
OneNoteベースの配信方法の斬新さにもかかわらず、Darktrace はキルチェーンのさまざまな段階で顧客ベース全体のQakNote感染を特定することができました。自律的な異常ベースの検知機能を使用して、異常な活動や予想される動作からの逸脱を特定します。Darktrace/Emailは、従業員に送信された悪意のあるQakNoteの添付ファイルを無効化する機能を備えています。Darktrace/Emailがアクティブでない場合、Darktrace/Networkが、Qakbotの感染によって必然的に発生する異常なネットワーク活動を検知し、その速度を低下させました。最終的には、Darktraceの製品によるこのような介入により、データ流出やランサムウェアの爆発など、感染がさらなる有害な活動につながることを防ぐことができました。
Darktrace は、Darktrace/Networkと Darktrace/Emailの両方を組み合わせることで、Eメールとネットワークの両方の環境を保護し、比類のないレベルのネットワークセキュリティをお客様に提供することができます。 DETECTと RESPONDを含む製品群により、Darktrace はお客様に比類ないレベルのネットワークセキュリティを提供し、お客様のネットワークに対する脅威を自律的に発見し、疑わしい活動が有害な侵害につながるのを防ぐために即座に介入することができます。
付録
MITRE ATT&CK マッピング
初期アクセス:
T1566.001 – Phishing: Spearphishing Attachment
実行:
T1204.001 – User Execution: Malicious Link
T1204.002 – User Execution: Malicious File
T1569.002 – System Services: Service Execution
ラテラルムーブメント:
T1021.002 – Remote Services: SMB/Windows Admin Shares
コマンド&コントロール:
T1573.002 – Encrypted Channel : Asymmetric Cryptography
T1571 – Non-Standard Port
T1105 – Ingress Tool Transfer
T1095 – Non-Application Layer Protocol
T1219 – Remote Access Software
IoC一覧
IPアドレスおよび/またはドメイン名:
- 103.214.71[.]45 - Qakbot download infrastructure
- 141.164.35[.]94 - Qakbot download infrastructure
- 95.179.215[.]225 - Qakbot download infrastructure
- 128.254.207[.]55 - Qakbot download infrastructure
- 141.164.35[.]94 - Qakbot download infrastructure
- 172.96.137[.]149 - Qakbot download infrastructure
- 185.231.205[.]246 - Qakbot download infrastructure
- 216.128.146[.]67 - Qakbot download infrastructure
- 45.155.37[.]170 - Qakbot download infrastructure
- 85.239.41[.]55 - Qakbot download infrastructure
- 45.67.35[.]108 - Qakbot download infrastructure
- 77.83.199[.]12 - Qakbot download infrastructure
- 45.77.63[.]210 - Qakbot download infrastructure
- 198.44.140[.]78 - Qakbot download infrastructure
- 47.32.78[.]150 - Qakbot C2 infrastructure
- 197.204.13[.]52 - Qakbot C2 infrastructure
- 68.108.122[.]180 - Qakbot C2 infrastructure
- 2.50.48[.]213 - Qakbot C2 infrastructure
- 66.180.227[.]60 - Qakbot C2 infrastructure
- 190.206.75[.]58 - Qakbot C2 infrastructure
- 109.150.179[.]236 - Qakbot C2 infrastructure
- 86.202.48[.]142 - Qakbot C2 infrastructure
- 143.159.167[.]159 - Qakbot C2 infrastructure
- 5.75.205[.]43 - Qakbot C2 infrastructure
- 184.176.35[.]223 - Qakbot C2 infrastructure
- 208.187.122[.]74 - Qakbot C2 infrastructure
- 23.111.114[.]52 - Qakbot C2 infrastructure
- 74.12.134[.]53 – Qakbot C2 infrastructure
- bonsars[.]com • 194.165.16[.]56 - Cobalt Strike C2 infrastructure
- 78.31.67[.]7 - VNC C2 infrastructure
Qakbot DLLに対するGETリクエストのターゲットURI:
- /70802.dat
- /51881.dat
- /12427.dat
- /70136.dat
- /35768.dat
- /41981.dat
- /30622.dat
- /72286.dat
- /46557.dat
- /33006.dat
- /300332.dat
- /703558.dat
- /760433.dat
- /210/184/187737.dat
- /469/387/553748.dat
- /282/535806.dat
Qakbot DLLに対するGETリクエストのUser Agentヘッダ:
- curl/7.83.1
- curl/7.55.1
- Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.19041.2364
- Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.17763.3770
- Mozilla/5.0 (Windows NT; Windows NT 10.0; en-GB) WindowsPowerShell/5.1.19041.2364
ダウンロードしたQakbotのDLLのSHA256ハッシュ:
- 83e9bdce1276d2701ff23b1b3ac7d61afc97937d6392ed6b648b4929dd4b1452
- ca95a5dcd0194e9189b1451fa444f106cbabef3558424d9935262368dba5f2c6
- fa067ff1116b4c8611eae9ed4d59a19d904a8d3c530b866c680a7efeca83eb3d
- e6853589e42e1ab74548b5445b90a5a21ff0d7f8f4a23730cffe285e2d074d9e
- d864d93b8fd4c5e7fb136224460c7b98f99369fc9418bae57de466d419abeaf6
- c103c24ccb1ff18cd5763a3bb757ea2779a175a045e96acbb8d4c19cc7d84bea
内部で分散しているQakbotのDLLの名前:
- rpwpmgycyzghm.dll
- rpwpmgycyzghm.dll.cfg
- guapnluunsub.dll
- guapnluunsub.dll.cfg
- rskgvwfaqxzz.dll
- rskgvwfaqxzz.dll.cfg
- hkfjhcwukhsy.dll
- hkfjhcwukhsy.dll.cfg
- uqailliqbplm.dll
- uqailliqbplm.dll.cfg
- ghmaorgvuzfos.dll
- ghmaorgvuzfos.dll.cfg
中和されたQakNoteのEメール添付ファイル内に発見されたリンク:
- hxxps://khatriassociates[.]com/MBt/3.gif
- hxxps://spincotech[.]com/8CoBExd/3.gif
- hxxps://minaato[.]com/tWZVw/3.gif
- hxxps://famille2point0[.]com/oghHO/01.png
- hxxps://sahifatinews[.]com/jZbaw/01.png
- hxxp://87.236.146[.]112/62778.dat
- hxxp://87.236.146[.]112/59076.dat
- hxxp://185.231.205[.]246/73342.dat
参考文献
[1] https://techcommunity.microsoft.com/t5/excel-blog/excel-4-0-xlm-macros-now-restricted-by-default-for-customer/ba-p/3057905
[2] https://techcommunity.microsoft.com/t5/microsoft-365-blog/helping-users-stay-safe-blocking-internet-macros-by-default-in/ba-p/3071805
[3] https://learn.microsoft.com/en-us/deployoffice/security/internet-macros-blocked
[4] https://www.cyfirma.com/outofband/html-smuggling-a-stealthier-approach-to-deliver-malware/
[5] https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/html-smuggling-the-hidden-threat-in-your-inbox/
[6] https://twitter.com/nao_sec/status/1530196847679401984
[7] https://www.fortiguard.com/threat-signal-report/4616/qakbot-delivered-through-cve-2022-30190-follina
[8] https://isc.sans.edu/diary/rss/28728
[9] https://darktrace.com/blog/qakbot-resurgence-evolving-along-with-the-emerging-threat-landscape
[10] https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/trojanized-onenote-document-leads-to-formbook-malware/
[11] https://www.proofpoint.com/uk/blog/threat-insight/onenote-documents-increasingly-used-to-deliver-malware
[12] https://www.malwarebytes.com/blog/threat-intelligence/2023/03/emotet-onenote
[13] https://blog.cyble.com/2023/02/01/qakbots-evolution-continues-with-new-strategies/
[14] https://news.sophos.com/en-us/2023/02/06/qakbot-onenote-attacks/
[15] https://isc.sans.edu/diary/rss/29210
[16] https://unit42.paloaltonetworks.com/feb-wireshark-quiz-answers/
Like this and want more?
More in this series
Blog
Inside the SOC
PurpleFox in a Henhouse: How Darktrace Hunted Down a Persistent and Dynamic Rootkit



Versatile Malware: PurpleFox
As organizations and security teams across the world move to bolster their digital defenses against cyber threats, threats actors, in turn, are forced to adopt more sophisticated tactics, techniques and procedures (TTPs) to circumvent them. Rather than being static and predictable, malware strains are becoming increasingly versatile and therefore elusive to traditional security tools.
One such example is PurpleFox. First observed in 2018, PurpleFox is a combined fileless rootkit and backdoor trojan known to target Windows machines. PurpleFox is known for consistently adapting its functionalities over time, utilizing different infection vectors including known vulnerabilities (CVEs), fake Telegram installers, and phishing. It is also leveraged by other campaigns to deliver ransomware tools, spyware, and cryptocurrency mining malware. It is also widely known for using Microsoft Software Installer (MSI) files masquerading as other file types.
The Evolution of PurpleFox
The Original Strain
First reported in March 2018, PurpleFox was identified to be a trojan that drops itself onto Windows machines using an MSI installation package that alters registry values to replace a legitimate Windows system file [1]. The initial stage of infection relied on the third-party toolkit RIG Exploit Kit (EK). RIG EK is hosted on compromised or malicious websites and is dropped onto the unsuspecting system when they visit browse that site. The built-in Windows installer (MSIEXEC) is leveraged to run the installation package retrieved from the website. This, in turn, drops two files into the Windows directory – namely a malicious dynamic-link library (DLL) that acts as a loader, and the payload of the malware. After infection, PurpleFox is often used to retrieve and deploy other types of malware.
Subsequent Variants
Since its initial discovery, PurpleFox has also been observed leveraging PowerShell to enable fileless infection and additional privilege escalation vulnerabilities to increase the likelihood of successful infection [2]. The PowerShell script had also been reported to be masquerading as a .jpg image file. PowerSploit modules are utilized to gain elevated privileges if the current user lacks administrator privileges. Once obtained, the script proceeds to retrieve and execute a malicious MSI package, also masquerading as an image file. As of 2020, PurpleFox no longer relied on the RIG EK for its delivery phase, instead spreading via the exploitation of the SMB protocol [3]. The malware would leverage the compromised systems as hosts for the PurpleFox payloads to facilitate its spread to other systems. This mode of infection can occur without any user action, akin to a worm.
The current iteration of PurpleFox reportedly uses brute-forcing of vulnerable services, such as SMB, to facilitate its spread over the network and escalate privileges. By scanning internet-facing Windows computers, PurpleFox exploits weak passwords for Windows user accounts through SMB, including administrative credentials to facilitate further privilege escalation.
Darktrace detection of PurpleFox
In July 2023, Darktrace observed an example of a PurpleFox infection on the network of a customer in the healthcare sector. This observation was a slightly different method of downloading the PurpleFox payload. An affected device was observed initiating a series of service control requests using DCE-RPC, instructing the device to make connections to a host of servers to download a malicious .PNG file, later confirmed to be the PurpleFox rootkit. The device was then observed carrying out worm-like activity to other external internet-facing servers, as well as scanning related subnets.
Darktrace DETECT™ was able to successfully identify and track this compromise across the cyber kill chain and ensure the customer was able to take swift remedial action to prevent the attack from escalating further.
While the customer in question did have Darktrace RESPOND™, it was configured in human confirmation mode, meaning any mitigative actions had to be manually applied by the customer’s security team. If RESPOND had been enabled in autonomous response mode at the time of the attack, it would have been able to take swift action against the compromise to contain it at the earliest instance.
攻撃の概要

Initial Scanning over SMB
On July 14, 2023, Darktrace detected the affected device scanning other internal devices on the customer’s network via port 445. The numerous connections were consistent with the aforementioned worm-like activity that has been reported from PurpleFox behavior as it appears to be targeting SMB services looking for open or vulnerable channels to exploit.
This initial scanning activity was detected by Darktrace DETECT, specifically through the model breach ‘Device / Suspicious SMB Scanning Activity’. Darktrace’s Cyber AI Analyst™ then launched an autonomous investigation into these internal connections and tied them into one larger-scale network reconnaissance incident, rather than a series of isolated connections.

As Darktrace RESPOND was configured in human confirmation mode, it was unable to autonomously block these internal connections. However, it did suggest blocking connections on port 445, which could have been manually applied by the customer’s security team.

特権昇格
The device successfully logged in via NTLM with the credential, ‘administrator’. Darktrace recognized that the endpoint was external to the customer’s environment, indicating that the affected device was now being used to propagate the malware to other networks. Considering the lack of observed brute-force activity up to this point, the credentials for ‘administrator’ had likely been compromised prior to Darktrace’s deployment on the network, or outside of Darktrace’s purview via a phishing attack.
Exploitation
Darktrace then detected a series of service control requests over DCE-RPC using the credential ‘admin’ to make SVCCTL Create Service W Requests. A script was then observed where the controlled device is instructed to launch mshta.exe, a Windows-native binary designed to execute Microsoft HTML Application (HTA) files. This enables the execution of arbitrary script code, VBScript in this case.


There are a few MSIEXEC flags to note:
- /i : installs or configures a product
- /Q : sets the user interface level. In this case, it is set to ‘No UI’, which is used for “quiet” execution, so no user interaction is required
Evidently, this was an attempt to evade detection by endpoint users as it is surreptitiously installed onto the system. This corresponds to the download of the rootkit that has previously been associated with PurpleFox. At this stage, the infected device continues to be leveraged as an attack device and scans SMB services over external endpoints. The device also appeared to attempt brute-forcing over NTLM using the same ‘administrator’ credential to these endpoints. This activity was identified by Darktrace DETECT which, if enabled in autonomous response mode would have instantly blocked similar outbound connections, thus preventing the spread of PurpleFox.

Installation
On August 9, Darktrace observed the device making initial attempts to download a malicious .PNG file. This was a notable change in tactics from previously reported PurpleFox campaigns which had been observed utilizing .MOE files for their payloads [3]. The .MOE payloads are binary files that are more easily detected and blocked by traditional signatured-based security measures as they are not associated with known software. The ubiquity of .PNG files, especially on the web, make identifying and blacklisting the files significantly more difficult.
The first connection was made with the URI ‘/test.png’. It was noted that the HTTP method here was HEAD, a method similar to GET requests except the server must not return a message-body in the response.
The metainformation contained in the HTTP headers in response to a HEAD request should be identical to the information sent in response to a GET request. This method is often used to test hypertext links for validity and recent modification. This is likely a way of checking if the server hosting the payload is still active. Avoiding connections that could possibly be detected by antivirus solutions can help keep this activity under-the-radar.


The server responds with a status code of 200 before the download begins. The HEAD request could be part of the attacker’s verification that the server is still running, and that the payload is available for download. The ‘/test.png’ HEAD request was sent twice, likely for double confirmation to begin the file transfer.

Subsequent analysis using a Packet Capture (PCAP) tool revealed that this connection used the Windows Installer user agent that has previously been associated with PurpleFox. The device then began to download a payload that was masquerading as a Microsoft Word document. The device was thus able to download the payload twice, from two separate endpoints.
By masquerading as a Microsoft Word file, the threat actor was likely attempting to evade the detection of the endpoint user and traditional security tools by passing off as an innocuous text document. Likewise, using a Windows Installer user agent would enable threat actors to bypass antivirus measures and disguise the malicious installation as legitimate download activity.
Darktrace DETECT identified that these were masqueraded file downloads by correctly identifying the mismatch between the file extension and the true file type. Subsequently, AI Analyst was able to correctly identify the file type and deduced that this download was indicative of the device having been compromised.
In this case, the device attempted to download the payload from several different endpoints, many of which had low antivirus detection rates or open-source intelligence (OSINT) flags, highlighting the need to move beyond traditional signature-base detections.



If Darktrace RESPOND was enabled in autonomous response mode at the time of the attack it would have acted by blocking connections to these suspicious endpoints, thus preventing the download of malicious files. However, as RESPOND was in human confirmation mode, RESPOND actions required manual application by the customer’s security team which unfortunately did not happen, as such the device was able to download the payloads.
結論
The PurpleFox malware is a particularly dynamic strain known to continually evolve over time, utilizing a blend of old and new approaches to achieve its goals which is likely to muddy expectations on its behavior. By frequently employing new methods of attack, malicious actors are able to bypass traditional security tools that rely on signature-based detections and static lists of indictors of compromise (IoCs), necessitating a more sophisticated approach to threat detection.
Darktrace DETECT’s Self-Learning AI enables it to confront adaptable and elusive threats like PurpleFox. By learning and understanding customer networks, it is able to discern normal network behavior and patterns of life, distinguishing expected activity from potential deviations. This anomaly-based approach to threat detection allows Darktrace to detect cyber threats as soon as they emerge.
By combining DETECT with the autonomous response capabilities of RESPOND, Darktrace customers are able to effectively safeguard their digital environments and ensure that emerging threats can be identified and shut down at the earliest stage of the kill chain, regardless of the tactics employed by would-be attackers.
Credit to Piramol Krishnan, Cyber Analyst, Qing Hong Kwa, Senior Cyber Analyst & Deputy Team Lead, Singapore
付録
Darktraceによるモデル検知
- Device / Increased External Connectivity
- Device / Large Number of Connections to New Endpoints
- Device / SMB Session Brute Force (Admin)
- Compliance / External Windows Communications
- Anomalous Connection / New or Uncommon Service Control
- Compromise / Unusual SVCCTL Activity
- Compromise / Rare Domain Pointing to Internal IP
- Anomalous File / Masqueraded File Transfer
RESPOND Models
- Antigena / Network / Significant Anomaly / Antigena Breaches Over Time Block
- Antigena / Network / External Threat / Antigena Suspicious Activity Block
- Antigena / Network / Significant Anomaly / Antigena Significant Anomaly from Client Block
- Antigena / Network / Significant Anomaly / Antigena Enhanced Monitoring from Client Block
- Antigena / Network / External Threat / Antigena Suspicious File Block
- Antigena / Network / External Threat / Antigena File then New Outbound Block
IoC一覧
IoC - Type - Description
/C558B828.Png - URI - URI for Purple Fox Rootkit [4]
5b1de649f2bc4eb08f1d83f7ea052de5b8fe141f - File Hash - SHA1 hash of C558B828.Png file (Malware payload)
190.4.210[.]242 - IP - Purple Fox C2 Servers
218.4.170[.]236 - IP - IP for download of .PNG file (Malware payload)
180.169.1[.]220 - IP - IP for download of .PNG file (Malware payload)
103.94.108[.]114:10837 - IP - IP from Service Control MSIEXEC script to download PNG file (Malware payload)
221.199.171[.]174:16543 - IP - IP from Service Control MSIEXEC script to download PNG file (Malware payload)
61.222.155[.]49:14098 - IP - IP from Service Control MSIEXEC script to download PNG file (Malware payload)
178.128.103[.]246:17880 - IP - IP from Service Control MSIEXEC script to download PNG file (Malware payload)
222.134.99[.]132:12539 - IP - IP from Service Control MSIEXEC script to download PNG file (Malware payload)
164.90.152[.]252:18075 - IP - IP from Service Control MSIEXEC script to download PNG file (Malware payload)
198.199.80[.]121:11490 - IP - IP from Service Control MSIEXEC script to download PNG file (Malware payload)
MITRE ATT&CK マッピング
Tactic - Technique
Reconnaissance - Active Scanning T1595, Active Scanning: Scanning IP Blocks T1595.001, Active Scanning: Vulnerability Scanning T1595.002
Resource Development - Obtain Capabilities: Malware T1588.001
Initial Access, Defense Evasion, Persistence, Privilege Escalation - Valid Accounts: Default Accounts T1078.001
Initial Access - Drive-by Compromise T1189
Defense Evasion - Masquerading T1036
Credential Access - Brute Force T1110
Discovery - Network Service Discovery T1046
Command and Control - Proxy: External Proxy T1090.002
参考文献
- https://blog.360totalsecurity.com/en/purple-fox-trojan-burst-out-globally-and-infected-more-than-30000-users/
- https://www.trendmicro.com/en_us/research/19/i/purple-fox-fileless-malware-with-rookit-component-delivered-by-rig-exploit-kit-now-abuses-powershell.html
- https://www.akamai.com/blog/security/purple-fox-rootkit-now-propagates-as-a-worm
- https://www.foregenix.com/blog/an-overview-on-purple-fox
- https://www.trendmicro.com/en_sg/research/21/j/purplefox-adds-new-backdoor-that-uses-websockets.html
Blog
OT
$70 Million in Cyber Security Funding for Electric Cooperatives & Utilities



What is the Bipartisan Infrastructure Deal?
The Bipartisan Infrastructure Law passed by congress in 2021 aimed to upgrade power and infrastructure to deliver clean, reliable energy across the US to achieve zero-emissions. To date, the largest investment in clean energy, the deal will fund new programs to support the development and deployment of clean energy technology.
Why is it relevant to electric municipalities?
Section 40124 of the Bipartisan Infrastructure Law allocates $250 million over a 5-year period to create the Rural and Municipal Utility Cybersecurity (RMUC) Program to help electric cooperative, municipal, and small investor-owned utilities protect against, detect, respond to, and recover from cybersecurity threats.1 This act illuminates the value behind a full life-cycle approach to cyber security. Thus, finding a cyber security solution that can provide all aspects of security in one integrated platform would enhance the overall security posture and ease many of the challenges that arise with adopting multiple point solutions.
On November 16, 2023 the Office of Cybersecurity, Energy Security, and Emergency Response (CESER) released the Advanced Cybersecurity Technology (ACT) for electric utilities offering a $70 million funding opportunity that aims to enhance the cybersecurity posture of electric cooperative, municipal, and small investor-owned utilities.
Funding Details
10 projects will be funded with application submissions due November 29, 2023, 5:00 pm ET with $200,000 each in cash prizes in the following areas:
- Direct support for eligible utilities to make investments in cybersecurity technologies, tools, training, and improvements in utility processes and procedures;
- Funding to strengthen the peer-to-peer and not-for-profit cybersecurity technical assistance ecosystem currently serving eligible electric utilities; and
- Increasing access to cybersecurity technical assistance and training for eligible utilities with limited cybersecurity resources. 2
To submit for this award visit: https://www.herox.com/ACT1Prize
How can electric municipalities utilize the funding?
While the adoption of hybrid working patterns increase cloud and SaaS usage, the number of industrial IoT devices also continues to rise. The result is decrease in visibility for security teams and new entry points for attackers. Particularly for energy and utility organizations.
Electric cooperatives seeking to enhance their cyber security posture can aim to invest in cyber security tools that provide the following:
Compliance support: Consider finding an OT security solution that maps out how its solutions and features help your organization comply with relevant compliance mandates such as NIST, ISA, FERC, TSA, HIPAA, CIS Controls, and more.
Anomaly based detection: Siloed security solutions also fail to detect attacks that span
the entire organization. Anomaly-based detection enhances an organization’s cyber security posture by proactively defending against potential attacks and maintaining a comprehensive view of their attack surface.
Integration capabilities: Implementation of several point solutions that complete individual tasks runs the risk of increasing workloads for operators and creates additional challenges with compliance, budgeting, and technical support. Look for cyber security tools that integrate with your existing technologies.
Passive and active asset tracking: Active Identification offers accurate enumeration, real time updates, vulnerability assessment, asset validation while Passive Identification eliminates the risk of operational disruption, minimizes risk, does not generate additional network traffic. It would be ideal to find a security solution that can do both.
Can secure both IT and OT in unison: Given that most OT cyber-attacks actually start in IT networks before pivoting into OT, a mature security posture for critical infrastructure would include a single solution for both IT and OT. Separate solutions for IT and OT present challenges when defending network boundaries and detecting incidents when an attacker pivots from IT to OT. These independent solutions also significantly increase operator workload and materially diminish risk mitigation efforts.
Darktrace/OT for Electric Cooperatives and Utilities
For smaller teams with just one or two dedicated employees, Darktrace’s Cyber AI Analyst and Investigation features allow end users to spend less time in the platform as it compiles critical incidents into comprehensive actionable event reports. AI Analyst brings all the information into a centralized view with incident reporting in natural language summaries and can be generated for compliance reports specific to regulatory requirements.
For larger teams, Darktrace alerts can be forwarded to 3rd party platforms such as a SIEM, where security team decision making is augmented. Additionally, executive reports and autonomous response reduce the alert fatigue generally associated with legacy tools. Most importantly, Darktrace’s unique understanding of normal allows security teams to detect zero-days and signatureless attacks regardless of the size of the organization and how alerts are consumed.
Key Benefits of Darktrace/OT
- Anomaly-based detection and real-time response
- Secures IT, OT, and IoT in unison
- Active and Passive Asset Identification
- Automated security reporting
- Attack surface management and vulnerability assessment
- Covers all levels of the Purdue Model
.png)
参考文献
