Skip to content
All posts

Attack Surface

EASM Asset Attribution: How We Cut False Positives

Following every pivot from one seed domain claimed 136 assets in our lab, and 88 were someone else's. The scoring and freshness checks that fix it.

HHHuzaifa HafeezChief Technology Officer

· 16 min read

On this page

Finding internet-facing assets is the easy half of attack surface management. Certificate Transparency logs, DNS and registration data will hand you thousands of hostnames and IP addresses in an afternoon. The hard half is deciding which of them are actually yours.

Get that wrong in one direction and you miss the forgotten server an attacker finds first. Get it wrong in the other and you alert on, or worse, scan, infrastructure that belongs to your CDN's other customers, your marketing agency's other clients, or whoever was handed a cloud IP address you released last year. This post shows how attribution goes wrong, using a small lab we built with known traps in it, and the scoring and checks that fix it. The code is a minimal version written for this post, but the principles are the ones we build our attribution around.

Why "connected to us" is not the same as "ours"

Discovery starts from seeds: a root domain, an organisation name, an IP range, an analytics ID. From each seed you pivot. A certificate for www.example.com in a Certificate Transparency log lists other names on the same certificate. Those names resolve to IP addresses. Those addresses host other names. Registration data from RDAP tells you who an IP block or domain is registered to.

Attackers do exactly the same thing. MITRE ATT&CK lists it as reconnaissance, for example Search Open Technical Databases: Digital Certificates (T1596.003). The difference is that an attacker does not care about false positives. A defender does, because every wrong asset is either wasted triage or a scan against someone else's system.

The assumption that breaks is that ownership is transitive: if A is ours and A is linked to B, then B is ours. Some links are strong, such as an IP block registered to your company. Many are weak or shared:

  • A CDN edge IP serves hundreds of unrelated sites.
  • A CDN certificate can carry dozens of unrelated customers' names.
  • An agency hosts your microsite on the same server as its other clients, and sometimes pastes your analytics ID into another client's template.
  • A cloud IP you released goes back into the provider's pool and is handed to a stranger, while your old DNS record still points at it.
  • A typo-squat copies your favicon on purpose.

The lab: one seed, five traps

We built a small labelled internet for a fictional lender, Northwind Lending Ltd. All names use reserved domains (example.com, example.net, example.org and the .test TLD) and every address is in the documentation range 192.0.2.0/24. Each asset carries a ground-truth label, so we can measure precision (how many claimed assets are really ours) and recall (how many of ours we found).

What is ours:

  • example.com (the only seed) with 12 subdomains on an IP block registered to us in RDAP.
  • Five cloud workloads on provider IPs, each serving our own certificate.
  • An acquired brand, example.net, whose certificates carry our organisation name.
  • A marketing site, go.example.com, on a CDN; a microsite, offers.example.com, hosted by an agency; and assets.example.com, a CNAME to a storage bucket.

The traps:

  1. CDN tenants. Sixty unrelated brandN.test sites share the same six edge IPs as go.example.com, and one edge certificate lists go.example.com next to twenty of them.
  2. The agency. offers.example.com is a CNAME to sites.example.org, which shares one IP with eight other clients. The agency also reused our analytics ID on two other clients' landing pages.
  3. Released cloud IPs. app-old, promo2024 and legacy-crm still have A records pointing at IPs that now serve another company's certificate.
  4. Typo-squats. examp1e.test and example-login.test copy our favicon.
  5. A dead bucket. The storage bucket behind assets.example.com no longer exists.

The observations are the ones an EASM platform collects: CT certificates, DNS answers, RDAP organisation, and what each IP serves when asked for a name over TLS (SNI). Here is one released IP as it appears in the data:

"192.0.2.101": {
  "cert_sans": ["shop1.retailer.test"],
  "ga": "G-RT5500",
  "favicon": "fav-rt"
}

Our DNS still says app-old.example.com A 192.0.2.101, and an old certificate for app-old.example.com is still in the CT logs. Two pieces of evidence say "ours". The live server says otherwise.

