Choosing what to detect: the Pyramid of Pain

Unit 4 of 5 in Logging and detection.

You will be able to use the Pyramid of Pain to choose detections that cost the attacker more to dodge.

Lesson

Not all detections cost the attacker the same

David Bianco's Pyramid of Pain ranks the types of indicator a defender can use by how much it hurts the adversary when you detect and deny it. From the bottom up the types are hash values, IP addresses, domain names, tools, and tactics, techniques and procedures, with other levels in between.

The point of the pyramid is cost. A detection that is easy for the attacker to sidestep wastes your effort, and one that forces them to change how they work is worth far more.

The bottom: cheap to change

Hash values identify specific files, and they are exact and easy to match but trivial to change. IP addresses are also easy to change: Bianco notes that if you deny an adversary an address they can usually recover without breaking stride. Domain names are a little more work because they must be registered, paid for and hosted, but there are many providers with lax registration standards, so changing them is not hard in practice.

Indicators at this level are still useful for finding known activity quickly, but each has a short life.

The top: behaviour

Tools are the next step up: when you detect and block a tool, you take away one of the adversary's arrows and they must find or make another. At the apex are tactics, techniques and procedures. Bianco says that when you detect and respond at this level you are operating directly on adversary behaviour rather than against their tools. His example is detecting pass-the-hash attacks themselves, perhaps by inspecting Windows logs, instead of the tools used to carry them out. He calls this level your ideal from a pure effectiveness standpoint.

This is the same distinction as tactics and techniques in ATT&CK. ATT&CK also publishes detection strategies for specific techniques, which organise platform-specific analytics into one detection approach.

A balanced set

A sensible detection set mixes levels. Keep cheap indicator checks for speed, and invest your writing time in behavioural rules that survive the attacker's next change. The cost of behavioural rules is more tuning, which is the next unit.

Key points

Sources

Practice in the labs

Rank detections by cost to the attacker, then write one at each end of the pyramid.

Also try, in the simulators

Knowledge check

  1. Which is the cheapest for an attacker to change? Answer: A file hash. A hash identifies one specific file and changes with any edit, so it sits at the bottom of the pyramid.
  2. Which level does Bianco call ideal from a pure effectiveness standpoint? Answer: Tactics, techniques and procedures. Detecting at the TTP level means operating on adversary behaviour, not their tools, which forces the largest change.
  3. Why not only write behavioural rules? Answer: They need more tuning, and quick indicator checks are still useful. Behaviour rules cost more effort to tune; a balanced set keeps cheap checks for speed.

Back to the syllabus or see all classes.

Related