Back to glossary

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

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 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 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, 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, 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) 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.

LayerClassic equivalentWhat to recordReal example
RegistryNonePackage name and exact versionaxios@1.14.1, plain-crypto-js@4.2.1
ArtifactFile hashTarball integrity hash, payload file hashShai-Hulud bundle.js SHA-256 de0e25a3e6c1e1e5998b306b7141b3dc4c0088da9d7bb47c1c00c91e6e4f85d6
InstallNoneLifecycle hook and the file it runspostinstall: node setup.js (plain-crypto-js)
HostFile path, process nameDropped files, renamed binaries/Library/Caches/com.apple.act.mond, %PROGRAMDATA%\wt.exe
NetworkDomain, IP address, URLC2 and exfiltration endpoints, user agentssfrclak[.]com, 142.11.206.73, webhook[.]site collector URLs
Repository and CINoneWorkflow files, commits, branches, repositoriescache.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 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@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, fetched a platform-specific second stage, and then deleted the evidence. This is an excerpt of the IoC set we published:

Plain 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.

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

Level (bottom to top)ExampleWhat it costs the attacker to changeObserved
1. Payload file hashShai-Hulud bundle.js SHA-256Rebuild the file7 builds in about 31 hours
2. Tarball integrity hashsha512 value in package-lock.jsonNothing extra; every repack changes itUnique for each of 526 poisoned Shai-Hulud versions
3. Network endpointsC2 domain, webhook.site collector URLOne HTTP request or one domain registrationLiteLLM switched collector URLs two days apart
4. Host and repository artifactscache.yml, ci-tmp-<hex> branchesA renameLiteLLM reused the same commit subject both times
5. Version of a legitimate packageaxios@1.14.1Publish access to that packageAxios required social engineering of its lead maintainer
6. BehaviorInstall hook that steals secrets and sends them outA new attack designCredential 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. 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 came from tools that never touched a project's lockfile: CLIs run with npx, 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 feeds and platforms, which exchange indicators in formats such as STIX 2.1 over TAXII. Matching happens wherever your telemetry lives: a 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 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 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 checks each campaign's packages against an organization's immutable full scans, pull request diff scans, and Socket Firewall 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 matchingBehavioral analysis of package contents
Question answeredIs a known-bad value in my environment?Does this package do something its purpose does not explain?
Earliest it worksAfter someone publishes the IoCAs soon as the tarball is published
Catches the first victimNoYes, if the behavior is visible in the code
False positivesRare for exact matches, but feeds can publish bad recordsHigher; findings need triage
Attacker evasionChange a hash, a domain, or a versionChange the behavior or hide it better
Best useScoping, hunting, incident responseInstall-time gating
VerdictUse after disclosure to find where it ranUse 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: 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 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.