huzaifa@futaqsec: ~/easm-attribution
$ python3 build_lab.py
assets=136 ours=48 dns=161 certs=39 observed_ips=36
Building the lab dataset. Real output.

Root cause: transitive closure over every pivot

The simplest discovery script collects every link as an edge and walks the graph from the seed until nothing new appears. This is the core of it:

adj = defaultdict(set)
for s, d, *_ in ev:          # every pivot, in both directions
    adj[s].add(d); adj[d].add(s)
found, todo = set(), ["SEED"]
while todo:
    x = todo.pop()
    for y in adj[x]:
        if y not in found: found.add(y); todo.append(y)

It finds everything that is ours. It also finds everything else.

huzaifa@futaqsec: ~/easm-attribution
$ python3 attribute.py naive
[naive] attributed=136 true=48 false=88 missed=0 review=0 precision=0.35 recall=1.00
FP ip (Nimbus Cloud) x8
FP ip (EdgeFront CDN) x6
FP agency x11
FP typo-squat x2
FP nw-assets.storage.cloud.test
FP cdn-tenant x60
[!] HIGH: 88 of 136 attributed assets belong to other organisations
Naive closure from one seed domain. Real output; the script groups false positives by type.

The eight "Nimbus Cloud" IPs are the three released addresses, the agency's server and its two clients' landing pages, and the two typo-squat servers. Recall is perfect and precision is 0.35. Hand that list to a scanner and most of the traffic goes to the CDN's other customers. Hand it to an analyst and they spend the morning closing alerts on servers that are not yours. There is also a quieter problem: the three released IPs are now counted as "our servers", so nothing flags that our DNS points at a stranger.

Fix 1: weigh evidence, count correlated evidence once

The first change is to stop treating every link as proof. Each pivot gets a base weight that reflects how strong it is on its own:

PivotBase weightWhy
Name under a seed domain1.00You control the zone
RDAP organisation matches0.95Registered to you
Certificate organisation matches0.90A CA validated the organisation
A record from an owned name0.80You pointed it there
Name on the same certificate0.70Someone requested them together
Same analytics ID0.50Easy to copy
CNAME into another domain0.20Usually a provider, not ownership
Same favicon hash0.15Trivial to copy

Scores combine with a noisy-OR: each piece of evidence has a chance of being right, and the asset is ours unless all of them are wrong. Two engineering details matter more than the weights themselves.

No self-vouching. If assets are scored by iterating over the whole graph, a cluster of weakly linked assets can raise each other's scores in a loop: sixty CDN tenants each say the edge IP is a bit ours, and the edge IP then says each tenant is a bit ours. Our first version did this, and the CDN cluster climbed over the threshold on its own. We now settle assets one at a time, most confident first, and an asset's score may only use evidence from assets already settled:

while best:
    x = max(best, key=best.get); score[x] = best.pop(x); settled.add(x)
    for s, d, w, pivot, fan in out[x]:
        if d in settled: continue
        c = weight(w, fan) * score[x]
        if c <= 0.01: continue
        if c > strongest[d].get(pivot, 0): strongest[d][pivot] = c
        best[d] = 1 - math.prod(1 - v for v in strongest[d].values())

Correlated evidence counts once. strongest[d][pivot] keeps only the best piece of evidence per kind of pivot. Sixty names on one shared certificate are one observation, not sixty. Different kinds of pivot (RDAP, DNS, certificate) still combine.

Assets scoring 0.70 or more are attributed; 0.35 to 0.70 go to a review queue; below that they are dropped.

huzaifa@futaqsec: ~/easm-attribution
$ python3 attribute.py scored --no-specificity --no-freshness
[scored -specificity -freshness] attributed=118 true=48 false=70 missed=0 review=11 precision=0.41 recall=1.00
FP 192.0.2.101
FP 192.0.2.102
FP 192.0.2.103
FP 192.0.2.131
FP 192.0.2.132
FP agency x9
FP cdn-tenant x56
$ python3 attribute.py scored --no-specificity --no-freshness --explain www.brand3.test
www.brand3.test: score=0.70 truth=not-ours
+0.70 cert-co-san from go.example.com
Weighted scoring without the specificity and freshness checks. Real output, trimmed.

