# Indicators of Compromise (IoC)

> Indicators of compromise (IoCs) are observable artifacts, like hashes, domains, and malicious package versions, that show a system was attacked.

Also known as: IoCs, Indicator of Compromise

Source: https://socket.dev/glossary/indicators-of-compromise-ioc

Last updated: 2026-10-31

Indicators of compromise (IoCs, also written IOCs) are observable artifacts, such as file hashes, domains, IP addresses, file paths, and malicious package versions, that show a system was attacked. Defenders match them against logs, hosts, and dependency inventories to find intrusions. IoCs are retrospective: each one describes an attack someone already caught, so IoCs detect repeats, not new attacks.

In IT security, an IoC is a match condition, not an alert. Someone runs [incident response](https://socket.dev/glossary/incident-response-ir) on an intrusion, writes down what it left behind, and publishes the list. Everyone else searches their own telemetry for those values. The model rests on one assumption: the next victim will see the same artifacts the first victim saw.

In the open source supply chain, that assumption fails for the cheapest indicators and holds for the most durable ones. The [Shai-Hulud worm](https://socket.dev/blog/ongoing-supply-chain-attack-targets-crowdstrike-npm-packages) shipped seven different `bundle.js` SHA-256 hashes in about 31 hours. The package versions it poisoned are different: a published `name@version` never changes, and npm's registry metadata still records the publish time of versions it has pulled, as the axios case below shows. Our position is that package versions should be the primary IoC for scoping exposure to a [malicious package](https://socket.dev/glossary/malicious-package), with hashes and domains as supporting evidence. IoCs should not be your prevention layer. By the time an IoC list exists, the malicious version has already run somewhere.

## What are indicators of compromise (IoCs)?

Indicators of compromise are the concrete values an investigation extracts from an attack, written so other defenders can search for them. [RFC 9424](https://www.rfc-editor.org/rfc/rfc9424.html), the IETF's informational document on IoCs, defines them as "observable artefacts relating to an attacker or their activities." The classic set comes from endpoint and network forensics: hashes of malicious files, domains and IP addresses of a [command-and-control (C2)](https://socket.dev/glossary/command-and-control-c2) server, file paths, registry keys, and process names.

A package attack produces those plus three layers that classic IoC guides skip: the registry, the install step, and the source repository. The table below maps each layer to a real value from incidents we have analyzed.

| Layer | Classic equivalent | What to record | Real example |
| --- | --- | --- | --- |
| Registry | None | Package name and exact version | axios@1.14.1, plain-crypto-js@4.2.1 |
| Artifact | File hash | Tarball integrity hash, payload file hash | Shai-Hulud bundle.js SHA-256 de0e25a3e6c1e1e5998b306b7141b3dc4c0088da9d7bb47c1c00c91e6e4f85d6 |
| Install | None | Lifecycle hook and the file it runs | postinstall: node setup.js (plain-crypto-js) |
| Host | File path, process name | Dropped files, renamed binaries | /Library/Caches/com.apple.act.mond, %PROGRAMDATA%\\wt.exe |
| Network | Domain, IP address, URL | C2 and exfiltration endpoints, user agents | sfrclak\[.\]com, 142.11.206.73, webhook\[.\]site collector URLs |
| Repository and CI | None | Workflow files, commits, branches, repositories | cache.yml on branches ci-tmp-a351cc and ci-tmp-4d8517 (LiteLLM), GitHub repos named Shai-Hulud |

Published IoC lists are usually defanged. `hxxps://` replaces `https://` and `[.]` replaces a dot, so nobody opens a live payload URL by accident. Refang the values before loading them into a matcher, or the matcher will search for strings that never appear in real traffic.

## Anatomy of an IoC set: the axios compromise

The [axios compromise](https://socket.dev/blog/axios-npm-package-compromised) is the clearest recent example of every layer at once. On March 31, 2026, attackers published `axios@1.14.1` and `axios@0.30.4`, both adding a dependency on [plain-crypto-js](https://socket.dev/blog/axios-npm-package-compromised)@4.2.1. Axios has about 100 million weekly downloads on npm, according to our write-up. The new dependency ran a dropper through its `postinstall` hook, one of npm's [install scripts](https://socket.dev/glossary/postinstall-scripts), fetched a platform-specific second stage, and then deleted the evidence. This is an excerpt of the IoC set we published:

```text
# Malicious packages
axios@1.14.1
axios@0.30.4
plain-crypto-js@4.2.0
plain-crypto-js@4.2.1

# Network
C2 domain:   sfrclak[.]com
C2 IP:       142.11.206.73
C2 URL:      http://sfrclak[.]com:8000/6202033
POST body:   packages[.]npm[.]org/product0   (macOS)
             packages[.]npm[.]org/product1   (Windows)
             packages[.]npm[.]org/product2   (Linux)
User-Agent:  mozilla/4.0 (compatible; msie 8.0; windows nt 5.1; trident/4.0)

# File system
/Library/Caches/com.apple.act.mond   macOS second stage
%PROGRAMDATA%\wt.exe                 renamed copy of powershell.exe
%TEMP%\6202033.ps1                   PowerShell payload, self-deletes
/tmp/ld.py                           Linux payload
```

Each line is a query against a different data source. The package lines go against lockfiles, SBOMs, and install logs. The domain and IP go against DNS and proxy logs. The file paths go against endpoint telemetry. The user agent of the macOS second stage, a fake Internet Explorer 8 on Windows XP string, is distinctive enough to search proxy logs for on its own.

The package lines are the durable ones, because the registry remembers. npm removed both axios versions and replaced plain-crypto-js with a security holding package, but the packument's `time` map still records when each removed version was published. Anyone can read it (output as of October 31, 2026):

```bash
$ curl -s https://registry.npmjs.org/axios \
  | jq '{"1.14.1": .time["1.14.1"], "0.30.4": .time["0.30.4"],
         listed: (.versions | has("1.14.1") or has("0.30.4"))}'
{
  "1.14.1": "2026-03-31T00:21:58.168Z",
  "0.30.4": "2026-03-31T01:00:57.285Z",
  "listed": false
}

$ curl -s https://registry.npmjs.org/plain-crypto-js \
  | jq '{time: (.time | del(.created, .modified)),
         latest: .["dist-tags"].latest,
         description: .versions[.["dist-tags"].latest].description}'
{
  "time": {
    "4.2.0": "2026-03-30T05:57:32.867Z",
    "4.2.1": "2026-03-30T23:59:12.278Z",
    "0.0.1-security": "2026-03-31T03:25:11.636Z",
    "0.0.1-security.0": "2026-03-31T04:26:33.055Z"
  },
  "latest": "0.0.1-security.0",
  "description": "security holding package"
}
```

`1.14.1` has a publish time and no entry in `versions`. That gap is the registry's own record that a version existed and was removed. Combined with the detection time from our post, it pins the start of the exposure window to the second.

> Figure 1. The axios compromise, reconstructed from the npm registry's time map (read October 31, 2026) and the detection time in Socket's write-up. Both axios versions are gone from versions , but their publish times remain.
>
> Timeline of the axios compromise reconstructed from npm registry metadata and Socket's detection time, from the decoy plain-crypto-js publish at 05:57 UTC on March 30, 2026 to npm's security holding package at 03:25 UTC on March 31.

| Time (UTC) | Event | Source |
| --- | --- | --- |
| 2026-03-30 05:57:32 | plain-crypto-js@4.2.0 published, a clean copy of crypto-js with no payload | npm registry time map |
| 2026-03-30 23:59:12 | plain-crypto-js@4.2.1 published with a postinstall dropper | npm registry time map |
| 2026-03-31 00:05:41 | Socket's automated malware detection flags plain-crypto-js@4.2.1 | Socket write-up |
| 2026-03-31 00:21:58 | axios@1.14.1 published, depending on plain-crypto-js@4.2.1 | npm registry time map |
| 2026-03-31 01:00:57 | axios@0.30.4 published, 39 minutes later, poisoning the 0.x branch | npm registry time map |
| 2026-03-31 03:25:11 | npm publishes the 0.0.1-security holding package over plain-crypto-js | npm registry time map |

One detail in that timeline matters more than the rest. Socket's scanner flagged `plain-crypto-js@4.2.1` at 00:05:41 UTC, 16 minutes before `axios@1.14.1` was published. Automated analysis of the payload caught it before the most widely cited IoC in the incident existed.

## Why do hash-based IoCs fail against package malware?

Hash-based IoCs fail against package malware because the attacker controls the bytes and rebuilds them for free. RFC 9424 puts it plainly: "Hashes, at the bottom, are precise and easy to deploy but are fragile." Its pyramid of pain ranks indicators by how much it costs an attacker to change them, with hashes at the bottom and tactics, techniques, and procedures at the top.

Package malware sits at the extreme low-cost end. The Shai-Hulud worm produced seven distinct `bundle.js` builds between 17:58 UTC on September 14, 2025 and 01:14 UTC on September 16, according to [our timeline](https://socket.dev/blog/ongoing-supply-chain-attack-targets-crowdstrike-npm-packages). The worm also repacked each victim package before republishing it. Every poisoned version therefore had its own tarball integrity hash, even when its `bundle.js` matched another one. Our list reached 526 affected package versions. The seven payload hashes could find `bundle.js` on disk. A lockfile records only tarball hashes, so matching lockfiles took the full list of 526 versions.

Anti-forensics finishes the job. After the plain-crypto-js dropper ran, it deleted `setup.js`, deleted the `package.json` that declared the `postinstall` hook, and renamed a clean `package.md` to `package.json`. The installed directory then looked like an ordinary copy of crypto-js. Hashing the files on disk afterwards matches nothing.

Network IoCs are only slightly better. The [LiteLLM compromise](https://socket.dev/blog/litellm-attack-timeline) used two different webhook.site collector URLs in workflows two days apart, with the same curl command and the same base64 encoding. A disposable endpoint costs the attacker one HTTP request to create.

> Figure 2. Our adaptation of the pyramid of pain for package attacks. Levels near the bottom are cheap for an attacker to change. Levels near the top force a new compromise or a new design.
>
> A pyramid of pain adapted for package attacks, six levels from payload file hash at the bottom to behavior at the top, each with what it costs the attacker to change.

| Level (bottom to top) | Example | What it costs the attacker to change | Observed |
| --- | --- | --- | --- |
| 1. Payload file hash | Shai-Hulud bundle.js SHA-256 | Rebuild the file | 7 builds in about 31 hours |
| 2. Tarball integrity hash | sha512 value in package-lock.json | Nothing extra; every repack changes it | Unique for each of 526 poisoned Shai-Hulud versions |
| 3. Network endpoints | C2 domain, webhook.site collector URL | One HTTP request or one domain registration | LiteLLM switched collector URLs two days apart |
| 4. Host and repository artifacts | cache.yml, ci-tmp-\<hex\> branches | A rename | LiteLLM reused the same commit subject both times |
| 5. Version of a legitimate package | axios@1.14.1 | Publish access to that package | Axios required social engineering of its lead maintainer |
| 6. Behavior | Install hook that steals secrets and sends them out | A new attack design | Credential theft, exfiltration, and republishing persisted across all 7 Shai-Hulud builds |

A malicious version of a legitimate package is expensive to mint: poisoning axios took a [social engineering campaign against its lead maintainer](https://socket.dev/blog/axios-maintainer-confirms-social-engineering-behind-npm-compromise). A typosquat version is cheap. Either way, every publish becomes permanent registry history, and each compromise produces a short, enumerable list of versions. That makes package versions the best key a defender has for scoping.

## How do you check your environment for package IoCs?

Checking for package IoCs means searching every record of what was resolved and installed, not only the project lockfile. The [hidden blast radius of the axios compromise](https://socket.dev/blog/hidden-blast-radius-of-the-axios-compromise) came from tools that never touched a project's [lockfile](https://socket.dev/glossary/lockfile): CLIs run with [npx](https://socket.dev/glossary/npx-npm-package-runner), global installs, and fresh CI environments. A clean lockfile checked after the fact does not prove you were safe.

The script below matches exact `name@version` IoCs against every `package-lock.json` under the paths you give it. Exact matching matters: a substring search for `axios@1.14.1` also hits `axios@1.14.10`. It reads npm lockfile versions 2 and 3 only; `pnpm-lock.yaml` and `yarn.lock` need their own parsers.

```bash
#!/usr/bin/env bash
# usage: scan.sh iocs.txt DIR...   (iocs.txt: one name@version per line)
# prints: name@version<TAB>path/to/package-lock.json for every exact hit
iocs="$1"; shift
find "$@" -name package-lock.json -not -path '*/node_modules/*' 2>/dev/null |
while read -r lock; do
  jq -r --arg lock "$lock" '.packages | to_entries[] | select(.key != "")
    | "\(.key | sub(".*node_modules/"; ""))@\(.value.version)\t\($lock)"' "$lock"
done | awk -F'\t' 'NR==FNR { ioc[$1]=1; next } ($1 in ioc)' "$iocs" -
```

Point it at your repositories and at npm's npx cache. We confirmed with npm 10.9.9 and npm 12.2.1 that `npx` writes a full lockfile for each tool it runs under `~/.npm/_npx/<hash>/package-lock.json`, inside npm's default cache directory on Linux and macOS. The cache index under `~/.npm/_cacache/index-v5` also records every tarball URL npm fetched, which catches installs the lockfiles miss:

```bash
# 1. Lockfiles written by npx, one directory per tool it has run
$ ./scan.sh iocs.txt ~/code ~/.npm/_npx

# 2. Every tarball npm fetched, including installs no lockfile kept
$ grep -rhoE 'registry\.npmjs\.org/(axios/-/axios-(1\.14\.1|0\.30\.4)|plain-crypto-js/-/plain-crypto-js-4\.2\.1)\.tgz' \
    ~/.npm/_cacache/index-v5 | sort -u
```

Both records live on one machine and disappear with it. An ephemeral CI runner takes its npm cache with it when the job ends, and `npm cache clean --force` erases the index. As we wrote after the axios incident, "The absence of evidence after the fact is not strong evidence of absence." What survives is whatever you logged centrally: build logs with resolved versions, proxy logs, and install-time registry traffic.

The repository layer needs the same care. In the LiteLLM case, the attacker pushed `.github/workflows/cache.yml` to branches named `ci-tmp-<hex>` and deleted each branch within minutes. The workflow file never reached `main`. The commit objects survived, the repository's activity log kept the branch names, and an environment deployment from `ci-tmp-4d8517` was still marked Active. Those records placed malicious workflow runs 11 days before the poisoned release. Search Actions run history, the activity log, and deployment records for repository IoCs, not just the files on your default branch.

## What tools detect indicators of compromise?

Tools that detect indicators of compromise split into two groups: tools that distribute IoCs and tools that match them. Distribution is the job of [threat intelligence](https://socket.dev/glossary/threat-intelligence) feeds and platforms, which exchange indicators in formats such as STIX 2.1 over TAXII. Matching happens wherever your telemetry lives: a [SIEM](https://socket.dev/glossary/security-information-and-event-management-siem) for DNS, proxy, and authentication logs, endpoint detection and response (EDR) agents for files and processes, YARA rules for file contents, and dependency inventories for packages.

Classic formats handle network and file indicators well. This STIX 2.1 indicator for the axios C2 domain was generated and validated with the OASIS `stix2` Python library:

```json
{
    "type": "indicator",
    "spec_version": "2.1",
    "id": "indicator--83aea1b4-f112-4398-98e8-6ce78ee881c2",
    "created": "2026-10-31T12:57:17.687679Z",
    "modified": "2026-10-31T12:57:17.687679Z",
    "name": "axios compromise: C2 domain",
    "indicator_types": [
        "malicious-activity"
    ],
    "pattern": "[domain-name:value = 'sfrclak.com']",
    "pattern_type": "stix",
    "pattern_version": "2.1",
    "valid_from": "2026-03-31T00:05:41Z"
}
```

Package versions fit STIX awkwardly. The STIX 2.1 `software` object has `name`, `version`, `vendor`, `cpe`, and `swid` properties, and no field for the package ecosystem. The [OpenSSF malicious-packages repository](https://github.com/ossf/malicious-packages) publishes its reports in the OSV format instead, which names the ecosystem, the package, and the affected versions directly. For package IoCs, OSV is the better interchange format. Feeds carry false positives too: [OSV's withdrawal of 157 malware reports](https://socket.dev/blog/osv-withdraws-157-malware-reports) on May 26, 2026 pulled records that automated detections had filed against trusted npm and PyPI packages, including FastAPI 0.136.3.

Matching package IoCs against history requires that history to exist. Socket's [Threat Intel campaigns view](https://socket.dev/blog/threat-intel-campaign-impact) checks each campaign's packages against an organization's immutable full scans, pull request diff scans, and [Socket Firewall](https://docs.socket.dev/docs/socket-firewall-overview) events. It shows the first and last time each malicious version was seen in each repository and branch. That answers "were we hit?" for any install that passed through a scanned repository or through the Firewall. It cannot see an install that bypassed both.

## IoC matching versus behavioral analysis

IoC matching and behavioral analysis answer different questions, and supply chain defense needs both. IoC matching asks whether a known-bad value appears in your environment. Behavioral analysis asks whether a package does something its purpose does not explain, before anyone has labeled it.

|  | IoC matching | Behavioral analysis of package contents |
| --- | --- | --- |
| Question answered | Is a known-bad value in my environment? | Does this package do something its purpose does not explain? |
| Earliest it works | After someone publishes the IoC | As soon as the tarball is published |
| Catches the first victim | No | Yes, if the behavior is visible in the code |
| False positives | Rare for exact matches, but feeds can publish bad records | Higher; findings need triage |
| Attacker evasion | Change a hash, a domain, or a version | Change the behavior or hide it better |
| Best use | Scoping, hunting, incident response | Install-time gating |
| Verdict | Use after disclosure to find where it ran | Use before install to stop it running |

Verdict: use IoCs to scope and hunt after an incident is public. Use behavioral analysis of package contents to decide what gets installed. Most supply chain attacks execute at install time, and every hour between first publish and a published IoC list is an hour IoCs cannot help.

The behaviors that made plain-crypto-js malicious are visible in the tarball itself: a `postinstall` hook, 18 strings hidden behind reversed base64 and an XOR cipher, network access, and shell execution. Each maps to an [alert type Socket documents](https://docs.socket.dev/docs/supply-chain-risk): Install scripts, Obfuscated code, Network access, and Shell access. Running dependency scripts by default was a design mistake, and package managers have started to fix it. pnpm stopped running them by default in version 10, and [npm v12](https://socket.dev/blog/npm-12) followed in July 2026. As of October 2026, npm 12.2.1 skipped the `postinstall` hook of a test dependency we installed, because the package was not covered by `allowScripts`. Neither control is complete. Behavioral signals produce false positives that need triage, and malware that runs on first `require()` instead of at install avoids script blocking entirely.

## IoCs have an end of life

RFC 9424 lists End of Life as the last stage of an IoC's lifecycle, and supply chain IoCs reach it fast. The macOS second stage of the axios attack survives only because a researcher captured it before the C2 server went offline. LiteLLM's collector URL changed between runs two days apart. Removed package versions stop resolving, so reinstalling today produces a clean tree.

The values that stay useful are the ones anchored in systems the attacker does not control: registry publish timestamps, commit objects, and deployment records. The rest of the evidence lives in your own logs, if you kept them. npm keeps no public, queryable history of which dependency graphs resolved at a given moment. In a package compromise, your own record of what you installed matters more than any published IoC feed, and most teams do not keep one.
