StubMaker Typosquatting on RubyGems

Malicious RubyGems Packages Steal Credentials, Crypto Wallets

HIGH
August 18, 2026
5m read
Supply Chain AttackMalwarePhishing

Related Entities

Organizations

OpenSourceMalware

Products & Tech

RubyGems GitHubTelegram

Other

StubMaker

Full Report

Executive Summary

A new software supply chain attack, codenamed 'StubMaker', has been discovered targeting developers on the RubyGems package repository. Researchers uncovered 16 malicious, typosquatted packages that, when installed, deploy a Windows information-stealing malware. The campaign uses a multi-stage infection process involving a Rust-based loader and a Go-based stealer payload. The infostealer is designed to exfiltrate a wide range of sensitive data, including browser credentials, cryptocurrency wallets, and Telegram session data. The incident underscores the persistent threat of typosquatting attacks in open-source ecosystems and the sophisticated methods threat actors use to compromise developer environments.

Threat Overview

The 'StubMaker' campaign, discovered on August 15, 2026, by OpenSourceMalware, leverages typosquatting to trick developers into installing malicious packages. The package names are subtle misspellings of legitimate, popular gems (e.g., brumdler instead of bundler). The threat actor also demonstrated advanced platform abuse by successfully claiming the namespace of a previously legitimate but 'yanked' (removed) gem, allowing them to publish a malicious version under a name that developers might have previously trusted.

The 16 malicious gems were published by two user accounts, 'Riley Miller' and 'Alex Davis', and have since been removed by the RubyGems security team. The campaign's sole purpose appears to be the widespread distribution of information-stealing malware to compromise developer machines.

Technical Analysis

The attack chain is multi-staged to evade detection:

  1. Initial Access (T1192): A developer inadvertently installs a typosquatted gem using the command gem install <malicious_package>.
  2. Execution (T1059.006): During the installation process, a Ruby hook (e.g., in the extconf.rb file) is executed. This script contains code to download the next stage payload from an external source, in this case, a GitHub repository.
  3. Staging (T1105): The Ruby script downloads a Rust-based loader. Using Rust for the loader can help evade some signature-based antivirus detection.
  4. Defense Evasion / Execution: The Rust loader decrypts and executes the final payload in memory. The payload is a Go-based information stealer. Using Go makes it easy for the attacker to cross-compile the malware for different operating systems, although this campaign specifically targets Windows.
  5. Collection (T1555): The infostealer harvests sensitive information from the compromised machine. Its targets include:
    • Credentials from Chromium-based browsers (cookies, saved passwords).
    • Cryptocurrency wallet files and seed phrases.
    • Session data from the Telegram desktop application.
  6. Exfiltration (T1041): The collected data is bundled and exfiltrated to an attacker-controlled command-and-control (C2) server.

Impact Assessment

The compromise of a developer's machine is a high-impact event. Stolen browser credentials can lead to the compromise of personal and corporate accounts. Stolen cryptocurrency wallets can result in immediate financial loss. Most significantly, stolen source code, API keys, or other credentials from a developer's machine can be used to launch a much larger supply chain attack against their employer or the software they contribute to. This initial foothold on a developer workstation is often the first step in a more devastating attack on an organization's crown jewels.

IOCs — Directly from Articles

No specific C2 IPs, domains, or file hashes were provided in the source articles. The malicious packages have been removed from RubyGems.

Cyber Observables — Hunting Hints

To hunt for this or similar supply chain attacks:

Type
Command Line Pattern
Value
gem install brumdler
Description
Look for installation of gems with names that are common misspellings of popular packages.
Type
Network Traffic Pattern
Value
Outbound network connections from ruby.exe or gem.exe during package installation to non-rubygems.org domains.
Description
This is a strong indicator of a malicious installation script.
Type
Process Name
Value
ruby.exe spawning powershell.exe or curl.exe
Description
A Ruby process initiating network connections or running system commands during installation is highly suspicious.
Type
File Path
Value
Check gem list output for typosquatted gems.
Description
Regularly audit installed packages on developer machines.

Detection & Response

  • Dependency Auditing: Regularly use security tools to scan project dependencies for known vulnerabilities and for typosquatted packages. Tools like bundler-audit can help.
  • Network Monitoring: Monitor and restrict outbound network traffic from build servers and developer workstations. Alert on connections to unknown or suspicious domains, especially during package installation processes. D3FEND's Outbound Traffic Filtering is key.
  • Endpoint Detection (EDR): EDR solutions can detect suspicious process chains, such as gem.exe spawning a network connection to GitHub followed by the execution of a downloaded binary.
  • Developer Training: Educate developers on the risks of typosquatting. Encourage them to double-check package names before installation and to be wary of packages with few downloads or recent publication dates.

