攻擊者將惡意軟體嵌入到 32 個 Red Hat NPM 軟體包中。

攻擊者透過入侵紅帽 RedHatInsights 程式碼庫的 GitHub Actions 發布流程,向 NPM 目錄發布了 32 個針對紅帽雲端服務平台的 NPM 軟體包的 64 個惡意版本。每個被入侵的 NPM 軟體包都發布了兩個惡意版本,每個版本都包含啟動 mini-shai-hulud 蠕蟲新變種的程式碼,該蠕蟲會在當前環境中搜尋令牌和憑證。

該蠕蟲被植入 index.js 檔案中,並透過安裝受感染軟體包時調用的預安裝處理程序啟動。啟動後,蠕蟲會在系統中搜尋 NPM(~/.npmrc)、PyPI、CircleCI、AWS、GCP、Docker、Azure、HashiCorp 和 KubernetesK8s 的令牌,以及 SSH 私鑰。找到的資料會被傳送給攻擊者。如果找到 NPM 令牌,蠕蟲會自動為目前環境中正在開發的軟體包發布新的惡意版本,從而感染依賴樹。

攻擊者透過入侵紅帽員工的 GitHub Actions 帳戶獲得了存取權限,從而可以直接向 javascript-clients、frontend-components 和 platform-frontend-ai-toolkit 這三個程式碼倉庫推送提交,而無需經過審核流程。這些提交會在持續整合系統中插入一個 ci.yaml 檔案。當系統執行建置時,該檔案會使用 bun 平台執行 _index.js 腳本。該腳本利用「id-token: write」權限從 GitHub 請求 OIDC(OpenID Connect)令牌,然後透過「可信任發布」機制使用該令牌對 NPM 進行身份驗證。

包含惡意程式碼的 NPM 套件:

  • @redhat-c​​loud-services/chrome (2.3.1, 2.3.2)
  • @redhat-c​​loud-services/compliance-client(4.0.3、4.0.4)
  • @redhat-c​​loud-services/config-manager-client(5.0.4、5.0.5)
  • @redhat-c​​loud-services/entitlements-client(4.0.11、4.0.12)
  • @redhat-c​​loud-services/eslint-config-redhat-c​​loud-services (3.2.1, 3.2.2)
  • @redhat-c​​loud-services/frontend-components(7.7.2、7.7.3)
  • @redhat-c​​loud-services/frontend-components-advisor-components (3.8.2)
  • @redhat-c​​loud-services/frontend-components-config (6.11.3, 6.11.4)
  • @redhat-c​​loud-services/frontend-components-config-utilities (4.11.2, 4.11.3)
  • @redhat-c​​loud-services/frontend-components-notifications (6.9.2, 6.9.3)
  • @redhat-c​​loud-services/frontend-components-remediations (4.9.2, 4.9.3)
  • @redhat-c​​loud-services/frontend-components-testing (1.2.1, 1.2.2)
  • @redhat-c​​loud-services/frontend-components-translations (4.4.1, 4.4.2)
  • @redhat-c​​loud-services/frontend-components-utilities (7.4.1, 7.4.2)
  • @redhat-c​​loud-services/hcc-feo-mcp (0.3.1, 0.3.2)
  • @redhat-c​​loud-services/hcc-kessel-mcp (0.3.1, 0.3.2)
  • @redhat-c​​loud-services/hcc-pf-mcp (0.6.1, 0.6.2)
  • @redhat-c​​loud-services/host-inventory-client (5.0.3, 5.0.4)
  • @redhat-c​​loud-services/insights-client(4.0.4、4.0.5)
  • @redhat-c​​loud-services/integrations-client(6.0.4、6.0.5)
  • @redhat-c​​loud-services/javascript-clients-shared (2.0.8, 2.0.9)
  • @redhat-c​​loud-services/notifications-client(6.1.4、6.1.5)
  • @redhat-c​​loud-services/patch-client(4.0.4、4.0.5)
  • @redhat-c​​loud-services/quickstarts-client(4.0.11、4.0.12)
  • @redhat-c​​loud-services/rbac-client(9.0.3、9.0.4)
  • @redhat-c​​loud-services/remediations-client(4.0.4、4.0.5)
  • @redhat-c​​loud-services/rule-components(4.7.2、4.7.3)
  • @redhat-c​​loud-services/sources-client(3.0.10、3.0.11)
  • @redhat-c​​loud-services/topological-inventory-client (3.0.10, 3.0.11)
  • @redhat-c​​loud-services/tsc-transform-imports (1.2.2)
  • @redhat-c​​loud-services/types(3.6.1、3.6.2、3.6.4)
  • @redhat-c​​loud-services/vulnerabilities-client(2.1.8、2.1.9)

來源: opennet.ru

為具有 DDoS 保護、VPS VDS 服務器的站點購買可靠的主機 🔥 購買具備 DDoS 防護的可靠網站寄存服務,包括 VPS 和 VDS 伺服器 | ProHoster