antsrcsrctestnpm
antsrcsrctest is a confirmed malicious npm package (MAL-2026-10038) that steals credentials and exfiltrates sensitive data (malicious version 1.0.0). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in antsrcsrctest (npm)
What this malware does
The npm package antsrcsrctest masquerades as a "simple date formatting utility" (index.js exports a harmless formatDate() function that is never referenced by the malicious code) but is a credential-harvesting and cloud-metadata-stealing reconnaissance tool. It declares a preinstall: node preinstall.js hook, so the payload executes automatically on npm install, before the package is ever imported or used. preinstall.js collects os.hostname(), os.platform(), process.cwd(), and the victim's entire process.env (all environment variables, frequently containing API keys, tokens and secrets); fingerprints container context by checking for /.dockerenv and reading /proc/1/cgroup and /proc/self/mountinfo; runs local reconnaissance commands via child_process.execSync (id, whoami, hostname, ps aux); and performs SSRF against the Alibaba Cloud (Aliyun) instance metadata service at http://100.100.100.200/latest/meta-data/, specifically probing /latest/meta-data/ram/security-credentials/ in an attempt to steal cloud IAM role credentials. All of the above (including the full environment variable dump) is exfiltrated via two plaintext HTTP POST requests (to / and /env) to a hardcoded C2 endpoint http://101.35.44.248 (raw IP, port 80, no TLS) using Node's built-in http module. All errors are silently swallowed so the attack is invisible to the installer. The package was published by npm user xingzhigege ([email protected]).
Analysis performed via static review only (npm registry metadata and package source retrieved as text via the npm registry and unpkg CDN) — the package was not installed or executed.
On npm install, the declared preinstall script (preinstall.js) POSTs the installer's full process.env, os.hostname(), os.platform(), cwd, container-detection artifacts (/.dockerenv, /proc/1/cgroup, /proc/self/mountinfo), and the output of shell reconnaissance commands (id, whoami, hostname, ps aux) to http://101.35.44.248 over plain HTTP. The script additionally issues curl requests to the Alibaba Cloud instance metadata service at 100.100.100.200, including the latest/meta-data/ram/security-credentials/ path that returns temporary IAM credentials for the instance role, and forwards the response to the same attacker endpoint. The package advertises itself as "a simple date formatting utility" and index.js contains only a 7-line date formatter, confirming a decoy cover story for install-time credential theft and environment exfiltration.
The OpenSSF Package Analysis project identified 'antsrcsrctest' @ 1.0.0 (npm) as malicious.
It is considered malicious because:
- The package executes one or more commands associated with malicious behavior.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Credential / info stealerFind it
Scan your lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock, requirements.txt, poetry.lock, etc.) and build artifacts for antsrcsrctest (version 1.0.0). O3 Security's supply-chain scanner checks every dependency against known-malicious package intelligence at install time and in CI, flagging antsrcsrctest across your stack and pipelines.
If you installed it — respond
antsrcsrctest is built to steal secrets, so assume every credential the build or runtime could read is compromised. Remove it from your project and lockfile, then rotate ALL exposed secrets — npm/registry tokens, cloud keys, CI/CD secrets, SSH keys, and any .env values — from a known-clean machine. Audit logs for unauthorized use of those credentials.
Did it already run?
If antsrcsrctest was ever installed, its post-install/runtime payload may have already executed. O3's L7 egress monitoring and runtime eBPF sensors detect the credential exfiltration or command-and-control callback after install and block the malicious outbound channel, so you catch and contain the actual compromise — not just the presence of the package.
How O3 protects you
O3 blocks antsrcsrctest before install through its supply-chain scanner, and if it has already run, detects and severs the exfiltration or C2 callback at runtime through L7 egress monitoring and eBPF.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
- OpenSSF: Package Analysis · finder
- SafeDep · finder
- codelake Research · finder
Detect & block this
O3 blocks antsrcsrctest-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.