Goal. By the end you can turn raw reporting into clean, graded and enriched indicators that have a role, an expiry date and are safe to handle.
Why it matters#
Indicators are cheap to copy and expensive to trust. An unchecked list can block a service you rely on, fill a queue with false alerts or keep matching an address that changed hands months ago. Careful processing prevents most of that.
What you will learn#
Observables and indicators#
An observable is something you can see: a file, an address, a domain, an email header, a process. An indicator is an observable (or a pattern) plus the claim that it points to malicious activity, with the context that makes the claim testable. The STIX standard (stage 6) draws the same line: Observed Data records what was seen, while an Indicator holds a pattern that can be used to detect suspicious activity.
One piece of information is an atomic indicator. Several joined together ("this domain, contacted by a script that a document started") make a composite one, which is much harder to match by accident.
| Type | Example (invented) | Typical weakness |
|---|---|---|
| File hash | A SHA-256 of an attachment | Changes with one byte |
| IP address | 203.0.113.45 |
Shared hosting; addresses are reassigned |
| Domain | invoices[.]example[.]net |
Registered for one campaign, then dropped |
| URL | hxxps://invoices[.]example[.]net/pay |
Very specific; paths change |
| Email detail | Sender, reply-to, subject | Easy to vary |
| Host artefact | A task name, file path or registry value | Innocent software may share it |
| Certificate or network fingerprint | A certificate hash or TLS fingerprint | Shared by common tools |
The Pyramid of Pain ranks these by how much it costs an attacker to change them. Prefer behaviour where you can; use indicators for a fast look back.
The processing steps#
- Extract items from the report, mail or log, keeping where each came from.
- Normalise: lower-case domains and hashes, remove trailing dots, keep URL paths as written.
- Refang to process, defang to share (see below).
- Deduplicate: ten copies of one address are one item.
- Filter known-benign items: public DNS resolvers, popular sites, your own addresses, the hash of an empty file. The MISP project publishes warninglists for exactly this.
- Grade the source and the claim, enrich, decide an action and set an expiry.
A short script handles steps 2 to 5 for a small list. The addresses and names are invented.
import ipaddress
import re
RAW = """
hxxp://invoices[.]example[.]net/pay
Invoices.Example.NET.
203.0.113.45
203[.]0[.]113[.]45
198.51.100.53
10.0.0.8
billing[@]example[.]org
d41d8cd98f00b204e9800998ecf8427e
"""
# Documentation addresses stand in for public ones in this example.
DOCUMENTATION = [ipaddress.ip_network(n) for n in
("192.0.2.0/24", "198.51.100.0/24", "203.0.113.0/24")]
# Your own "never block" list. MISP warninglists are the grown-up version.
KNOWN_BENIGN = {
"198.51.100.53": "our own DNS resolver",
"d41d8cd98f00b204e9800998ecf8427e": "hash of an empty file",
}
def refang(text):
for old, new in (("[.]", "."), ("[@]", "@"),
("hxxps://", "https://"), ("hxxp://", "http://")):
text = text.replace(old, new)
return text
def classify(item):
value = refang(item).rstrip(".")
try:
address = ipaddress.ip_address(value)
public = address.is_global or any(address in n for n in DOCUMENTATION)
return "ip", str(address), "" if public else "private or reserved"
except ValueError:
pass
if re.fullmatch(r"[0-9a-fA-F]{32}|[0-9a-fA-F]{40}|[0-9a-fA-F]{64}", value):
return "hash", value.lower(), ""
if value.lower().startswith(("http://", "https://")):
return "url", value, "" # keep as written: the path is case sensitive
if "@" in value:
local, _, domain = value.partition("@")
return "email", local + "@" + domain.lower(), ""
if re.fullmatch(r"[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+", value):
return "domain", value.lower(), ""
return "unknown", value, "check by hand"
seen = {}
for item in RAW.split():
kind, value, note = classify(item)
seen[(kind, value)] = KNOWN_BENIGN.get(value, note) # duplicates collapse
for (kind, value), note in sorted(seen.items()):
safe = value.replace("http", "hxxp", 1).replace(".", "[.]").replace("@", "[@]")
print(f"{kind:7}{safe:40}{note}")Illustrative: test it in your lab before relying on it. It prints:
domain invoices[.]example[.]net
email billing[@]example[.]org
hash d41d8cd98f00b204e9800998ecf8427e hash of an empty file
ip 10[.]0[.]0[.]8 private or reserved
ip 198[.]51[.]100[.]53 our own DNS resolver
ip 203[.]0[.]113[.]45
url hxxp://invoices[.]example[.]net/payThe items with a note are the ones to take out, or at least to think about, before anyone blocks them.
Grade the source and the claim#
The Admiralty code (also called the NATO system) grades two things separately: how reliable the source is (a letter) and how believable this piece of information is (a number). These are FIRST's labels.
| Source reliability | Information |
|---|---|
| A Reliable | 1 Confirmed |
| B Usually reliable | 2 Probably true |
| C Fairly reliable | 3 Possibly true |
| D Not usually reliable | 4 Doubtfully true |
| E Unreliable | 5 Improbable |
| F Cannot be judged | 6 Cannot be judged |
Keep them apart: a good source can pass on a doubtful claim ("A4"). "Confirmed" means confirmed by independent sources. Three feeds that all copied one report are one source, which is a common trap called circular reporting.
| Quillhaven example (invented) | Grade |
|---|---|
| A phishing mail in our own mail gateway log | A2: we trust the log; nobody else has confirmed it |
| A domain a sector group member says they saw | B2 |
| An address posted by an anonymous account | F3 |
Enrich and pivot#
Enrichment adds context. Pivoting uses one detail to find related ones (the Diamond Model in stage 4 makes this explicit).
| Ask | Where to look |
|---|---|
| Who registered this domain, and when? | Registration data (RDAP) |
| What other names share its certificates? | Certificate transparency logs |
| What did it resolve to before? | Passive DNS (usually needs an account) |
| Is it already known? | Reputation services |
| What does the page look like? | A URL scanning service |
| Have we seen it? | Your own DNS, proxy, mail and endpoint logs |
Take care what you send out. VirusTotal states that submitted files may be shared with its premium customers, and public urlscan.io scans appear in its search results. Search by hash where you can. Never submit your own documents, or URLs that contain tokens or personal data. Do not browse to attacker infrastructure from your own network: you may be seen.
Pivot with discipline. Shared hosting, content delivery networks, dynamic DNS and parked domains join
unrelated things together. In an invented case, invoices[.]example[.]net resolves to 203.0.113.45, and a
certificate on that server also names billing[.]example[.]net, registered the same week: a useful lead. The
same address also hosts hundreds of unrelated sites, so blocking the address would be a poor idea. Record
each pivot and why you trust it, and stop when the next link is weak.
Expiry#
Every indicator needs a role, a confidence, an owner and a date on which it stops being used unless someone renews it. These starting points are rules of thumb to adjust with your own data:
| Indicator | Review after |
|---|---|
| Address on rented or shared hosting | 2–4 weeks |
| Phishing or command domain | 1–3 months |
| File hash | Stays true for that file; value falls as the file is replaced |
| Behaviour (technique) | A year, or when your environment changes |
Another sighting can extend a date; a false positive should shorten it. The MISP project describes decaying models that lower an indicator's score over time, and a 2018 research paper sets out the idea. Hold indicators as a table with a source and a date, as Threat Hunting stage 7 shows, which also covers sweeping past logs for them.
Choose an action from confidence and the cost of being wrong: block, alert, search only, watch or discard. A high-confidence phishing URL may be blocked; a medium-confidence address on shared hosting should only be searched for.
Handle safely#
- Defang anything you write down or send:
hxxp,[.],[@]. It stops accidental clicks and previews. CyberChef has operations to defang and refang, and it runs in your browser. - Do not open suspicious files or links on a work machine. If you must examine one, do it as SOC stage 6 describes, in an isolated lab.
- Treat reports and feeds as untrusted input. A list can contain a mistake, or a planted legitimate address meant to make you block something you need.
Do this#
- Build a graded set (2–3 hours). Take a current public report. Extract at least 20 indicators, clean them, remove known-benign items and grade each one.
- Run the cleaner (1 hour). Run the script on your list. Add one rule, for example for IPv6 or an address range, and test it with a line that should match and one that should not.
- Enrich five (2 hours). Look up registration dates, certificates and your own logs. Note what each lookup added, and one pivot you refused to follow.
- Set actions and expiry (45 minutes). Give each of your five an action, an owner and a date.
- Prepare a shareable table (30 minutes). Defang it, add a TLP label and remove anything that identifies you.
Resources#
Free first
- FIRST: source evaluation - the grading letters and numbers with examples.
- Introduction to STIX - the objects behind observed data and indicators.
- CyberChef - decode, extract and defang in the browser.
- MISP warninglists - lists of addresses, domains and hashes that often cause false positives.
- Decaying Indicators of Compromise - the research paper on expiry models.
- Decaying of indicators in MISP - how the idea works in a platform.
- RDAP.org - registration lookups in the successor to WHOIS.
- Certificate Transparency - how public certificate logs work.
- How VirusTotal works - what happens to what you submit.
- urlscan.io FAQ - public, unlisted and private scans.
Paid or needs an account
- VirusTotal (free account for more; paid tiers) - reputation and relationships.
- Shodan and Censys (accounts; paid tiers) - internet scan data for pivoting.
Checkpoint#
You are ready to move on when you can:
Go deeper (optional)#
- Run a sweep with your set in Threat Hunting stage 7.
- The MISP project shows how a platform keeps sources, warnings and expiry together (stage 6).