Five Malicious Rust Crates Attempted to Steal .env Secrets

Summary
Socket researchers found five malicious Rust crates posing as time utilities and attempting to upload .env secrets. crates.io yanked four and removed chrono_anchor after Socket reported it.
Key points
- The crates chrono_anchor, dnp3times, time_calibrator, time_calibrators, and time-sync were published between late February and early March 2026.
- The crates shared exfiltration logic and infrastructure, including timeapis[.]io, a lookalike of the legitimate timeapi[.]io.
- In chrono_anchor, parameter validation could trigger covert requests: a decoy HTTPS GET followed by an HTTP POST uploading a local file via curl.
- The code targeted .env files and relied on repeated execution; the article says it did not establish persistence.
- RustSec reports no evidence of actual usage for time_calibrator and no evidence of downloads for time_calibrators and dnp3times.
- crates.io yanked four packages; after Socket reported chrono_anchor, crates.io yanked it and suspended the publisher account. The associated GitHub account remained accessible at the time of writing.
- The article recommends dependency auditing and review, restricting outbound network access in CI, and rotating secrets if the malicious code may have run.
Article Details
- Attack Vectors
- Five malicious Rust crates posed as time utilities and were published to crates.io between late February and early March 2026.
- When affected code paths ran during development or CI, the crates attempted to read local .env files and exfiltrate them using curl multipart HTTP POST requests.
- chrono_anchor sent decoy HTTPS GET traffic to the legitimate timeapi.io service before uploading to the lookalike timeapis[.]io domain over HTTP.
- The crates used typosquatting and brandjacking to appear legitimate; dnp3times typosquatted dnp3time, while chrono_anchor evoked the chrono ecosystem.
- Defensive Notes
- Use cargo-audit and cargo-deny in CI, and review new dependencies before execution.
- Restrict outbound network access during build and test phases where feasible; monitor dependencies that spawn curl or make unexpected background HTTP requests.
- If affected code ran while a .env file was present, treat its secrets as potentially exposed: rotate tokens and keys and audit CI jobs with publish or deploy credentials.
- Pin dependencies and use Socket tools to identify or block malicious dependencies before execution.
Indicators of compromise
| Type | Indicator | Context |
|---|---|---|
| DOMAIN | timeapis[.]io | Lookalike, attacker-controlled domain used as the .env exfiltration destination; the article says it impersonates timeapi.io. |
gehakax777@kaoing[.]com | Disposable author email found in a malicious crate manifest and associated by the article with a campaign publisher identity. | |
jack@kaoing[.]com | Author email found in another crate in the malicious cluster; the article says its use suggests publisher identity rotation. | |
| URL | hxxp[:]//timeapis[.]io/api/Time/current/zone?timeZone=UTC | HTTP POST exfiltration endpoint used by the malicious crates to upload local .env files. |
MITRE ATT&CK
T1005 · Data from Local SystemThe code resolved ENV_FILE_PATH to .env and read that local file for upload.T1036 · MasqueradingThe crates posed as time utilities; dnp3times typosquatted dnp3time, and chrono_anchor used a name evoking the chrono ecosystem.T1041 · Exfiltration Over C2 ChannelThe crates attempted to exfiltrate .env contents to the remote timeapis[.]io upload endpoint.T1071.001 · Web ProtocolsThe crates used HTTPS GET and HTTP POST requests through curl, including a multipart upload to the exfiltration endpoint.T1195.002 · Compromise Software Supply ChainThe campaign published five malicious Rust crates to crates.io to deliver code that attempted to exfiltrate developer and CI secrets.T1204 · User ExecutionThe exfiltration code ran when developers or CI jobs executed affected code paths, including parameter validation and tests.T1552.001 · Credentials In FilesThe crates targeted local .env files containing API keys, tokens, and other secrets.
People
Threat Actors
dictorudinThe crates.io publisher account associated with chrono_anchor, which the article identifies as part of the malicious crate campaign.gehakax777A crates.io alias associated with an author email in a malicious crate manifest; the article links it to the campaign’s publisher identities.suntea279491A GitHub account listed in chrono_anchor’s manifest; the article associates it with the malicious crate campaign.
Vendors
Products
Tools
cargo-auditRecommendations include preventing execution of malicious dependencies (cargo-audit, cargo-deny, Socket tools), rotating secrets if exfiltration is suspected, restricting outbound network access in CI, andcargo-denyRecommendations include preventing execution of malicious dependencies (cargo-audit, cargo-deny, Socket tools), rotating secrets if exfiltration is suspected, restricting outbound network access in CI, andSocket AI ScannerSocket AI Scanner flags chrono_anchor as malware after finding covert exfiltration embedded in AnchorParams validation code.Socket browser extensionFor developer workflow coverage, add the Socket browser extension during package review, and use Socket MCP to flag suspicious or hallucinated dependencies before they are added to a project.Socket CLIRun cargo-audit and cargo-deny in CI for RustSec and policy enforcement, then layer Socket GitHub App, Socket CLI, and Socket Firewall to block malicious behavior and transitive pulls before execution.Socket FirewallRun cargo-audit and cargo-deny in CI for RustSec and policy enforcement, then layer Socket GitHub App, Socket CLI, and Socket Firewall to block malicious behavior and transitive pulls before execution.Socket GitHub AppRun cargo-audit and cargo-deny in CI for RustSec and policy enforcement, then layer Socket GitHub App, Socket CLI, and Socket Firewall to block malicious behavior and transitive pulls before execution.Socket MCPFor developer workflow coverage, add the Socket browser extension during package review, and use Socket MCP to flag suspicious or hallucinated dependencies before they are added to a project.
