RL Blog

Topics

All Blog PostsAppSec & Supply Chain SecurityDev & DevSecOpsProducts & TechnologySecurity OperationsThreat Research
Mario Vuksan

Gartner® Named RL a Software Supply Chain Security Visionary. Here’s What We See Coming

The first Magic Quadrant™ for Software Supply Chain Security comes as, we feel, the demand for greater supply chain visibility explodes.

Read More about Gartner® Named RL a Software Supply Chain Security Visionary. Here’s What We See Coming
Gartner® Named RL a Software Supply Chain Security Visionary. Here’s What We See Coming

Follow us

XX / TwitterLinkedInLinkedInFacebookFacebookInstagramInstagramYouTubeYouTubeblueskyBluesky

Subscribe

Get the best of RL Blog delivered to your in-box weekly. Stay up to date on key trends, analysis and best practices across threat intelligence and software supply chain security.

The inaugural Gartner® Magic Quadrant™ for Software Supply Chain Security is outWe're A Visionary
Skip to main content
Contact UsSupportBlogCommunity
reversinglabsReversingLabs: Home
Solutions
Secure Software OnboardingSecure Build & ReleaseProtect Virtual MachinesIntegrate Safe Open SourceGo Beyond the SBOM
Increase Email Threat ResilienceDetect Malware in File Shares & StorageAdvanced Malware Analysis SuiteICAP Enabled Solutions
Scalable File AnalysisHigh-Fidelity Threat IntelligenceCurated Ransomware FeedAutomate Malware Analysis Workflows
Products & Technology
Spectra Assure®Software Supply Chain SecuritySpectra DetectHigh-Speed, High-Volume, Large File AnalysisSpectra AnalyzeIn-Depth Malware Analysis & Hunting for the SOCSpectra IntelligenceAuthoritative Reputation Data & Intelligence
Spectra CoreIntegrations
Industry
Energy & UtilitiesFinanceHealthcareHigh TechPublic Sector
Partners
Become a PartnerValue-Added PartnersTechnology PartnersMarketplacesOEM Partners
Alliances
Resources
BlogContent LibraryCybersecurity GlossaryConversingLabs PodcastEvents & WebinarsLearning with ReversingLabsWeekly Insights Newsletter
Customer StoriesDemo VideosDocumentationOpenSource YARA Rules
Company
About UsLeadershipCareersSeries B Investment
Events
Press ReleasesIn the News
Pricing
Software Supply Chain SecurityMalware Analysis and Threat Hunting
Request a demo
Menu
Threat ResearchJune 1, 2022

Coinminer and npm: What you see is not always what you get

Package repository content can be different from source code repository content. Here's what your software team needs to know.

black and white photo of man
Karlo Zanki, Reverse Engineer at ReversingLabsKarlo Zanki
FacebookFacebookXX / TwitterLinkedInLinkedInblueskyBlueskyEmail Us
Coinminer and npm: What you see is not always what you get

Russia's war on Ukraine has resulted in increased malicious activity in cyberspace. Even before the Russian aggression started, malicious actors connected to the Russian state were quite active on the supply chain attack field, with the biggest incident probably being the SolarWinds compromise. Security analysts presume that more of these supply chain compromises exist — they just haven’t been detected or disclosed (yet).

Still, the growing number of software supply chain incidents is forcing the security community to improve security procedures and standards, in order to enforce verifiable security and integrity of software products. The SLSA framework is an example of a security framework designed to provide an industry standard to confront potential risks related to the software supply chain. The SLSA framework divides security threats into three main groups: source threats, build threats, and dependency threats, based on where the potential threat is introduced.

To detect and mitigate security risks, every piece of software should go through some form of software auditing to detect the presence of previously described threat types. However, many software development organizations aren’t yet aware of some of these threat vectors. They focus only on source code-related threats, letting the rest pass undetected. For example, source code analysis (SCA) helps you detect threats very early in the development process, lowering the costs of fixing the issue. But it shouldn’t be the only tool in your security tool belt. SCA can't assess the integrity of the precompiled dependencies or the integrity of your final deliverables. However, such elements have to be verified if you want to have confidence that the product you ship hasn’t been tampered with and doesn’t contain unwanted functionalities.

I know what you're thinking: "Sure. But how likely are we to be the target of a supply chain attack?" The answer is: more likely than you want to believe. Here's how a simple crypto mining functionality can unknowingly be included into your software if you rely only on the source code review.

Public Package Repositories: A Growing Risk

