GitHub Developer SSH Keys Targeted Through Malicious npm Packages

Home/BOTNET, Compromised, Exploitation, malicious cyber actors, Malware, Security Advisory, Security Update/GitHub Developer SSH Keys Targeted Through Malicious npm Packages

GitHub Developer SSH Keys Targeted Through Malicious npm Packages

Security researchers recently discovered two new malicious packages on the npm open source package manager. These packages utilized GitHub to store stolen Base64-encrypted SSH keys taken from developer systems.

Identified earlier this month, the malicious packages have now been removed from npm. A recent report by ReversingLabs, published today, emphasizes an ongoing trend where cybercriminals exploit open source package managers for malicious software supply chain campaigns.

In a broader context, the company indicated a significant surge, with a 1300% increase in malicious packages identified on open source package managers from 2020 to the end of 2023. These malicious packages vary from low-threat protestware to more sophisticated campaigns that deliver malware directly from open source packages.

GitHub Developer SSH Keys Targeted Through Malicious Package

The initial package, known as warbeast2000, is currently in the development stage but displayed malicious behavior in its latest version. Upon installation, it initiated a post-install script that retrieved and executed a JavaScript file. This script accessed the private SSH key from the id_rsa file in the /.ssh directory, uploading the Base64-encoded key to a GitHub repository under the control of the attacker.

The second package, kodiak2k, followed a similar modus operandi, exhibiting additional functionalities across its versions. These functionalities included invoking the Mimikatz hacking tool and executing various scripts.

ReversingLabs issued a warning about the concerning nature of these attacks, highlighting the focus on SSH keys that could grant unauthorized access to GitHub repositories, potentially jeopardizing proprietary code.

Fortunately, the impact of this campaign was limited, with warbeast2000 downloaded approximately 400 times and kodiak2k around 950 times.

Despite the relatively contained impact, ReversingLabs expressed apprehension regarding the growing reliance of malicious actors on open source software and development infrastructure, particularly platforms like GitHub, for hosting components of malicious command-and-control (C2) infrastructure.

The advisory states, “As open source malware becomes more prevalent, malicious actors are increasingly utilizing GitHub to bolster their campaigns. These malware packages often provide extensive features and detailed documentation, enabling even low-skilled hackers (‘script kiddies’) to deploy them.”

“As malicious actors evolve their techniques in crafting malware, developers and security researchers must remain vigilant for emerging threats within public repositories.”

To mitigate these threats, the company advised developers to perform a security assessment before integrating software or a library from package managers such as npm or PyPI.

IOCS

package_nameversionSHA1
warbeast20001.0.82da32a4c9e2c3f345f46c6e06d6eb41e13da13d9
warbeast20001.0.7ad888d4e2b05bee35acf61c3cc053ecdc5e6ffaf
warbeast20001.0.631abb6e4399138b33545ab5dfa3e12fe1ad4d16e
warbeast20001.0.5d4a94f63a25891377334909cd544656b16c2b198
warbeast20001.0.3ba5c8b0b76b798dea60110a296ba842702aacfa5
warbeast20001.0.2d94e7e9f1965c248e17a6629c68f55ffa810e5d5
warbeast20001.0.1f1317027456e02fa5c6cadaf897244fc28c24e31
warbeast20001.0.0663d74c7b76e5aae72ed45b3680fa3efbd17586d
kodiak2k1.0.42909927bd61f3466d777bbbff38fd844ed8f5c134
kodiak2k1.0.40c6693fa7d0272562dd56ce8b44c0e99dd1210e43
kodiak2k1.0.39e762e1456a89218661f97e3ae356c07d35c298e8
kodiak2k1.0.3724e376fbbb4c76b6b3c2572efeaa68053fa35202
kodiak2k1.0.357333b0ec183d34a104fd7b9a5f5b93541d39fed3
kodiak2k1.0.348f1311588eae8e2fb4eff6dad523198d49d4a766
kodiak2k1.0.315500ca40b5537f5b6782a143e8e2e9028b92de2d
kodiak2k1.0.30c6c77b4385978ab9cc1cab0826e75227d612b62a
kodiak2k1.0.299ccc6f5756bb99c5a4eea9e6abc84b79cb3ae6bd
kodiak2k1.0.288f1d36b074f2f6b7bc28718f88849a6aeb9dbbc6
kodiak2k1.0.25717fa522c6ee505002bf17d3e79385544834461e
kodiak2k1.0.24245f07892c85807e99a3d9da49677bbd6013ff4f
kodiak2k1.0.225117a318483b62cd40298358618e57350cc4158a
kodiak2k1.0.217165b6329ae524392812c534f9bb7e225e305ffe
kodiak2k1.0.20f6fda33768f859bc0b42bae40ac0c7dafa0f8d93
kodiak2k1.0.19e70476edc973548abba035993638c1bf3b829d54
kodiak2k1.0.18c1be7a6bd11236d1302fc6c0b206ec70b3b66d25
kodiak2k1.0.1655f6b8f098ce173f4bfba374fc6da3cd8e0ff435
kodiak2k1.0.15d80e1abd7efcd1304a3b5ce1f6302d3a7edaaad9
kodiak2k1.0.1413c0ff1347fe631974797aba94d17180ccc8eded
kodiak2k1.0.136f819af455a3b25edc1f27c938cbaaffdbf3d910
kodiak2k1.0.12401b2fcd9359215f2f70f39d7d0aa1d50ab09b43
kodiak2k1.0.11d0c75071fc20f03d1b6d35ce7240b03c2a79f5c7
kodiak2k1.0.10ed6e04e810ff085a1a208788e47cce9352ab58bf
kodiak2k1.0.91d5da7f3fbea3d3915bddeb4c223ba147667a6ba
kodiak2k1.0.8fa562e9f3374055812c463b8e36c113a2aafa61c
kodiak2k1.0.73198a29d70628d1b9feaf8f7215c667383007f48
kodiak2k1.0.694836b8471a22563c91d35df6f3a1f5b8e028aa7
kodiak2k1.0.579c4359c0c21c4a6c43062a6e9e894ca0bd5617a
kodiak2k1.0.4562238aff7746bdc60f891670c0c8bff46cebe02
kodiak2k1.0.396b336c4fddbd1d91a9d1eacb4c36441880ac5bf
kodiak2k1.0.2445922433303e38e227121046d38dd3f31a1d6e0
kodiak2k1.0.130fb4cb07089d4e5773e1f20f0a0b25c34aa20ea
kodiak2k1.0.09300a1ff6bc49aa3f0bfe46245a470f14fc7fac3

Second stage payloads:

SHA1
dba623bdad6bdb37359e047efcda34de4af5f518
9526b820a21fa70641361e061b0f99517ab1b184

‍Follow Us on: Twitter, InstagramFacebook to get the latest security news!

By | 2024-01-25T07:02:41+05:30 January 24th, 2024|BOTNET, Compromised, Exploitation, malicious cyber actors, Malware, Security Advisory, Security Update|

About the Author:

FirstHackersNews- Identifies Security

Leave A Comment

Subscribe to our newsletter to receive security tips everday!