Package Runtime Secret File Access Followed by IMDS Request
Identifies a Python, Node.js, Bun, Deno, Ruby, PHP or Perl runtime, or a binary executing from a package install location, that opens a developer secret (SSH keys, package registry tokens, source control credentials…
Description
Identifies a Python, Node.js, Bun, Deno, Ruby, PHP or Perl runtime, or a binary executing from a package install location, that opens a developer secret (SSH keys, package registry tokens, source control credentials or AI coding assistant credentials) and then connects to a cloud instance metadata service (IMDS) endpoint within one minute. This sequence matches credential stealers delivered through compromised packages, such as the malicious LiteLLM PyPI releases, while cloud provider credential files are excluded because legitimate cloud SDK credential chains read them before falling back to IMDS.
Detection logic
Its licence does not clear it for publishing here
Sunturai publishes a detection's own text where the licence it arrived under has been reviewed and permits it, and Elastic License 2.0 has not. The query as its source wrote it, its canonical form and the hash that pins this revision are in the workspace record.
Detection requirements
- Platform
- ContainersIaaSIdentity ProviderLinuxmacOSNetwork DevicesOffice SuiteSaaSWindows
The rule states no platform. This is derived from the 2 ATT&CK techniques it maps to.
- Log source category
- event_index
Known benign triggers
- AI coding assistants running on cloud instances may read their own credential file and then fall back to the instance metadata service for cloud provider authentication (for example Gemini CLI on Google Compute Engine). Confirm the process is the assistant itself and that the credential file belongs to that assistant.
- Developer or deployment scripts running on cloud-hosted macOS or Windows instances may read a package registry or source control token and then request instance role credentials from the same interpreter (for example a release script that publishes a package and uploads artifacts with the instance role). Validate the script path, parent process and whether the host is an approved build or release system.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| attack.mitre.org/techniques/T1552/005/ | 3from 2 sources |
| hackingthe.cloud/aws/general-knowledge/intro_metadata_service/ | 5 |
| www.wiz.io/blog/litellm-compromised-steals-credentials | Only this detection cites it |
From the source
- At source
- Open at source
- Upstream identifier
- 2baf0a3c-50cd-43b1-9e9a-d7ff3153b36b
- Tagged by the source as
- Mitre Atlas: AML.T0010Mitre Atlas: AML.T0010.001Mitre Atlas: AML.T0055Mitre Atlas: AML.T0083Data Source: Elastic DefendDomain: CloudDomain: EndpointDomain: GenAIOS: macOSOS: WindowsPlatform: macOSPlatform: WindowsResources: Investigation GuideRule Type: Event Correlation (EQL)Tactic: Credential AccessTactic: Initial AccessThreat: IMDS Credential TheftThreat: Supply ChainUse Case: Threat Detection
Licence
- Published under
- Elastic License 2.0Read the licence
- Attribution
- Required
Authorship
- Written by
- Published
- Oct 24, 2026
- Version
- 1