When looking at supply chain security, public software package repositories are becoming a pain point in the whole ecosystem. Malicious actors like to target package repositories for many reasons. The first is their growing popularity. Developers like to use public packages because they provide an easy way to implement new functionality. Developers need only install the package and upgrade the entire dependency tree. The second reason public packages are a target of attack is the lack of security practices governing them. As it stands, there is no standardized security protocol for including public packages from such repositories into private and proprietary software products. Finally, there is the fact that security analysis of packed software components is significantly harder than typical code reviews. This results in a foggy security view of the overall application. Rather than wade into that fog, however, developers often maintain an uncritical and unjustified trust that third-party components they use are secure. Or, they are willing to trade security for expedience - a faster way to implement needed functionality. Needless to say: this security compromise often comes at the cost of unexpected security compromises.

One of our previous blog posts described the problems developers can encounter when they wish to analyze native binary executables without access to the source code. In this instance, an npm package was discovered with its source code available in a GitHub repository, but that code differed from the contents of the npm package. According to the already mentioned SLSA framework, this would fall into the “using a bad dependency” threat category.

Contents of the npm repository were processed with our secure.software platform to extract behavior indicators from packages, which could reveal unexpected behaviors. A package named maintainancewebsite immediately looked suspicious, and spelling mistakes were not the only reason.

maintainancewebsite npm package

Figure 1: Description of the maintainancewebsite npm package

The npm package description suggests this is a “Generic temporary website replacement for pages currently in maintenance mode”. A developer would expect exactly and only that from such a package. However, the extracted behavior indicators suggest this package is capable of a bit more than it claims.

Figure 2: Behavior indicators extracted from the maintainancewebsite npm package

Figure 2: Behavior indicators extracted from the maintainancewebsite npm package

Mind the Crypto Mining

One of the observed behaviors is the presence of crypto mining-related domains. There is no legitimate reason for such a simple, temporary website to contain crypto mining domains. Looking at the extracted files shows that the HTML page downloads a crypto mining script from the coinhive.com domain. After a visitor lands on a webpage with the embedded script, the browser executes this script and starts using the visitor’s computer power to mine crypto currencies for the owner of this npm package.

Extracted crypto mining script

Figure 3: Extracted crypto mining script

But looking at the current state of the referenced GitHub repository doesn’t show any signs of such crypto mining activity. Only by looking at the commit history can you conclude that on September 17th 2017, the maintainer of this package published the code responsible for crypto mining, and only after user complaints had he removed the same from the codebase on July 19th, 2019. However, it still remained in the npm package repository ever since.

commit responsible for adding the crypto mining script

Figure 4: Commit responsible for adding the crypto mining script

Commit responsible for deleting the crypto mining script

Figure 5: Commit responsible for deleting the crypto mining script

This isn’t the only package with embedded coinhive crypto mining scripts. Another example are eye.js and display.js packages, which also had the same crypto mining script. Again, they were removed from the GitHub codebase only after user complaints. Unlike the author of the maintainancewebsite package, this developer published newer versions of the npm package with the coin mining script removed.

Description of the commits related to crypto mining in display.js package

Figure 6: Description of the commits related to crypto mining in display.js package

The obvious goal of these developers was to earn some extra money with small effort, and they were not ashamed to admit that. Deciding how they want to monetize their codebase is their prerogative, as long as they are transparent in how they are doing so.

Software Quality Assurance: A Focus on Application Behaviors

Shipping a dependency containing a crypto mining script with your software isn’t the worst thing that can happen, especially since the coinhive service has been shut down in the meantime. However, dependency based attacks like this can also be used to smuggle more serious malware into your software. That's why new security practices need to be adopted. Third-party dependencies and in-house software deliverables should be analyzed to ensure their quality and security.

ReversingLabs's secure.software platform helps improve the previously mentioned software aspects. It can detect the presence of potential malware and known software vulnerabilities inside your software package and its dependencies. The service generates a custom report with analysis results, software quality descriptions, and lots of valuable information. The base of the report is the Software Bill of Materials (SBOM), which contains information about all the components found inside the analyzed software package together with their dependencies. This SBOM can be exported to standard formats like CycloneDX.

SBOM part of an example report

Figure 7: SBOM part of an example report

Besides the SBOM, the report also contains information about known vulnerabilities affecting the discovered components. During software analysis, ReversingLabs advanced threat detection technologies are used to detect potential malware which, if present, also gets reported. The Software Quality Assurance platform is also capable of detecting sensitive information leaks and various other software quality issues, like absence of vulnerability mitigations or issues related to digital signatures.

Issues part of an example report

Figure 8: Issues part of an example report

What sets this product apart from other, similar solutions is the analysis of application behaviors. The generated report contains a list of human-readable behavior indicators extracted from the software components. This gives analysts an insight into individual capabilities of the components, and also the package as a whole.

Behavior indicators from an example report

Figure 9: Behavior indicators from an example report

In addition to the comprehensive list of behavior indicators, our Software Quality Assurance platform can extract differences in the behavior of two versions of the same software package. This way, analysts can pinpoint behavior changes to specific components inside the package; check if those behavior changes are expected; and see if they correspond to feature changes introduced in the latest software version. This enables early detection of anomalies in software behavior before the product is released.