Better, but not good. The explanation shows why: www.brand3.test scores exactly 0.70 from one piece of evidence, sharing a certificate with go.example.com. On a certificate requested by one company for its own sites, that is strong evidence. On a CDN certificate with twenty-one registrable domains on it, it is close to none.

Fix 2: specificity, because shared pivots say little

The weight of a pivot should fall as more unrelated registrable domains share it. We count distinct registrable domains (the part a company actually registers, which the Public Suffix List defines in the real world) on each certificate, IP address and analytics ID, and divide:

def weight(w, fanout):
    # one pivot shared by many unrelated registrable domains says little about any of them
    return w / (1 + math.log2(fanout))

A certificate with one registrable domain keeps its full 0.70. With two (our microsite and the agency's platform) it drops to 0.35. With twenty-one it drops to 0.13. A logarithm rather than a straight division keeps moderately shared pivots useful: an analytics ID seen on four domains still contributes 0.17.

huzaifa@futaqsec: ~/easm-attribution
$ python3 attribute.py scored --no-freshness
[scored -freshness] attributed=51 true=48 false=3 missed=0 review=1 precision=0.94 recall=1.00
FP 192.0.2.101
FP 192.0.2.102
FP 192.0.2.103
review queue: sites.example.org
$ python3 attribute.py scored --explain www.brand3.test
www.brand3.test: score=0.13 truth=not-ours
+0.13 cert-co-san from go.example.com
$ python3 attribute.py scored --explain sites.example.org
sites.example.org: score=0.48 truth=not-ours
+0.35 cert-co-san from offers.example.com
+0.20 cname from offers.example.com
$ python3 attribute.py scored --explain 192.0.2.182
192.0.2.182: score=0.17 truth=not-ours
+0.17 analytics-id from SEED
With specificity. Real output.

The CDN tenants, the agency's clients and the typo-squats are gone. The agency platform lands in the review queue, which is the right answer: it is not ours, but it is a third party that serves our name, so it belongs on the supplier list rather than the scan list. The two landing pages carrying our copied analytics ID score 0.17 and drop out.

Typo-squats need a separate path. They should never be attributed, but they matter. In our model, name similarity and a copied favicon feed a brand-protection list, not the inventory.

Three false positives remain: the released cloud IPs. Every piece of evidence for them is real. It is just out of date.

Fix 3: freshness, and what a stale record really means

Historical evidence (an old CT entry, an A record nobody removed) says what was true. Before an IP outside our own registered space inherits ownership from a name, we check what it serves now. If the IP is asked for our name over TLS and answers with somebody else's certificate, the link is stale and carries no weight:

for h, rtype, ip in lab["dns"]:
    if rtype == "A" and ip in pages and rdap.get(ip) != seeds["org"]:
        served = {regdom(n) for n in pages[ip]["cert_sans"]}
        if regdom(h) not in served:
            stale.add((h, ip))
huzaifa@futaqsec: ~/easm-attribution
$ python3 attribute.py scored
stale A records (name ours, IP no longer serves us):
app-old.example.com -> 192.0.2.101
legacy-crm.example.com -> 192.0.2.103
promo2024.example.com -> 192.0.2.102
[scored] attributed=48 true=48 false=0 missed=0 review=1 precision=1.00 recall=1.00
review queue: sites.example.org
$ python3 attribute.py scored --explain 192.0.2.72
192.0.2.72: score=0.86 truth=ours
+0.80 dns-a from partner-api.example.com
+0.17 analytics-id from SEED
+0.15 favicon-hash from SEED
Full scoring: weights, specificity and freshness. Real output.

A perfect score on a lab we designed proves the mechanism, not the numbers. Real data is messier: registrable domains with unusual suffixes, providers that answer every SNI name with a default certificate, organisations that never put their name in a certificate. That is why the review queue exists and why every score carries its explanation. An analyst should be able to see in one line why an asset is in scope.

Notice what freshness did besides removing three false positives. It produced a list of names we own that point at infrastructure we do not control. That is not a cleanup item. It is the precondition for subdomain takeover.

Detection: alerting on dangling records

A dangling record is a DNS entry for your name that points at a resource you no longer control. Whoever is given that IP, or registers that bucket name, can serve content under your domain. MITRE tracks this as Compromise Infrastructure: Domains (T1584.001), and OWASP covers how testers check for it in WSTG-CONF-10. We wrote a small daily monitor over the same observations and tested it on two days of lab data. On day two we released the IP behind reports.example.com (it now serves another company's certificate) and made one CDN edge serve a default certificate for a few minutes, as happens during certificate rotation.

The first rule was the obvious one: alert when an A record points outside our registered IP space.

huzaifa@futaqsec: ~/easm-attribution
$ python3 dangling.py v1
[v1] 2026-11-25: 28 records checked, 10 alerts
ALERT app.example.com A -> 192.0.2.70 rdap=Nimbus Cloud, serves_us=True
ALERT reports.example.com A -> 192.0.2.71 rdap=Nimbus Cloud, serves_us=True
ALERT partner-api.example.com A -> 192.0.2.72 rdap=Nimbus Cloud, serves_us=True
ALERT beta.example.com A -> 192.0.2.73 rdap=Nimbus Cloud, serves_us=True
ALERT staging.example.com A -> 192.0.2.74 rdap=Nimbus Cloud, serves_us=True
ALERT app-old.example.com A -> 192.0.2.101 rdap=Nimbus Cloud, serves_us=False
ALERT promo2024.example.com A -> 192.0.2.102 rdap=Nimbus Cloud, serves_us=False
ALERT legacy-crm.example.com A -> 192.0.2.103 rdap=Nimbus Cloud, serves_us=False
ALERT go.example.com A -> 192.0.2.132 rdap=EdgeFront CDN, serves_us=True
ALERT go.example.com A -> 192.0.2.131 rdap=EdgeFront CDN, serves_us=True
Rule v1 on day one. Real output.

Ten alerts, seven of them healthy cloud and CDN workloads, and it missed the dead bucket entirely because it only looks at A records. A rule like that gets muted within a week. Version 2 alerts only when the target no longer serves our name, or the provider says the resource does not exist:

def failing(o):
    if o["type"] == "CNAME":
        return o["status"] in ("NoSuchBucket", "NXDOMAIN")
    return o["org"] != OUR_ORG and not o["serves_us"]
huzaifa@futaqsec: ~/easm-attribution
$ python3 dangling.py v2
[v2] 2026-11-25: 28 records checked, 4 alerts
ALERT app-old.example.com A -> 192.0.2.101 rdap=Nimbus Cloud, serves_us=False
ALERT promo2024.example.com A -> 192.0.2.102 rdap=Nimbus Cloud, serves_us=False
ALERT legacy-crm.example.com A -> 192.0.2.103 rdap=Nimbus Cloud, serves_us=False
ALERT assets.example.com CNAME -> nw-assets.storage.cloud.test NoSuchBucket
[v2] 2026-11-26: 28 records checked, 6 alerts
ALERT reports.example.com A -> 192.0.2.71 rdap=Nimbus Cloud, serves_us=False
ALERT app-old.example.com A -> 192.0.2.101 rdap=Nimbus Cloud, serves_us=False
ALERT promo2024.example.com A -> 192.0.2.102 rdap=Nimbus Cloud, serves_us=False
ALERT legacy-crm.example.com A -> 192.0.2.103 rdap=Nimbus Cloud, serves_us=False
ALERT go.example.com A -> 192.0.2.131 rdap=EdgeFront CDN, serves_us=False
Rule v2 on both days. Real output.

Day one is exactly right. Day two catches the newly released reports IP, which is the alert we wanted, but also fires on go.example.com because one CDN edge served a default certificate during rotation. Version 3 probes a failing name again 30 minutes later and only alerts if it fails both times. A missing bucket alerts on the first probe, because that state does not flicker.

huzaifa@futaqsec: ~/easm-attribution
$ python3 dangling.py v3
[v3] 2026-11-25: 28 records checked, 4 alerts
ALERT app-old.example.com A -> 192.0.2.101 rdap=Nimbus Cloud, serves_us=False
ALERT promo2024.example.com A -> 192.0.2.102 rdap=Nimbus Cloud, serves_us=False
ALERT legacy-crm.example.com A -> 192.0.2.103 rdap=Nimbus Cloud, serves_us=False
ALERT assets.example.com CNAME -> nw-assets.storage.cloud.test NoSuchBucket
[v3] 2026-11-26: 28 records checked, 5 alerts
ALERT reports.example.com A -> 192.0.2.71 rdap=Nimbus Cloud, serves_us=False
ALERT app-old.example.com A -> 192.0.2.101 rdap=Nimbus Cloud, serves_us=False
ALERT promo2024.example.com A -> 192.0.2.102 rdap=Nimbus Cloud, serves_us=False
ALERT legacy-crm.example.com A -> 192.0.2.103 rdap=Nimbus Cloud, serves_us=False
ALERT assets.example.com CNAME -> nw-assets.storage.cloud.test NoSuchBucket
Rule v3, with a re-probe before alerting. Real output.

Every remaining alert is a name we own pointing at something we do not. The 30-minute re-probe delays a real alert by half an hour, which is a fair price for a rule people keep switching on.

Remediation: fix the records, then fix the process

For each alert the fix is the same: delete or repoint the DNS record. For the bucket, either delete the CNAME or recreate the bucket under your own account so nobody else can claim the name.

 ; zone example.com
-app-old      300  IN A      192.0.2.101
-promo2024    300  IN A      192.0.2.102
-legacy-crm   300  IN A      192.0.2.103
-assets       300  IN CNAME  nw-assets.storage.cloud.test.

Records are the symptom. The cause is a decommissioning order that releases the resource first and forgets the DNS. Microsoft's guidance on dangling DNS makes the same point for Azure, and the steps below apply to any provider:

  1. Remove DNS first. When a service is retired, delete its records before releasing the IP, the bucket or the app.
  2. Keep the owner on the record. Every external DNS record should map to a named team or system, so an alert has someone to go to.
  3. Feed attribution back into the inventory. Assets in the review queue get a decision (ours, supplier, not ours) and that decision is stored, so the same question is not asked every week.
  4. Keep scanning scope separate from discovery. Only attributed assets go to active testing. Anything below the threshold is observed passively at most.

How we apply this

When we map an organisation's external footprint, the inventory is only as useful as its attribution. Every asset we put in scope carries the evidence that put it there, shared infrastructure is treated as a provider rather than an owner, and stale records are reported as findings in their own right. These principles are what attribution in FutaqSec EASM is built on, and attribution is also the first step before any external penetration test: we do not test what we cannot show is yours.

For the wider picture, see What Is External Attack Surface Management (EASM)? and, for the same problem under deal pressure, Acquiring a Company? Assess Its External Exposure Before Day One. Once the inventory is right, Vulnerability Prioritisation Beyond CVSS covers what to fix first.

Checklist

  • Every external DNS record has a named owner.
  • Decommissioning removes DNS before releasing IPs, buckets or apps.
  • Attribution weighs shared pivots (CDN certificates, shared IPs, analytics IDs) by how many domains share them.
  • Evidence for third-party IPs is checked against what the IP serves today.
  • A daily check alerts on names that point at resources you no longer control, with a re-probe before it fires.
  • Only attributed assets are sent to active scanning.

Sources

  • EASM
  • Asset Discovery
  • DNS
  • Subdomain Takeover
  • Detection Engineering
HH

Written by

Huzaifa Hafeez

Chief Technology Officer, FutaqSec

Keep reading

Attack Surface6 min read

What Is External Attack Surface Management (EASM)?

Your attack surface changes every time someone spins up a subdomain or opens a port. EASM is how you see it the way an attacker does, continuously.

Huzaifa Hafeez

Incident Response9 min read

Tabletop Exercises That Test Decisions, Not Scripts

Most tabletops end with everyone agreeing the plan works. How we design exercises around the hard decisions, with injects, a clock and real follow-up.

Arslan Amin

Not sure where to start?

A 30-minute scoping call is enough to understand your environment and recommend the right first step. No obligation.

Book a free consultation