• Articles
    • Editorial Articles
    • Research Articles
    • WatchGuard Articles
  • The 443 Podcast
  • Threat Landscape
  • About
    • About Us
    • Contact Us
    • Contribute to Secplicity

Secplicity - Security Simplified

Powered by WatchGuard Technologies

Python Modules: Not As Safe As You Think

June 28, 2021 By Trevor Collins

 

We normally think of malware and threats coming from executables, packages, and scripts. Researchers recently found a supply chain attack using a different method.

Programs use Python scripts to manage and run services. You especially see this in Unix-based operating systems. When it comes to security many professionals use Python to automate tasks. Because of the prevalence of Python, especially in IT and IT security, any successful supply chain attack on Python would create disastrous consequences. The problem comes when programmers assume the downloaded module can’t infect their device outside of the local scripting environment. As you will learn, this isn’t true.

Researchers at Sonatype recently found multiple modules that programmers can add to their Python scripts that contain the cryptominer Ubqminer. Sonatype found, multiple modules use a form of typosquatting to make the name of their malicious module look similar to the legitimate module, “matplotlib.” An unsuspecting user may download the fake module and install it. The module then downloads the aforementioned cryptominer and runs it in the background. Like most malicious cryptominers, users would experience a slowdown on their computer while mining cryptocurrency for the script’s author.

Attackers have seen some success exploiting this type of attack using JavaScript modules, but we have yet to see it spread into Python programing as much. When running any Python script or module, treat it as unknown software until you review the script. Only trust well-known modules and ensure you download the right one (watch out for purposely obscured misspellings). If you must use an unknown module be sure you run it in a virtual environment to test the results.

Share This:

Related

Filed Under: Editorial Articles Tagged With: python, typosquatting

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

The 443 Podcast

A weekly podcast featuring the leading white-hat hackers and security researchers. Listen Now
the 443 podcast

Threat Landscape

Filter and view Firebox Feed data by type of attack, region, country, and date range. View Now
threat landscape

Top Posts

  • Cybersecurity News: Free Cybersecurity Training, TrickBot Group Exposed, Major GoDaddy Breach, and Russia to Legalize cybercrime?!
  • US National Cybersecurity Strategy
  • 3CX Supply Chain Attack
  • Here Come The Regulations

Email Newsletter

Sign up to get the latest security news and threat analysis delivered straight to your inbox

By signing up you agree to our Privacy Policy.


The views and opinions expressed on this website are those of the authors and do not necessarily reflect the policy or position of WatchGuard Technologies.

Stay in Touch

Recent Posts

  • 3CX Supply Chain Attack
  • The NSA’s Guidance on Securing Authentication
  • Cybersecurity News: LastPass Incident Revealed, White House Issues Cybersecurity Strategy, FBI Purchases Leaked USHOR PII Data, and a Slew of Other Breaches
  • An Update on Section 230
  • Here Come The Regulations
View All

Search

Archives

Copyright © 2023 WatchGuard Technologies · Cookie Policy · Privacy Policy · Terms of Use