Behavior indicator diff from eye.js package report

Figure 10: Behavior indicator diff from eye.js package report

In the case of maintainancewebsite and eye.js npm packages, the introduction of crypto mining capabilities in version 0.0.2 is clearly visible from behavior indicator differences, and can also be detected by looking at the extracted strings related to networking.

ReversingLabs technologies are capable of extracting a wide range of behavior indicators, enabling security analysts to detect various types of behavior - from networking capabilities to file system manipulations - for a wide range of platforms. The list of supported behavior indicators is continuously extended in order to improve detection capabilities.

Secure Software platform also gives analysts an option to write custom software quality or threat hunting policies based on these indicators, empowering them to use their specific knowledge and experience to enrich platform capabilities.

The Moral? Beware Dangerous Repos!

This blog tried to raise awareness about software supply chain risks related to the dependencies software relies on. Supply chain compromise can happen at several points, and a very common one is including bad dependencies from package repositories. Package repositories are becoming more popular every day, and at the same time, the packed code can be quite hard to analyze. This blog shows that you can’t rely on the contents of a package being identical to the code from its source code repository. One way to tackle these problems is to focus on the behavior of the packed dependencies, and the ReversingLabs Secure Software platform can significantly help you with that effort. It supports hundreds of file formats and can detect a wide range of software quality and security-related issues. The results of software package analysis are exported as a report that you can use to manage the risks related to detected issues across your organization. The earlier you detect a bad dependency, the lower the costs for removing that threat. Nevertheless, to make sure your software product contains only what you truly want, the final deliverables must also be checked and verified.

IOC list

https://www.npmjs.com/package/maintainancewebsite - removed in meantime

https://github.com/thaibault/maintenancewebsite

Version SHA1 hashes:

1.0.1 - e0691324cdae3b5d2b29e88f8cd70995aecb4a26

1.0.2 - ff779aaadd58a00dc359a787b309889b8135e936

1.0.3 - 91d5a0edae003b445cf18fa5e8d0c5de5a97e2b8

1.0.4 - 851bb8dc98be4b8fac429eb856fb0796a6654fb6

https://www.npmjs.com/package/eye.js

https://github.com/arguiot/EyeJS

https://www.npmjs.com/package/display.js

https://github.com/arguiot/DisplayJS

Keep learning

  • Get up to speed on the Agentic Development Security tools landscape in this June 18 webinar with Forrester Sr. Analyst Janet Worthington.
  • Learn why binary analysis is a must-have control in the Gartner® CISO Playbook for Commercial Software Supply Chain Security.
  • Take a deep dive on the state of software security with RL's Software Supply Chain Security Report 2026. Plus: See the the webinar discussing the findings.

Explore RL's Spectra suite: Spectra Assure for software supply chain security, Spectra Detect for scalable file analysis, Spectra Analyze for malware analysis and threat hunting, and Spectra Intelligence for reputation data and intelligence.

Tags:Threat Research

More Blog Posts

Device code phishing

Device code phishing bypasses password stealing

The Microsoft 365 phishing campaign persuades victims to complete a real authentication process that authorizes an attacker-controlled device.

Learn More about Device code phishing bypasses password stealing
Device code phishing bypasses password stealing
Cloud security ITScape

How to defend ARM64 cloud infrastructure from ITScape

RL has documented CVE-2026-46316, and developed two YARA rules to help detect exploits of the multi-tenant cloud vulnerability.

Learn More about How to defend ARM64 cloud infrastructure from ITScape
How to defend ARM64 cloud infrastructure from ITScape
Social Engineering Attacks Target One Tutorial at a Time

Phishing attacks leverage TikTok, Instagram Reels

RL has discovered two social engineering attack techniques targeting users via short-form videos. Here’s how they work.

Learn More about Phishing attacks leverage TikTok, Instagram Reels
Phishing attacks leverage TikTok, Instagram Reels
Thousands of developer projects compromised in npm hack

How 56 npm packages used binding.gyp to steal secrets

The attack is notable for its breadth, flooding npm with malicious package versions.

Learn More about How 56 npm packages used binding.gyp to steal secrets
How 56 npm packages used binding.gyp to steal secrets

Spectra Assure Free Trial

Get your 14-day free trial of Spectra Assure for Software Supply Chain Security

Get Free TrialMore about Spectra Assure Free Trial
Blog
Events
About Us
Webinars
In the News
Careers
Demo Videos
Cybersecurity Glossary
Contact Us
reversinglabsReversingLabs: Home
Privacy PolicyCookiesImpressum
All rights reserved ReversingLabs © 2026
XX / TwitterLinkedInLinkedInFacebookFacebookInstagramInstagramYouTubeYouTubeblueskyBlueskyRSSRSS
Back to Top