Join our Newsletter — 33% off our NHI Course

What are the signs that a package install is behaving like an infostealer?

Look for post-install scripts that read broad directory trees, create remote repositories, write fake diagnostic logs, or make repeated API calls immediately after dependency installation. Those behaviours indicate the package is collecting data and staging it for transfer, rather than performing legitimate setup work.

What a package install can reveal before the payload runs

An infostealer-style install usually looks busy in ways legitimate setup rarely needs. The telling sign is not just that code runs during installation, but that it starts collecting environment data, enumerating files, probing browser or developer artefacts, or preparing outbound paths immediately after dependency resolution. That shift from setup to collection is the core behavioural clue.

Package managers expect installs to fetch dependencies, unpack artifacts, and perform narrow configuration. When a package begins scanning wide directory trees, inventorying local credentials, or reaching for remote endpoints unrelated to its declared function, the install itself becomes the observable attack surface. That is why these signs matter even before any obvious exfiltration completes.

One practical distinction is intent. A normal installer may create a local cache, write logs, or run a short post-install script. An infostealer pattern usually couples those actions with broad discovery and immediate staging behaviour, such as building a repository of gathered data or sending repeated requests to a remote service. The behaviour is suspicious because it is expansive, not because it is merely automated.

Behaviours that most strongly point to data collection

The clearest indicators are broad reads and rapid staging. If the package starts traversing user profiles, browser stores, developer home directories, cloud credential locations, or other high-value paths that are not necessary for setup, treat that as a collection signal. If it then bundles the results into a new local repository, archive, hidden file set, or temporary cache, the intent is likely to prepare the data for transfer.

Repeated outbound calls immediately after installation are another strong clue, especially when they follow enumeration or file access. Legitimate packages may contact an update server or license endpoint, but they usually do so in a bounded, documented way. Infostealer-like activity tends to show a collect-and-check pattern, where the install reads data, then repeatedly posts or polls as it stages information for exfiltration.

Fake diagnostic logs are also worth attention. Malware often writes convincing-looking telemetry to blend in with normal setup noise, while the useful work happens in the background. If those logs appear alongside file harvesting, unusual process launches, or hidden network activity, the logs may be camouflage rather than evidence of healthy installation.

Why these signs are different from ordinary installer noise

Installers do sometimes probe the system, but the scope should be explainable by the package’s function. A package that formats a workspace, compiles assets, or registers a service may briefly inspect paths or environment variables. The threshold shifts when the access is broad, repeated, or unrelated to the package’s stated purpose. That is especially true when the package touches many directories or many systems in one install path, which is a pattern commonly seen in supply-chain abuse such as coa and rc npm hijacks 2021 and ua-parser-js npm hijack 2021.

Context matters because some installers are noisy without being malicious. The difference is whether the extra activity is tightly tied to a legitimate setup outcome. If you cannot explain why the installer needs broad file discovery, remote staging, or rapid repeated API calls, assume the package is doing more than installation work until you prove otherwise.

That same logic is why supply-chain incidents are so damaging: once a package update or install path is trusted, hidden behaviour can execute with the rights of the developer or build environment. Real-world cases such as LiteLLM PyPI package breach and Oracle E-Business Suite exploitation 2025 show how quickly install-time trust can be turned into credential theft or downstream abuse.

What to verify before you trust the install

What to verify: Check whether the post-install behaviour is necessary for the package’s advertised function. A legitimate build step should have a narrow file scope, a clear destination, and a documented remote dependency if network access is involved.

Decision rule: If the package reads outside its working directory, accesses browser or developer secrets, creates an unexpected remote repository, or emits repeated outbound requests without a clear supportable reason, treat it as hostile until proven otherwise. If the behaviour starts only after installation, the install path itself should be investigated as the likely compromise point.

What to measure: Focus on scope, timing, and destination. The most useful signals are how many paths were read, how soon network activity began after install, whether the activity repeated, and whether the data moved to infrastructure that is unrelated to the package’s stated purpose.

Practitioner takeaway: The best discriminator is not whether a package runs code during install, but whether that code behaves like software setup or like pre-exfiltration collection.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK and OWASP Non-Human Identity Top 10 define the specific risk controls and attack patterns relevant to this topic.

Framework Control / Reference Relevance
MITRE ATT&CK T1105 — Ingress Tool Transfer Post-install staging and outbound transfer map to attacker-controlled retrieval and delivery.
T1005 — Data from Local System Broad directory reads and local discovery are direct data collection behaviour.
Recommendation — Map install-time collection and staging to transfer techniques and hunt for unusual outbound destinations. Investigate broad local reads as potential data collection and restrict unnecessary filesystem access.
OWASP Non-Human Identity Top 10 NHI-02 — Secret Leakage Install-time harvesting of credentials, tokens, or keys is a secret-leakage pattern.
NHI-03 — Vulnerable Third-Party NHI Package installs can abuse trusted dependency supply chains as a third-party compromise path.
NHI-07 — Long-Lived Secrets Infostealers commonly harvest persistent secrets that enable later reuse.
Recommendation — Treat install scripts that inspect secret locations as leakage paths and block them by policy. Vet third-party packages for suspicious install behaviour before allowing them into builds. Rotate any long-lived secrets exposed during install-time collection.