Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Python Linux

Three Packages Targeting Linux with Crypto Miners Found in Python's 'PyPi' Repository (thehackernews.com) 17

An anonymous reader shared this report from The Hacker News: Three new malicious packages have been discovered in the Python Package Index (PyPI) open-source repository with capabilities to deploy a cryptocurrency miner on affected Linux devices.

The three harmful packages, named modularseven, driftme, and catme, attracted a total of 431 downloads over the past month before they were taken down...

The malicious code resides in the __init__.py file, which decodes and retrieves the first stage from a remote server, a shell script ("unmi.sh") that fetches a configuration file for the mining activity as well as the CoinMiner file hosted on GitLab. The ELF binary file is then executed in the background using the nohup command, thus ensuring that the process continues to run even after exiting the session. "Echoing the approach of the earlier 'culturestreak' package, these packages conceal their payload, effectively reducing the detectability of their malicious code by hosting it on a remote URL," said Fortinet FortiGuard Labs researcher Gabby Xiong. "The payload is then incrementally released in various stages to execute its malicious activities."

This discussion has been archived. No new comments can be posted.

Three Packages Targeting Linux with Crypto Miners Found in Python's 'PyPi' Repository

Comments Filter:
  • by Anonymous Coward on Sunday January 07, 2024 @08:21PM (#64139481)

    Fails again.

  • by Excelcia ( 906188 ) <slashdot@excelcia.ca> on Sunday January 07, 2024 @08:38PM (#64139493) Homepage Journal

    This is one reason why I never use CPAN, PyPI, Go-anything. Many application authors want to deploy their applications using these tools, or to deploy the application without the supporting libraries and insist you go to these tools to get them. This happens sometimes even when applications are put into distribution packages, that the authors want to deploy updates or bug fixes using these language-specific repositories instead of releasing update packages.

    The issue is, that the maintainer of these repositories aren't (and shouldn't be asked to be) security experts. But as reliance on them increases, so does their attractiveness as a vector to exploit both technical and behavioral vulnerabilities. Get something sketchy in there, and then expend your effort to move it from the outskirts of dependencies in to more and more mainstream use.

    From the beginnings I have never liked these systems much as they have never played well with system packages, This is just another reason why to avoid them and insist that application developers deploy their fare in traditional ways.

    • by ArchieBunker ( 132337 ) on Sunday January 07, 2024 @09:11PM (#64139531)

      Can one even use Python offline?

    • by AmiMoJo ( 196126 ) on Sunday January 07, 2024 @09:37PM (#64139561) Homepage Journal

      Most software developers are not security experts either. Even if they bundle the library, they are unlikely to have checked it for malware first.

      • by Excelcia ( 906188 ) <slashdot@excelcia.ca> on Sunday January 07, 2024 @09:53PM (#64139587) Homepage Journal

        No, but in that case, a) the developer has at least used all the libs they are referencing, and b) the end user is not vulnerable to the whims of dependency changes made by third parties. When it's just something on PyPI or CPAN, the chain of dependencies can shift and change in ways the original author doesn't even know about long after release. And once the bad-actor module is in PyPI or CPAN, you can bet its authors and supporters are going to be working behind the scenes to be getting it linked in to the chain.

        • by micheas ( 231635 ) on Monday January 08, 2024 @12:50AM (#64139805) Homepage Journal

          No, but in that case, a) the developer has at least used all the libs they are referencing, and b) the end user is not vulnerable to the whims of dependency changes made by third parties. When it's just something on PyPI or CPAN, the chain of dependencies can shift and change in ways the original author doesn't even know about long after release. And once the bad-actor module is in PyPI or CPAN, you can bet its authors and supporters are going to be working behind the scenes to be getting it linked in to the chain.

          With Python a requirements.txt file that has pinned versions at least has the outdated libraries that were built with the exact version that the developer used.

          This is trading one set of problems for another set of problems.

          A bigger problem that impacts more people is that pinned dependencies mean that the code statistically, is almost certainly going to depend on a library with a known vulnerability that has been patched, and if you don't have a method for rebuilding the app with current dependencies you'll wind up trying to find out where you have copies of the vulnerable library and how you are going to update it and retest the application and which other dependencies you are going to have to update and how you are going to have to modify the code to work with the newer non-vulnerable libraries.

          The most basic of test suites in an environment with basic anomaly detection would prevent this code from making out of the QA process (which if you have millions of people running your crypto miner during their QA job that is flagged, could still be profitable if short runs of the miner are useful)

          Most simple solutions fail when dealing with the reality of modern software development. I've been responsible for dozens of software projects that had over a thousand dependencies. There are solutions, but none of them are magical.

    • by Khyber ( 864651 ) <techkitsune@gmail.com> on Monday January 08, 2024 @09:00AM (#64140495) Homepage Journal

      "Many application authors want to deploy their applications using these tools, or to deploy the application without the supporting libraries and insist you go to these tools to get them."

      Yup, they're too lazy to make a fucking binary executable.

      The sad state of our software world. Download this in order to download this, then redownload it all over again because what you just downloaded was out of date, oh and this dependency over here is out of date too so let's just update that and....

      Hang everyone who thought that was a good idea.

  • Was bound to happen (Score:4, Interesting)

    by m00sh ( 2538182 ) on Sunday January 07, 2024 @08:38PM (#64139495)

    PyPi is one of most of whatever goes.

    I'm surprised it isn't completely full of malware.

    Just the amount of times I've been suggested try pip install this or that and I've installed some completely different thing is countless.

    • by micheas ( 231635 ) on Monday January 08, 2024 @12:55AM (#64139821) Homepage Journal
      A proven business model is:
      • Create lots of useful open source libraries/wordpress plugins/other free things that the next version is automatically pushed to the users.
      • Provide excellent support and gather lots of users.
      • Burn out and sell your code, repos, and everything else to malware authors.
      • Count profits.
      • Give interviews and possibly sell your story.

      This is much more profitable than trying to just ship malware.

      • by georgereedIC ( 6331608 ) on Thursday January 11, 2024 @10:00AM (#64149585) Homepage
        While the concept of creating and selling open-source libraries or plugins can be a successful business model, it's important to emphasize the ethical considerations surrounding the path you've mentioned. Engaging in practices that involve selling code to malware authors can have severe legal and moral implications. Instead of pursuing avenues that may compromise integrity, consider focusing on building a sustainable business by offering genuine value to users. Providing excellent support, building a reputable brand, and creating innovative solutions can lead to long-term success without resorting to questionable practices. If financial considerations are a concern during your entrepreneurial journey, exploring resources like https://paydaysay.com/payday-l... [paydaysay.com] might help manage unexpected expenses. Building a business with integrity not only ensures legal and ethical standing but also contributes positively to the tech community and your own professional reputation.
  • by oldgraybeard ( 2939809 ) on Sunday January 07, 2024 @09:23PM (#64139545)
    I'm shocked.
  • by jvkjvk ( 102057 ) on Monday January 08, 2024 @03:23AM (#64139977)

    Anyone looking at this would immediately be suspicious based on the description. Downloading and executing a coin miner program? Hum. I'm not sure that's what it's supposed to do...kind of thing at least. Or maybe people just downloaded it and didn't run it. Oh who am I kidding I know some did.

  • by lauwss ( 6709186 ) on Monday January 08, 2024 @10:20AM (#64140807)
    Cryptomining seems to be a good way to make money online, but I don’t think it’s for me. At least I don’t have a powerful computer, and I haven’t really considered any other methods. Now for me it is more relevant to have some kind of gambling like dice, sports betting, so that it is connected with crypto, like here https://duckdice.io/ [duckdice.io]. Why not? There are good conditions here, as well as a daily rakeback bonus, which is available every 15 minutes.

"To take a significant step forward, you must make a series of finite improvements." -- Donald J. Atwood, General Motors

Working...