
BufferZoneCorp Malicious Gems & Go Modules
Socket researchers traced the GitHub account BufferZoneCorp to a cluster of typosquatted RubyGems (knot-prefixed gems impersonating ActiveSupport, Devise, Rack/Rails, and RSpec tooling) and Go modules (mimicking go-retryablehttp, envconfig, and generic infra libraries) that shipped as dormant sleeper packages before later updates added credential theft, GitHub Actions and go.sum tampering, fake go binary wrappers on PATH, and SSH authorized_keys persistence. The Ruby gems exfiltrate SSH keys and AWS, npm, gh, and gitconfig credentials via extconf.rb install hooks to a webhook.site endpoint, while the Go modules disable GOSUMDB, poison GOPROXY, strip go.sum checksums, and hijack the go binary in CI runners. Go's Security team blocked the identified modules after disclosure, but the Ruby gems and GitHub account remained live at time of writing.
What it is
Socket's analysis of the BufferZoneCorp GitHub account, a supply-chain campaign spanning malicious Ruby gems and Go modules that impersonate real developer tooling. The value the summary doesn't carry is the full IOC list and the install-time execution mechanism.
How it works
The Ruby gem knot-activesupport-logger carries two malicious paths. The consequential one is install-time execution via extconf.rb: RubyGems runs this file automatically as part of the native-extension build, so it fires during gem install — before the advertised functionality is ever invoked. It filters environment variables for the keywords token, key, secret, pass, aws, github, api, auth, then reads these paths (up to 4 KB each):
~/.ssh/id_rsa, ~/.ssh/id_ed25519, ~/.aws/credentials,
~/.npmrc, ~/.gem/credentials, ~/.netrc,
~/.config/gh/hosts.yml, ~/.gitconfigResults are JSON-encoded and POSTed to a Base64-obfuscated endpoint (the snippet shows a webhook.site URL, overridable via PKG_ANALYTICS_URL). The second path is runtime, firing the first time the custom logger is used. Go modules instead tamper with GITHUB_ENV, poison GOPROXY, weaken go.sum checksums, plant fake go wrappers in workflow paths, and append a hardcoded key to ~/.ssh/authorized_keys.
Preconditions / Affected
Any host or CI runner that installs one of these packages. Known indicators:
Ruby gems: knot-activesupport-logger, knot-devise-jwt-helper, knot-rack-session-store, knot-rails-assets-pipeline, knot-rspec-formatter-json, knot-date-utils-rb (sleeper), knot-simple-formatter (sleeper)
Go modules (under github.com/BufferZoneCorp/): go-metrics-sdk, go-weather-sdk, go-retryablehttp, go-stdlib-ext, grpc-client, net-helper, config-loader, log-core (sleeper), go-envconfig (sleeper). go-stdlog was not yet published but already contained recon logic that runs on import and probes Docker/AWS metadata.
What to do
- Search dependency manifests and CI logs for the package names above.
- Treat any host that installed these as compromised: rotate SSH keys, AWS credentials, GitHub/gh tokens,
.npmrc/.netrc/RubyGems credentials, and audit~/.ssh/authorized_keysfor unrecognized keys. - On CI, inspect
GOPROXY,go.sumintegrity, andGITHUB_ENVwrites, and check for plantedgowrappers earlier inPATH.
Caveats
The Go modules were blocked by the Go Security team after disclosure, but at publication the Ruby gems and the GitHub account remained live — so gem-side exposure was ongoing. The keyword/path lists come from one analyzed sample; other variants differ, so absence of these exact strings does not clear a package on this list.
Organisations named here
- T1036.005
- T1059.004
- T1082
- T1195.001
- T1204.005
- T1526
- T1552.001
- T1552.004
- T1552.005
- T1567.004
- T1574.007
- T1613
Technologies named here
- Socket.dev
- RubyGems
- knot-activesupport-logger
- Go module ecosystem
- go-metrics-sdk
- GitHub Actions
- go-retryablehttp
- Developer/CI build environments
- go-stdlib-ext
- go-stdlog
- Go
- GitHub
- MITRE ATT&CK
- Socket
Techniques named here
- Supply chain compromise
- User Execution
- Masquerading
- Command and Scripting Interpreter
- Unsecured Credentials
- Account manipulation
- Hijack Execution Flow
- Exfiltration Over Web Service
- System Information Discovery
- File and Directory Discovery
- Cloud Service Discovery
- Container and Resource Discovery
- SSH Authorized Keys
Threat actors named here
- BufferZoneCorp
- knot-theory
Also named here
- T1083
Related in Supply Chain


