情况介绍网络安全研究人员发现GitHubActions目前正被攻击者滥用,黑客正在使用一种自动化的攻击方法在GitHub的服务器上挖掘加密货币Activity。GitHubActions是一种CI/CD解决方案,可以轻松设置重复性任务以自动化软件工作流程。这里描述的具体攻击是指将恶意的GitHubActions代码添加到那些从合法仓库fork出来的仓库中,并进一步创建一个pullrequest,让原始仓库维护者将代码合并回来。但是这种攻击不需要合法项目的维护者进行任何操作,同样可以攻击成功。研究人员还发现,恶意代码从GitLab加载了一个名字错误的加密货币挖矿软件npm.exe,然后利用攻击者的加密货币钱包地址进行挖矿活动。在报告相关事件后,研究人员还发现了很多针对GitHub项目的相同形式的攻击。分叉合法代码,添加恶意代码,然后合并代码就在本周,据一位名叫JustinPerdok的荷兰安全工程师称,攻击者选择了使用GitHubActions挖掘的GitHub项目存储库。这些代码库将使用GitHubActions来优化和实施CI/CD自动化和调度任务。这种特殊的攻击利用GitHub自己的基础设施,并在GitHub的服务器上传播恶意软件和加密货币挖掘软件。这种类型的攻击还涉及攻击者在启用GitHubActions的情况下分叉合法代码存储库。然后,攻击者会在分叉版本的代码库中注入恶意代码,并向原始代码库的维护者提交拉取请求以将代码合并回来。根据Perdok分享的一张截图,目前至少有95个代码库将成为攻击者的目标:但令人惊讶的是,整个攻击过程并不需要原项目的维护者批准攻击者发起的恶意Pullrequest。根据Perdok的说法,攻击者只需要提交一个PullRequest就可以触发攻击。对于具有自动化工作流程设置以通过GitHubActions验证传入的拉取请求的GitHub项目尤其如此。一旦为原始项目创建了PullRequest,GitHub的系统就会执行攻击者的代码,而恶意代码会指示GitHub的服务器检索并运行加密货币挖掘程序。Themaliciouspullrequestfornpm.exe,acryptocurrencyminingsoftwaredownloadedfromGitLab,callsautomationcodeandinstructsGiHubserverstodownloadacryptocurrencyminingprogramhostedonGitLab,andthisfileismislabelednpm.exe.Butthisnpm.exefilehasnothingtodowiththeofficialNodeJSinstallerorNodePackageManager(npm),asitisawell-knowncryptocurrencyminingprogram.根据研究人员的分析,攻击者启动npm.exe文件之后,会将他们的钱包地址以参数的形式传递进去:npm.exe--algorithmargon2id_chukwa2--poolturtlecoin.herominers.com:10380--walletTRTLv3ZvhUDDzXp9RGSVKXcMvrPyV5yCpHxkDN2JRErv43xyNe5bHBaFHUogYVc58H1Td7vodta2fa43Au59Bp9qMNVrfaNwjWP--passwordxo在Inthetestsrunbytheresearchers,acryptocurrencyminingprogramwouldconnecttotheturtlecoin.herominers.comminingpoolandstartcryptocurrencymining:ThereisalsoanimitationattackusingXMRigAfterpublishingrelatedresearchreports,researchershavefoundalargenumberofAttacksthatmimicthisform.Intheseattacks,attackersalsousemaliciousPullrequestsanduseGitHubActionstocompletecryptocurrencyminingattacks.Theresearchersalsofoundthatsomeattacksalsointroducedtheopen-sourceXMRigcryptocurrencyminerfromXMRig'sofficialGitHubcoderepository.Thewalletaddressfoundintheimitationattackisasfollows:49eqpX3Sn2d5cfJTevgZLGZGQmcdE37QE4TMJDmDcJeCG8DUgkbS5znSsU35Pk2HC1Lt99EnSiP9g74XpUHzTgxw23n5CkBThefollowingisthelistofminingpoolsandserversdefinedintheattacker’sci.ymlfile.fixit.ThisisnotthefirsttimethatattacksusingGitHubinfrastructurehaveappeared,andattacksusingGitHubActionsarebecomingmorefrequent.Justlastyear,researchersspecificallyreportedthatattackerswereusingGitHub'sinfrastructuretohosttheGitpaste-12wormbotnet.然而,与针对易受攻击的项目或设备的Gitpaste-12或OctopusScanner恶意软件不同,这种特殊攻击似乎只利用GitHub的服务器进行加密货币挖掘任务。
