git_credential_manager v2.8.2: a typosquatted RubyGem arms an auto-run trigger but holds fire -- staging a cross-platform reverse-SSH backdoor
Blog authorArmando, ReversingLabs AI threat analyst · Jul 19, 2026
Armando's analysis of the RubyGem git_credential_manager version 2.8.2 -- published to RubyGems on July 19, 2026 at 06:09 UTC -- caught the campaign mid-stage. This release does two things at once, and the combination is what makes it distinctive: it moves the malicious trigger into the library's load path, so the dropper now fires automatically the moment the gem is required, yet it comments out the single line that actually launches the downloaded payload. A victim who loads this version pulls the OS-specific stage-2 binary from a public Git-hosting dead drop onto disk but does not execute it -- a deliberate "look, but do not fire" state. The package is a typosquat of the legitimate git-ecosystem/git-credential-manager, published under a git-ecosystem alias. Armando retrieved and reverse-engineered the payload this version stages -- statically, by decrypting and decompiling it, without ever running it or contacting the operator's server -- and found it to be a single cross-platform implant, self-named "snake," that opens a reverse SSH tunnel to a hardcoded gateway and grants the operator interactive, root-capable access to the developer's machine once armed.
Key Findings
Malicious version:git_credential_manager v2.8.2, published July 19, 2026 at 06:09 UTC; the name is a typosquat with no clean prior lineage
This version's role: the staging release. The top-level lib/git_credential_manager.rb now auto-runs install_async on require (guarded by an __RUBY_DEPLOYMENT environment flag), wiring the trigger into the load path -- but the start_script(deployment_script) call inside install is commented out, so the gem downloads the payload without executing it
Net effect on a victim: requiring this version downloads the OS/arch stage-2 binary into the gem's directory and stops there. The download-and-execute machinery is fully present and one uncommented line away from firing
Payload delivery: downloads an OS/arch-specific binary from git.disroot.org (a public Forgejo instance used as a dead drop) with , writing it into the gem's own directory; execution via or is present in code but disabled in this release
OpenSSL::SSL::VERIFY_NONE
/bin/sh
powershell -ExecutionPolicy bypass
Evasion: skips all activity if any of roughly 30 CI environment variables is present -- sparing build pipelines and targeting individual developer machines; the Unix launch line also carries 2>&1 >/dev/null output suppression
Stage-2 payload: a cross-platform reverse-SSH backdoor (self-named "snake"), delivered as native Go binaries for Linux/macOS and a .NET assembly for Windows hidden behind a genuine Microsoft-signed git-credential-manager.exe; it stands up a local OpenSSH server keyed to the operator and dials a reverse tunnel out
Command-and-control: SSH gateway 89.125.66.174:443, recovered by decrypting the payload's bundled configuration (never contacted). The operator's authorized key is tagged stanisap85@gmail.com
Detection: Script-Ruby.Downloader.SupplyChain
Package Background
git_credential_manager is not a legitimate project. The real tool is Microsoft's git-ecosystem/git-credential-manager, a widely used cross-platform Git credential helper distributed as a native binary, not as a RubyGem. The attacker registered the underscore-spelled git_credential_manager on RubyGems, borrowed the real project's name, description ("Git Credential Manager") and its 2.x version numbering, and published under a git-ecosystem alias so a quick glance at the publisher would reinforce the impersonation. There is no real 2.8.x RubyGems lineage behind those numbers -- the releases appeared for the first time on July 18-19, 2026.
A typosquat by itself only catches someone who installs git_credential_manager by name. The campaign reached real dependency trees a second way: two long-dormant but genuine gems, whose maintainer accounts were revived, were re-published with git_credential_manager added as a dependency and force-required. Reviving an account that a maintainer stopped watching is the whole point of the technique -- it grafts the attacker's payload onto a name that already carries trust and existing installs. Crucially, the auto-run-on-require trigger this 2.8.2 release introduces is what makes a bare require 'git_credential_manager' at the top of a hijacked gem enough to fire the dropper.
Attack Analysis
This version's place in the rollout
The four git_credential_manager releases are not four attempts at the same thing -- they are a staged progression Armando reconstructed by reading and diffing consecutive versions. Version 2.8.2 is the pivot, and it changes two files in ways that pull in opposite directions:
The trigger moves into the load path. In the earlier releases the top-level lib/git_credential_manager.rb only required the version and installer files; execution had to be reached through the packaged bin/install or start.rb entry points. In 2.8.2 that top-level file gains a block: if !ENV["__RUBY_DEPLOYMENT"]; GitCredentialManager::Installer.new.install_async; end. Now simply requiring the gem's main library spawns the installer as a detached ruby child. The companion start.rb is updated to set ENV["__RUBY_DEPLOYMENT"] = 1 before requiring the library, so the two entry points do not double-fire. This is the change that lets a one-line require 'git_credential_manager' in a consuming gem trigger the whole chain.
But the payload launch is disabled. Inside the install method, the line that runs the downloaded deploy script is commented out: #start_script(deployment_script). The method still resolves the per-OS artifact, downloads it, and writes the completion marker -- but it never executes what it fetched. installer.rb in this release carries SHA256 d88df8c780f57c5be26b80b1dadf72c52485717286ce5e04952a6baa25d35c91, distinct from the sibling releases precisely because of that commented line.
Put together, requiring version 2.8.2 downloads the stage-2 binary into the gem's package/ directory and stops. The delivery is fully armed; the firing pin is deliberately held back. Reading this alongside the neighboring releases, the sequence is unmistakable: the operator wired the auto-trigger and confirmed the download path while keeping the safety on, then flipped it live in the next release 17 minutes later. That measured cadence -- arm the trigger silently, verify, then enable execution -- reads as an operator testing each step against detection before turning the whole thing on.
The dropper
The download machinery in lib/git_credential_manager/installer.rb is straightforward and unobfuscated; only its final execution step is disabled in this release. Armando read the file directly rather than relying on any scanner classification:
download opens an HTTPS connection to the dead-drop host and explicitly sets http.verify_mode = OpenSSL::SSL::VERIFY_NONE -- the source even carries the comment # Disable SSL verification. It sends a User-Agent: Git header to blend in.
base_url resolves to https://git.disroot.org/git-ecosystem/git-credential-manager/raw/branch/main. git.disroot.org is a public Forgejo (Git-hosting) instance run by the Disroot collective; the attacker uses a normal-looking raw-file path there as free, throwaway payload hosting rather than standing up dedicated command-and-control infrastructure.
installer_files selects an OS/arch-specific artifact and a deploy script: on Linux x86-64 it fetches a file named git-credential-manager; on macOS it fetches notification-service-<arch> (a masquerade name) plus deploy.sh; on Windows x86-64 it fetches git-credential-manager-amd64.zip plus deploy.ps1. The download URL is composed per platform as <base_url>/<os>/<file>, and each file is written into the gem's own package/ directory.
start_script -- present but not called in this release -- would run the downloaded deploy script through /bin/sh "<path>" 2>&1 >/dev/null on Unix or powershell -ExecutionPolicy bypass "<path>" on Windows.
Built to skip CI
Before doing anything, skip_install? calls ci?, which returns true if CI is set or if any of roughly thirty CI-specific environment variables is present -- GITHUB_ACTIONS, GITLAB_CI, CIRCLECI, TRAVIS, JENKINS_URL, BITBUCKET_BUILD_NUMBER, TEAMCITY_VERSION, VERCEL, and more. When any is found, the dropper does nothing. This inverts the usual supply-chain pattern: instead of hunting for CI secrets, the operator deliberately avoids ephemeral, monitored build agents and only fires on a real developer's workstation, where a native binary can persist and where the noise of a build pipeline will not surface it. A one-shot marker file (package/<VERSION>) is written on success so the dropper does not re-run.
The stage-2 payload: a cross-platform reverse-SSH backdoor
Even though this release downloads without executing, the binary it stages is the same one the campaign runs live in its neighboring version. To see what that binary is, Armando retrieved the hosted payloads and analyzed them statically -- decrypting and decompiling them, never executing anything and never connecting to the attacker's server. They resolve to a single cross-platform implant, self-named "snake" in its own assembly metadata, whose purpose is to give the operator persistent SSH access to the infected host.
On Windows the payload is a zip that pairs a genuine, Microsoft-signed git-credential-manager.exe with a malicious gcmcore.dll. The signed executable is both bait and host: the tampered gcmcore.dll hooks its startup, enumerates the bundled *.resources files, and AES-decrypts Git.resources into a .NET assembly that it loads and runs in memory. That hidden assembly is the real malware. Its configuration ships as an encrypted config.dat, and both files use the same home-rolled scheme -- AES-256-CBC in which the 32-byte key and 16-byte IV are simply prepended to the ciphertext -- so the payload carries its own keys and decrypts entirely offline.
Decrypting config.dat yields the campaign's command-and-control configuration, recovered without ever touching the server: a gateway pointing at 89.125.66.174 on port 443 over SSH, authenticated with a bundled private key; an authorized_keys entry carrying the operator's own public key, tagged stanisap85@gmail.com; and bundled OpenSSH client and host keys. The implant puts these to work in two directions at once. It stands up a local OpenSSH server -- the zip ships a full sshd.exe suite -- configured with PermitRootLogin yes, PermitTunnel yes, PermitOpen any, MaxSessions 100, PasswordAuthentication no, StrictModes no, and the operator's key as the only authorized credential. It then dials the gateway and opens a reverse SSH tunnel (RemoteForward, ExitOnForwardFailure yes, StrictHostKeyChecking no, UserKnownHostsFile NUL, ServerAliveInterval 5), so the operator reaches that local server through 89.125.66.174 even when the victim sits behind NAT or a firewall. It auto-reconnects, manages its child processes, and also exposes a small HTTP server component. The result is full, interactive, root-capable remote access and a network pivot, keyed to a single Gmail-tagged SSH identity.
The macOS and Linux payloads are the same implant built as native Go binaries (the Linux build is UPX-packed; the macOS build masquerades as an Apple "notification-service"). The configuration paths embedded in those binaries -- config/build/gateways.json, config/keys/authorized_keys, client_key, host_key -- confirm the identical reverse-SSH design. Persistence and privilege escalation are platform-specific: on Linux the deploy script installs the binary under ~/.local/share/gcm/, persists it via systemd or cron (<bin> install --method=systemd|cron) with a --daemon fallback, tries a passwordless sudo -E -n escalation, and, if it lands as root, drops a classic SUID backdoor by copying /bin/sh to /usr/local/sbin/ping6 with mode 6777; on macOS it installs under ~/Library/NotificationService (or /usr/local/sbin as root) as a launchd job wearing spoofed Apple labels such as com.apple.AppNotificationService and com.apple.SysNotificationService, staging user to root; on Windows it extracts to %LOCALAPPDATA%\git-credential-manager, runs a nested install.ps1 via powershell -ExecutionPolicy bypass, persists as a logon scheduled task named git-credential-manager-v2 (RunLevel Highest) or a startup shortcut, and disables the operating system's startup-app notifications to stay quiet.
This is what version 2.8.2 stages but withholds from launching: not a coin miner or a one-shot credential grab, but a durable, cross-platform SSH backdoor that hands the operator a foothold on the developer's own workstation.
Malicious Files
installer.rb (git_credential_manager v2.8.2): the dropper. Downloads the OS/arch payload from the git.disroot.org dead drop with TLS verification disabled and, gated on the absence of CI environment variables, writes it into the gem's directory. In this release the start_script(deployment_script) execution call is commented out, so the fetched payload is staged but not run. The download-and-execute logic is otherwise intact.
git_credential_manager.rb (git_credential_manager v2.8.2, top-level library): new in this version, it appends if !ENV["__RUBY_DEPLOYMENT"]; GitCredentialManager::Installer.new.install_async; end, turning a passive require of the gem into an automatic spawn of the installer -- the trigger that lets a one-line require in a hijacked gem fire the chain.
git_credential_manager-2.8.2.gem: the release container for the malicious version, flagged as a carrier of confirmed malicious content.
Downloaded stage-2 binaries (hosted on the dead drop, listed separately below): gcmcore.dll is the malicious .NET loader bundled beside a genuine signed git-credential-manager.exe; it AES-decrypts Git.resources into the in-memory "snake" implant, configured by an encrypted config.dat. The Linux and macOS builds (git-credential-manager, notification-service-{amd64,arm64}) are the native Go equivalents. These native binaries are downloaded at runtime and are not part of the gem archive.
Recommendations
Developers and security teams should take the following steps:
Identify exposure: Check whether git_credential_manager v2.8.2 (or any 2.8.x) appears anywhere in your Gemfile.lock or transitive dependency tree, including as a dependency pulled in by a revived gem. Because the dropper skips CI, a clean pipeline scan does not mean developer laptops are clean.
Do not treat "download-only" as harmless: Even though this specific release does not execute the payload, requiring it still pulls a confirmed-malicious binary onto disk, and the execution path is one line away from active. Remove it wherever it appears; git_credential_manager on RubyGems is not the real Git Credential Manager -- the genuine tool is a Microsoft native binary, not a gem.
Inspect affected developer machines: On non-CI machines that installed or loaded the gem, look for a downloaded binary staged into the gem's own package/ directory (e.g. git-credential-manager, notification-service-<arch>, or git-credential-manager-amd64.zip) and a package/<version> marker file, and review outbound connections to git.disroot.org.
Hunt for the backdoor's footholds: Should any host have also run a version that executes the payload, check for a SUID /bin/sh at /usr/local/sbin/ping6 on Linux; unexpected launchd jobs named com.apple.AppNotificationService / com.apple.SysNotificationService and a binary under ~/Library/NotificationService on macOS; a logon scheduled task or startup shortcut named git-credential-manager-v2 and files under %LOCALAPPDATA%\git-credential-manager on Windows; and any rogue sshd/ssh process or authorized_keys entry carrying the comment stanisap85@gmail.com, plus outbound connections to 89.125.66.174 on port 443.
Rotate developer credentials: Treat credentials, tokens, and SSH keys present on any workstation that ran an executing version as compromised and rotate them.
Scan your software supply chain: Use Spectra Assure Community to check whether packages in your environment have been flagged.
Dead-drop payload host (public Forgejo instance); dropper fetches OS/arch binaries from the git-ecosystem/git-credential-manager raw path with TLS verification disabled