Protect.Computer
NEWS

PolinRider Plants Python Loaders in 375 GitHub Repos

· 3 min read · Malicious byte Data hijack
PolinRider Plants Python Loaders in 375 GitHub Repos

PolinRider, a campaign linked to North Korean threat actors that turns developers’ GitHub repositories into a malware delivery channel, now has a Python version. Software supply-chain firm SafeDep reports that on November 24 it found the same loader in 375 public repositories belonging to 260 accounts. The loader is 58 lines of Python that hides in a small utils package or in conftest.py, the file the pytest test runner loads automatically. When Python imports it, the code reads the newest transaction an Ethereum wallet sent to itself, decodes the transaction’s input data as JavaScript and runs it with Node.js. That script reads a second wallet to find the command-and-control server (95.135.181[.]84 since November 12, per SafeDep), then hands the next stage to a detached node -i process.

Because the instructions live on a blockchain, taking a server down does not stop the loader; the operators only change what the wallet says. SafeDep says no package on PyPI or npm carries this loader, and that in the three example applications it checked, the documented start commands fail with an import error before the loader runs, whereas pytest runs it through conftest.py. The Hacker News adds that the exact payload is unknown, but earlier waves installed a stealer for environment secrets, browser passwords, cookies and wallet data. THN also relays Apiiro’s estimate that PolinRider has been found in at least 7,609 GitHub repositories owned by 2,330 accounts, with the loader pushed to 2,040 repositories between October 27 and November 6. We could not read Apiiro’s page (Cloudflare challenge), so those figures are THN’s. THN also describes an account that opened more than 200 pull requests against projects including AsyncAPI Generator, CircuitVerse and Open Food Facts and force-pushed the payload away after 30 to 40 minutes, so the final diff looked clean.

Related earlier coverage: 13 Malicious NuGet Packages Hide in Fake .NET Job Tests (another fake-assessment campaign aimed at developers; the sources we read do not tie it to PolinRider) and Compromised joyfill npm Packages Install RAT on Import.

How to check if you’re affected

Affected products are public GitHub repositories that contain the loader, and any computer that imported or ran one (pytest, a script next to the planted utils folder, or the application started from that folder). SafeDep’s page lists all 375 repositories as of November 24.

  • Look in your own repositories for an unexpected utils package, import lines for it in application files, and a conftest.py that calls the Ethplorer API (api.ethplorer.io) and then runs node.
  • If you cloned asyncapi/generator or a fork of it, SafeDep gives these checks for two malicious commits: grep -rlE 'y7\(|rv\$mIJCKYxZ' --include='*.config.js' --include='api.js' ., grep -n 'node api.js' package.json, and git cat-file -e 0e2d800 / git cat-file -e a891829.
  • On a computer that ran the loader with Node.js, SafeDep says to treat it as compromised: rotate the secrets in that shell environment and the passwords and session cookies saved in its browsers, move funds out of any wallet extension or file, and look for a node -i or node -e process with no terminal and connections to 95.135.181[.]84 or 95.135.181[.]151 on port 443 or 80.
  • If you own an infected repository, SafeDep says to delete the planted package, the import lines and the conftest.py loader, then clean the computers that push to it and replace their GitHub tokens and SSH keys; otherwise it gets infected again.
  • OpenSourceMalware’s cleanup guide for PolinRider (which covers the JavaScript variants, not this Python one specifically) says to do containment before rotating credentials, because a resident process can re-harvest the new ones. It suggests turning off VS Code’s “Task: Allow Automatic Tasks In Folder”, enabling branch protection that blocks force-pushes, and checking pull-request activity logs for “force pushed the branch” lines, since the malware rewrites commit metadata. It also says to rotate CI/CD tokens (Vercel, Netlify, Railway, Render), not only GitHub credentials.

Sources

Related reading