Mitigation

  • Use a Private Registry: For enterprise environments, consider hosting a private, vetted mirror of public package repositories. This allows you to control exactly which packages and versions are available to your developers. This aligns with D3FEND's Executable Allowlisting.
  • Lock Dependencies: Use lockfiles (e.g., Gemfile.lock) to ensure that builds are reproducible and use exact, known-good versions of dependencies. This prevents a malicious update from being pulled in automatically.
  • Code Signing and Verification: Encourage the use of packages that are cryptographically signed, and configure package managers to verify these signatures where possible.
  • Principle of Least Privilege: Developer accounts should not have administrative privileges on their workstations unless absolutely necessary. Build and test processes should run in isolated environments (e.g., containers) with no access to sensitive data or the host system.

Timeline of Events

1
August 15, 2026
The 'StubMaker' campaign is discovered by security researchers.
2
August 18, 2026
Details of the campaign are publicly reported, and the malicious packages are confirmed to have been removed from RubyGems.
3
August 18, 2026
This article was published

MITRE ATT&CK Mitigations

Use a private, vetted package repository instead of allowing developers to pull directly from public sources.

Mapped D3FEND Techniques:

Regularly audit installed packages and their dependencies on developer machines and build servers.

Mapped D3FEND Techniques:

Restrict and monitor outbound network connections from developer and build environments to prevent malicious callbacks.

Educate developers about the dangers of typosquatting and best practices for verifying package authenticity.

D3FEND Defensive Countermeasures

To effectively combat supply chain attacks like 'StubMaker', organizations must implement strict outbound traffic filtering for developer workstations and build environments. The attack relies on an installation script making an outbound call to download a second-stage payload from GitHub. A 'deny-by-default' egress policy would block this connection. Configure firewalls to only allow outbound traffic to known, approved destinations. For package installation, this would mean allowing connections to the official RubyGems IP ranges but denying connections to arbitrary locations like raw.githubusercontent.com. Any blocked attempt should trigger a security alert, enabling security teams to investigate the source process (gem.exe) and identify the malicious package, thereby stopping the attack before the infostealer is even downloaded.

For organizations with mature security programs, integrating dynamic analysis (sandboxing) into the CI/CD pipeline can proactively detect malicious packages. Before a new or updated dependency is allowed into the local repository or a production build, it should be automatically installed in an isolated, instrumented sandbox environment. The sandbox would monitor the installation process for suspicious behaviors, such as file system writes outside the package directory, unexpected network callbacks, or the spawning of new processes (like curl or powershell). If the 'StubMaker' gem were installed in such a sandbox, its attempt to download a payload from GitHub would be immediately flagged as malicious behavior, causing the build to fail and alerting security. This automates the detection of malicious installation scripts and prevents them from ever reaching a developer's machine.

Timeline of Events

1
August 15, 2026

The 'StubMaker' campaign is discovered by security researchers.

2
August 18, 2026

Details of the campaign are publicly reported, and the malicious packages are confirmed to have been removed from RubyGems.

Sources & References

Article Author

Jason Gomes

Jason Gomes

• Cybersecurity Practitioner

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.

Threat Intelligence & AnalysisSecurity Orchestration (SOAR/XSOAR)Incident Response & Digital ForensicsSecurity Operations Center (SOC)SIEM & Security AnalyticsCyber Fusion & Threat SharingSecurity Automation & IntegrationManaged Detection & Response (MDR)

Editorial Standards & Analyst Review

CyberNetSec.io uses automation to assist source monitoring, deduplication, observable extraction, and structured intelligence generation. Published analysis follows human-defined editorial standards and adds defensive context including MITRE ATT&CK, D3FEND, STIX, and Sigma where applicable. Read our editorial policy.

Tags

Supply Chain AttackRubyGemsTyposquattingInfostealerMalware

📢 Share This Article

Help others stay informed about cybersecurity threats

🎯 MITRE ATT&CK Mapped

Every tactic, technique, and sub-technique used in this threat has been identified and mapped to the MITRE ATT&CK framework for consistent, actionable threat language.

🧠 Enriched & Analyzed

Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.

🛡️ Actionable Guidance

Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.

🔗 STIX Visualizer

Structured threat data is packaged as a STIX 2.1 bundle and can be visualized as an interactive graph — relationships between actors, malware, techniques, and indicators.

Sigma Generator

Sigma detection rules are derived from the threat techniques in this article and can be converted for deployment across any major SIEM or EDR platform.