Indicator Types and the Pyramid of Pain
By now the analysis of the lab sample has produced a pile of observables: a SHA-256, an imphash, a domain, an IP address, a URL path, a user agent, a mutex, a Run value name, a dropped file path, and behaviours (decode the configuration, set autostart, beacon every 60 s). Which of these are worth sending to the detection team, the firewall, partner organisations? All of them, but with very different expectations. Some will stop matching tomorrow; some will keep catching this attacker for years. The pyramid of pain is the standard way to say which is which.
Definitions
- Indicator of compromise (IOC): an observable that, seen in your environment, suggests compromise. Atomic indicators stand alone (a hash, a domain); computed ones are derived (an imphash, a fuzzy hash, a JA3/JA4 fingerprint); behavioural ones describe actions (a program from Downloads sets a Run value and polls a host every 60 s).
- Indicator of attack (IOA): a term some vendors use for behavioural indicators of an attack in progress, regardless of the tool.
- TTPs: tactics, techniques and procedures: how the attacker operates (ATT&CK).
- Pyramid of pain (David Bianco, 2013): indicator types ordered by how much it costs the attacker when defenders detect and deny them.
| Level | Example from the lab sample | Why that cost |
|---|---|---|
| Hash values | SHA-256 of labagent.exe |
recompile or append a byte |
| IP addresses | 10.10.0.66 |
move to another server or use a proxy, minutes |
| Domain names | update.beacon.lab.test |
register a new domain, costs a little money and time |
| Network / host artefacts | URL path /api/v1/ping?id=, user agent LabAgent/1.0, mutex, Run value name, dropped file path |
must change and redeploy the tool's code or configuration |
| Tools | the agent itself, recognised by YARA rules on its code and configuration format | must write or buy a new tool |
| TTPs | "user-run download → autostart Run value → periodic HTTP check-in with a fixed path" | must change how they operate |
Which indicators survive a new build?
The example takes the indicators of three synthetic variants of the lab sample, as an analyst would record them across three incidents (a new build per campaign, new infrastructure each time), and checks which ones would still have matched the later variants if only the first had been known.
variants = {
"jan": {"sha256": "4e1f…c3a9", "ip": "10.10.0.66", "domain": "update.beacon.lab.test",
"imphash": "b91aa3bc…e750", "uri_path": "/api/v1/ping", "user_agent": "LabAgent/1.0",
"mutex": "Global\\LabAgent-Mutex-7f3a", "run_value": "LabAgentUpdater",
"ttp": ("T1204.002", "T1547.001", "T1071.001")},
"mar": {"sha256": "91c0…0b2d", "ip": "192.0.2.41", "domain": "cdn-sync.lab.test",
"imphash": "b91aa3bc…e750", "uri_path": "/api/v1/ping", "user_agent": "LabAgent/1.1",
"mutex": "Global\\LabAgent-Mutex-7f3a", "run_value": "LabAgentUpdater",
"ttp": ("T1204.002", "T1547.001", "T1071.001")},
"jun": {"sha256": "d7aa…41f0", "ip": "198.51.100.23", "domain": "img-static.lab.test",
"imphash": "0c6e5f12…a1d4", "uri_path": "/api/v2/ping", "user_agent": "Mozilla/5.0",
"mutex": "Global\\LabAgent-Mutex-7f3a", "run_value": "OneLabSync",
"ttp": ("T1204.002", "T1547.001", "T1071.001")},
}
LEVEL = {"sha256": "hash", "ip": "IP", "domain": "domain", "imphash": "artefact (computed)",
"uri_path": "artefact", "user_agent": "artefact", "mutex": "artefact", "run_value": "artefact",
"ttp": "TTP"}
first = variants["jan"]
print(f"{'indicator':<11} {'level':<20} still matches: mar jun")
for key in first:
marks = ["yes" if variants[v][key] == first[key] else " - " for v in ("mar", "jun")]
print(f"{key:<11} {LEVEL[key]:<20} {marks[0]} {marks[1]}")indicator level still matches: mar jun
sha256 hash - -
ip IP - -
domain domain - -
imphash artefact (computed) yes -
uri_path artefact yes -
user_agent artefact - -
mutex artefact yes yes
run_value artefact yes -
ttp TTP yes yes
The atomic indicators at the bottom of the pyramid die with each campaign. The imphash, the URL path and the Run value name survive one rebuild; the mutex survives both (a lazy constant in the code), and so does the TTP chain, which, unlike a mutex, the attacker can't fix by renaming one string. That is the pyramid in practice: detections built higher up last longer, and they are also harder to build and test.
How indicators become detections
- Bottom levels (hashes, IPs, domains): block lists, EDR and proxy searches, retro-hunts over old logs. Cheap to deploy, short-lived: give them an expiry date.
- Artefacts: SIEM searches on user agent and URL path, EDR queries for the mutex and Run value, YARA rules on the configuration format (YARA).
- Tools and TTPs: behaviour detections (Sigma, EDR rules) such as "process started from Downloads writes a Run value, then makes periodic HTTP requests" (Sigma, sec-blue-team).
How to manage indicators well
- Record for each indicator its type, source, first and last seen, confidence, context (which sample, which behaviour) and an expiry for atomic ones.
- Remove legitimate shared infrastructure before blocking (CDNs, cloud hosting, public DNS resolvers).
- Share indicators in a structured format so tools can import them (STIX).
- Measure which indicators actually detected something; retire the ones that never do.
Pitfalls
- Indicator lists as a strategy. Feeds of thousands of hashes and IPs create work and catch yesterday's attack.
- Blocking shared IPs. One IP can host thousands of unrelated sites; blocking it breaks business and barely slows the attacker.
- No expiry. Old IPs get reassigned to legitimate services; stale indicators produce false positives years later.
- Confusing presence with compromise. A domain in a DNS log could be a security scanner, a researcher or a blocked attempt; check context.
Practice
1. Place these on the pyramid: a JA3 TLS fingerprint, a named pipe used by a tool, a list of 200 IPs from a feed.
The JA3 fingerprint and the named pipe are network and host artefacts (the fingerprint is computed from the client's TLS implementation, a property of the tool). The IP list is at the "IP addresses" level: easy to change, short-lived.
2. Why did the mutex survive two rebuilds in the example, and is that typical?
The authors kept the constant in the code. It is common (tools need a fixed name to find their own mutex) but not guaranteed; a careful author derives it from the machine or changes it per build.
3. Add a field tls_ja3 to the variants and decide its level.
Add the same value to all three if the client library didn't change, and LEVEL["tls_ja3"] = "artefact (computed)". It changes when the tool's TLS library or settings change, which costs the attacker a rebuild with a different library.
Test yourself
Which indicator type sits at the top of the pyramid of pain?
- Hash values
- Domain names
- TTPs
- IP addresses
Why are IP addresses only 'easy' for attackers to change?
- IP addresses are encrypted
- Moving to another server or a proxy takes minutes
- IP addresses never change
- They are not visible in logs
In the example, which indicator matched all three variants?
- The SHA-256
- The domain
- The TTP chain
- The user agent
What should every atomic indicator in a block list have?
- A logo
- Source, confidence, context and an expiry date
- A CVSS score
- A YARA rule