Malicious package · RubyGems
Malicious code in coincheck-main (RubyGems)
19.4.10No safe version. Remove it.What it does
The gem declares a native extension at ext/coincheck-main/extconf.rb that ships no C sources; instead of compiling anything it writes a stub Makefile ("all:\n\t@true") so the build appears to succeed, and executes a secret-collection routine during gem install. The routine reads installer credential files including ~/.aws/credentials, ~/.ssh private keys, ~/.gem/credentials, ~/.netrc, ~/.npmrc, ~/.kube/config,.env files and Rails master.key/credentials, dumps the full process environment, runs shell recon commands (id, kernel and network interface/route listings, process list, and git remote/last-commit of the surrounding repository), and queries cloud instance metadata at 169.254.169.254 for IAM role security-credentials and user-data as well as metadata.google.internal for the default service-account OAuth token. The collected report is deflated, base64-encoded and POSTed to hardcoded https://webhook.site/<token>/<tag> endpoints, with a DNS out-of-band fallback to oast.fun subdomains. The same CCPayload module is embedded in lib/coincheck-main.rb and lib/rubygems_plugin.rb and invoked at top level, so it also fires when the library is required and on every gem CLI invocation via the plugin autoload; a /tmp marker file (.ccgem_<tag>) enforces single-fire execution per host.
Reported by ossf-package-analysis The OpenSSF Package Analysis project identified 'coincheck-main' @ 19.4.10 (rubygems) as malicious.
It is considered malicious because:
The package communicates with a domain associated with malicious activity.
The package executes one or more commands associated with malicious behavior.
No fix · Remove and contain
gem uninstall coincheck-mainSources