من خلال اختراق عملية إصدار GitHub Actions في مستودعات RedHatInsights التابعة لشركة Red Hat، تمكن المهاجمون من نشر 64 نسخة خبيثة من 32 حزمة NPM لمنصة Red Hat Cloud Services في دليل NPM. تم نشر نسختين خبيثتين من كل حزمة NPM مخترقة، تحتوي كل منهما على شيفرة تُفعّل نوعًا جديدًا من دودة mini-shai-hulud، التي تبحث عن الرموز المميزة وبيانات الاعتماد في البيئة الحالية.
تم وضع الدودة في ملف index.js وتفعيلها عبر معالج ما قبل التثبيت الذي يتم استدعاؤه عند تثبيت حزمة مصابة. بمجرد تفعيلها، بحثت الدودة في النظام عن رموز الوصول إلى NPM (~/.npmrc)، وPyPI، وCircleCI، وAWS، وGCP، وDocker، وAzure، وHashiCorp، وKubernetesK8s، بالإضافة إلى مفاتيح SSH الخاصة. تم إرسال البيانات التي عثرت عليها إلى المهاجمين. في حال العثور على رمز NPM، نشرت الدودة تلقائيًا إصدارات خبيثة جديدة للحزم قيد التطوير في البيئة الحالية، مما أدى إلى إصابة شجرة التبعيات.
تم الحصول على صلاحيات الوصول إلى GitHub Actions عن طريق اختراق حساب أحد موظفي Red Hat، مما سمح للمهاجمين بدفع التغييرات مباشرةً إلى مستودعات javascript-clients وfrontend-components وplatform-frontend-ai-toolkit دون المرور بعملية المراجعة. أدخلت هذه التغييرات ملف ci.yaml في نظام التكامل المستمر، والذي بدوره، عند تشغيل عملية البناء، نفّذ سكربت _index.js باستخدام منصة bun. استخدم السكربت صلاحية "id-token: write" لطلب رمز OIDC (OpenID Connect) من GitHub، والذي استُخدم لاحقًا للمصادقة مع NPM عبر آلية "النشر الموثوق".
حزم NPM التي تحتوي على تعليمات برمجية خبيثة:
- @redhat-cloud-services/chrome (2.3.1, 2.3.2)
- @redhat-cloud-services/compliance-client (4.0.3, 4.0.4)
- @redhat-cloud-services/config-manager-client (5.0.4, 5.0.5)
- @redhat-cloud-services/entitlements-client (4.0.11, 4.0.12)
- @redhat-cloud-services/eslint-config-redhat-cloud-services (3.2.1, 3.2.2)
- @redhat-cloud-services/frontend-components (7.7.2, 7.7.3)
- @redhat-cloud-services/frontend-components-advisor-components (3.8.2)
- @redhat-cloud-services/frontend-components-config (6.11.3, 6.11.4)
- @redhat-cloud-services/frontend-components-config-utilities (4.11.2, 4.11.3)
- @redhat-cloud-services/frontend-components-notifications (6.9.2, 6.9.3)
- @redhat-cloud-services/frontend-components-remediations (4.9.2, 4.9.3)
- @redhat-cloud-services/frontend-components-testing (1.2.1, 1.2.2)
- @redhat-cloud-services/frontend-components-translations (4.4.1, 4.4.2)
- @redhat-cloud-services/frontend-components-utilities (7.4.1, 7.4.2)
- @redhat-cloud-services/hcc-feo-mcp (0.3.1, 0.3.2)
- @redhat-cloud-services/hcc-kessel-mcp (0.3.1, 0.3.2)
- @redhat-cloud-services/hcc-pf-mcp (0.6.1, 0.6.2)
- @redhat-cloud-services/host-inventory-client (5.0.3, 5.0.4)
- @redhat-cloud-services/insights-client (4.0.4, 4.0.5)
- @redhat-cloud-services/integrations-client (6.0.4, 6.0.5)
- @redhat-cloud-services/javascript-clients-shared (2.0.8, 2.0.9)
- @redhat-cloud-services/notifications-client (6.1.4, 6.1.5)
- @redhat-cloud-services/patch-client (4.0.4, 4.0.5)
- @redhat-cloud-services/quickstarts-client (4.0.11, 4.0.12)
- @redhat-cloud-services/rbac-client (9.0.3, 9.0.4)
- @redhat-cloud-services/remediations-client (4.0.4, 4.0.5)
- @redhat-cloud-services/rule-components (4.7.2, 4.7.3)
- @redhat-cloud-services/sources-client (3.0.10, 3.0.11)
- @redhat-cloud-services/topological-inventory-client (3.0.10, 3.0.11)
- @redhat-cloud-services/tsc-transform-imports (1.2.2)
- @redhat-cloud-services/types (3.6.1, 3.6.2, 3.6.4)
- @redhat-cloud-services/vulnerabilities-client (2.1.8, 2.1.9)
المصدر: opennet.ru
