recon-a-domain-passively

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Recon a domain passively

被动侦察域名

Turn one domain into a defensible map of an organization's internet-facing estate plus the owner behind it. The techniques live in other skills; what this workflow contributes is the order, the inventory, and the stopping rule. Two failure modes to avoid from the start: enumerating for hours and producing 400 hostnames with no attribution, dates or priority, which is not a map; and drifting active without noticing, because one probe "just to check if it's up" ends the passive claim. Decide the passive boundary before step 2, not during it.
将单个域名转化为一份可用于防御的组织互联网暴露资产图谱,同时关联其背后的所有者。相关技术存在于其他技能中;本工作流的核心贡献在于执行顺序资产清单终止规则。从一开始就要避免两种失败模式:一是耗时数小时枚举生成400个主机名,但没有归属信息、日期或优先级,这不能称之为图谱;二是不知不觉转向主动侦察,因为一次“只是检查是否在线”的探测就打破了被动侦察的前提。在第二步之前就确定被动侦察的边界,而不是中途再定。

Ordering logic

排序逻辑

Each stage feeds the next, and the sequence is cheapest-and-quietest first:
OrderStageWhy here
1Registration and DNSDefines the perimeter. Without the apex set and the registrant you do not know what is in scope
2Name expansionArchival sources only. Costs nothing, touches nothing, produces the candidate list everything else consumes
3Resolution and inventoryConverts names to addresses, which is what infrastructure lookups take as input
4Infrastructure and servicesNeeds stage 3's addresses. Third-party scan data only
5Content, history, code, tech stackNeeds hostnames and org names from earlier stages as search terms, and reuses artifacts already collected
6Owner attributionThe registrant, tenant and organization names surfaced above are the input
Run stages 1–5 as a loop, not a line. Every stage produces new selectors that belong back at stage 1 or 2. Stop looping when the stopping rule in step 7 is met.
每个阶段的输出为下一阶段提供输入,顺序遵循“成本最低、最隐蔽优先”的原则:
顺序阶段排序原因
1注册信息与DNS定义侦察范围。如果没有顶级域名集合和注册人信息,你无法明确侦察边界
2名称扩展仅使用归档数据源。无成本、无接触,生成后续所有阶段所需的候选列表
3解析与清单构建将名称转换为地址,这是基础设施查询的输入条件
4基础设施与服务需要阶段3生成的地址信息。仅使用第三方扫描数据
5内容、历史记录、代码、技术栈需要早期阶段获取的主机名和组织名称作为搜索词,并复用已收集的工件
6所有者归属以上阶段发现的注册人、租户和组织名称作为输入
将阶段1–5作为循环执行,而非线性执行。每个阶段都会生成新的选择器,需要回到阶段1或2重新处理。当步骤7的终止规则满足时,停止循环。

Step 1 — Authorized scope

步骤1 — 授权范围

State in writing: the subject (which domains and netblocks, and which adjacent ones are explicitly excluded), the objective, the jurisdictions involved, and the passive boundary — specifically whether DNS resolution, wordlist brute-forcing and any HTTP contact with the target are permitted. Read ../../ETHICS.md. If being noticed matters, set up attribution hygiene with
investigate-without-getting-made
before querying anything.
Done when subject, objective, out-of-bounds list, jurisdiction and passive boundary are written down, and you know which of the three grey activities you may perform.
以书面形式明确:侦察对象(包含哪些域名和网段,明确排除哪些相邻对象)、目标、涉及的司法管辖区,以及被动侦察边界——具体说明是否允许DNS解析、字典暴力破解和与目标的任何HTTP交互。阅读../../ETHICS.md。如果避免被发现很重要,在查询任何内容之前,使用
investigate-without-getting-made
设置归属防护措施。
完成标志:侦察对象、目标、排除列表、司法管辖区和被动边界已书面记录,且明确允许执行哪三类灰色活动。

Step 2 — Registration and DNS baseline

步骤2 — 注册信息与DNS基线

Run
who-owns-this-domain
on every in-scope apex. You want registrar, dates and status, nameservers, the full record set, and the mail and SaaS fingerprints TXT, MX, DKIM and CAA give up. Where registration is redacted, pull historical WHOIS in the same pass.
Done when every apex has a registration record with a retrieval timestamp, a complete record set, and a list of named third-party vendors extracted from its DNS.
对每个范围内的顶级域名运行
who-owns-this-domain
。你需要获取注册商、日期和状态、域名服务器、完整记录集,以及TXT、MX、DKIM和CAA记录暴露的邮件与SaaS指纹。如果注册信息被隐藏,同时获取历史WHOIS记录。
完成标志:每个顶级域名都有带检索时间戳的注册记录、完整记录集,以及从其DNS中提取的第三方供应商列表。

Step 3 — Expand the name space

步骤3 — 扩展名称空间

Run
find-hidden-subdomains
. Certificate Transparency and passive DNS first, because they are free, historical and invisible. Feed it the organization names from step 2 as well as the domains — a certificate-subject search finds sibling and acquired domains nobody put in the brief.
Done when you have a deduplicated candidate hostname list with the source and first-seen date recorded per name, and any newly discovered apex domains have been pushed back through step 2.
运行
find-hidden-subdomains
。优先使用证书透明度(Certificate Transparency)和被动DNS数据源,因为它们免费、基于历史记录且完全隐蔽。除域名外,还需输入步骤2获取的组织名称——证书主体搜索可以发现未在任务简报中提及的兄弟域名和收购域名。
完成标志:已生成去重的候选主机名列表,每个名称记录了来源和首次发现日期,且新发现的顶级域名已送回步骤2重新处理。

Step 4 — Resolve and start the inventory

步骤4 — 解析并启动清单构建

Classify each candidate: resolves to an address, resolves to a third-party CNAME, or does not resolve. Build the inventory now rather than at the end — retrofitting provenance onto a list you already collected is how findings lose their timestamps. The schema and per-row fields are in reference/asset-inventory.md.
Done when every candidate is in one of the three buckets with a resolution timestamp, every resolving host has an IP and an ASN, and every third-party CNAME is attributed to a named vendor.
对每个候选对象进行分类:解析到地址、解析到第三方CNAME、无法解析。现在就开始构建清单,而非等到最后——为已收集的列表追溯来源会导致结果丢失时间戳。清单的 schema 和每行字段定义在reference/asset-inventory.md中。
完成标志:每个候选对象都归入三个类别之一并带有解析时间戳,每个可解析主机都有IP和ASN,每个第三方CNAME都归属到指定供应商。

Step 5 — Infrastructure and services

步骤5 — 基础设施与服务

Run
find-exposed-servers
over the addresses and netblocks from step 4. Query scan platforms only — no port scanning, no service probing. Use the certificate and favicon pivots to catch hosts that share the target's infrastructure without sharing its DNS, and note anything that looks unintentionally exposed.
Done when each in-scope IP has its observed ports and services with scan dates, each netblock has an owner from its RIR record, and any infrastructure found only through cert or favicon pivots has been added to the inventory and attribution-graded.
对步骤4获取的地址和网段运行
find-exposed-servers
。仅查询扫描平台——不进行端口扫描、不探测服务。使用证书和图标哈希关联那些与目标共享基础设施但不共享DNS的主机,并记录任何看起来是无意暴露的内容。
完成标志:每个范围内的IP都有带扫描日期的已观测端口和服务,每个网段都有来自RIR记录的所有者,且仅通过证书或图标哈希发现的基础设施已添加到清单并完成归属分级。

Step 6 — Content, history, code and tech stack

步骤6 — 内容、历史记录、代码与技术栈

Three sources, in this order:
  • read-deleted-pages
    for the estate as it used to be: retired hostnames, old staff pages, exposed paths, pre-CDN infrastructure references.
  • google-like-a-spy
    for what is indexed now on the hosts you found — documents, directory listings, configs, forgotten portals.
  • secrets-in-git-history
    for the org names, GitHub organization slugs, cloud tenant labels and project IDs surfaced in steps 2 to 5.
If imagery matters — a logo reused across a network of sites, a stock photo posing as an office — run
find-the-original-image
. Shared images tie sites together when DNS and registration do not.
Then assemble the tech stack from what you now hold: headers and cookies in archived copies and scan records, certificate issuers, CNAME targets, JavaScript and asset paths, CSP directives, favicon hashes, and the SaaS fingerprints from step 2. Where you need a live page, read a third-party scan of it instead of fetching it.
Done when archived and indexed content is reviewed for the top-priority hostnames, code exposure is documented or ruled out, new hostnames have gone back through step 4, and the stack is documented per host with the artifact each conclusion rests on and versions marked claimed rather than verified.
按以下顺序使用三个数据源:
  • read-deleted-pages
    :获取资产过去的状态:已停用的主机名、旧员工页面、暴露的路径、CDN部署前的基础设施引用。
  • google-like-a-spy
    :查找已发现主机上当前被索引的内容——文档、目录列表、配置文件、被遗忘的门户。
  • secrets-in-git-history
    :针对步骤2至5中发现的组织名称、GitHub组织别名、云租户标签和项目ID进行查询。
如果图像信息重要——比如跨网站复用的logo、冒充办公室的库存照片——运行
find-the-original-image
。当DNS和注册信息无法关联站点时,共享图像可以起到关联作用。
然后根据已收集的信息整理技术栈:归档副本和扫描记录中的头信息与Cookie、证书颁发机构、CNAME目标、JavaScript和资源路径、CSP指令、图标哈希,以及步骤2获取的SaaS指纹。如果需要实时页面,读取第三方扫描结果而非直接获取页面。
完成标志:已审查高优先级主机名的归档和索引内容,记录或排除代码暴露情况,新主机名已送回步骤4处理,且每个主机的技术栈都已记录,包含每个结论所依据的工件,并标记版本为“声称”而非“已验证”。

Step 7 — Decide whether the map is done

步骤7 — 判断图谱是否完成

Completeness is a judgement, so make it against criteria:
  • Two consecutive new sources produced no new assets. Saturation, not exhaustion, is the signal.
  • Every discovered name is resolved or classified, and every resolving host has an owner and an attribution grade.
  • Naming conventions have no unexplained gaps: if
    web01
    and
    web03
    are in the inventory, you have accounted for
    web02
    .
  • Every named vendor and tenant from step 2 has yielded assets or been ruled out.
  • The objective from step 1 can be answered from the inventory.
A failing criterion tells you exactly which stage to re-enter.
Done when all five pass, or the remaining gaps are written up as stated limitations rather than left implicit.
完整性是主观判断,需依据以下标准:
  • 连续两个新数据源未产生任何新资产。饱和而非穷尽是终止信号。
  • 每个发现的名称都已解析或分类,每个可解析主机都有所有者和归属分级。
  • 命名规则中无无法解释的空白:如果清单中有
    web01
    web03
    ,必须说明
    web02
    的情况。
  • 步骤2中提及的每个供应商和租户都已找到对应资产或被排除。
  • 步骤1的目标可通过清单回答。
未满足的标准会明确告诉你需要回到哪个阶段重新处理。
完成标志:以上五项全部满足,或剩余空白已作为明确限制记录下来,而非隐含未说明。

Step 8 — Hand off the owner

步骤8 — 移交所有者信息

If the registrant, certificate subject, RIR reassignment or tenant label resolves to a legal entity rather than an individual, the domain work is finished and a corporate investigation starts: hand the entity name and jurisdiction to
x-ray-a-company
, take registry and beneficial-ownership questions to
who-really-owns-it
, and send recovered emails to
what-an-email-reveals
. Do not attempt corporate structure from DNS artifacts — DNS shows operators, not shareholders.
Done when every owner-side selector is routed to the right skill or recorded as a dead end with the reason.
如果注册人、证书主体、RIR重新分配或租户标签指向法人实体而非个人,域名侦察工作完成,需启动企业调查:将实体名称和司法管辖区移交
x-ray-a-company
,将注册和实际所有权问题提交
who-really-owns-it
,将恢复的邮件发送给
what-an-email-reveals
。不要尝试通过DNS工件推断企业结构——DNS显示的是运营者,而非股东。
完成标志:每个所有者相关选择器都已路由到对应技能,或作为死胡同记录并说明原因。

Step 9 — Report

步骤9 — 报告

Run
write-the-intel-brief
. Lead with the asset inventory, then the attribution chain, then anything that appears unintentionally exposed, then the limitations from step 7. Done when every claim traces to an inventory row with a source and timestamp, and every finding carries a confidence grade.
运行
write-the-intel-brief
。以资产清单开头,然后是归属链,接着是任何无意暴露的内容,最后是步骤7中的限制条件。完成标志:每个声明都可追溯到带有来源和时间戳的清单行,每个发现都带有置信度分级。

Where this goes wrong

常见问题

  • Scope creep through pivots. Enumeration produces sibling domains endlessly and each looks like the next target. If it is not in the step 1 subject list it is a finding to report, not a workstream to start.
  • Silent drift into active. Resolution, brute-forcing and HTTP probing sit on a spectrum, and tools blur it — passive collectors have active modes one flag away, and one careless flag ends the passive claim for the engagement.
  • Inventory without attribution. Shared hosting, CDN addresses and bundled certs attach assets to your target that are not the target's, and an ungraded inventory row is a liability. Relatedly, a vulnerable SaaS tenant the target merely uses is a supply-chain finding and must be phrased as one.
  • Stale data presented as current. Archives, CT and scan records are all historical, and undated findings are not findings.
  • Stopping at the first quiet moment. No new results usually means one source saturated, not the estate mapped — which is what step 7 catches.
  • Over-collection. Staff names from archived pages and SNMP contacts are personal data. Collect what the objective needs, nothing more.
  • 通过关联导致范围蔓延:枚举会不断产生兄弟域名,每个看起来都像下一个目标。如果不在步骤1的对象列表中,它是需要报告的发现,而非新的工作流起点。
  • 悄然转向主动侦察:解析、暴力破解和HTTP探测处于同一频谱,工具会模糊边界——被动收集器只需一个标志就能切换到主动模式,一次疏忽的标志就会打破整个任务的被动侦察承诺。
  • 无归属的清单:共享主机、CDN地址和捆绑证书会将不属于目标的资产关联到目标,未分级的清单行是一种风险。相关地,目标仅使用的易受攻击SaaS租户属于供应链发现,必须按此表述。
  • 将陈旧数据作为当前数据呈现:归档、证书透明度和扫描记录都是历史数据,无日期的发现不能称之为发现。
  • 在第一个无新结果的时刻停止:无新结果通常意味着一个数据源已饱和,而非资产图谱已完成——这正是步骤7要排查的情况。
  • 过度收集:归档页面中的员工姓名和SNMP联系人属于个人数据。仅收集目标所需的信息,无需多余内容。

Confidence grading

置信度分级

Grade the inventory and the attribution separately. A host can be a confirmed live service and an unconfirmed asset of your target at once, and conflating the two is the most common reporting error in domain recon.
  • Confirmed asset — under a domain whose registration you verified, or on a netblock reassigned to the target by name, or serving a certificate the target demonstrably controls, and corroborated by a second independent source.
  • Probable asset — one strong infrastructure fingerprint (shared DKIM key, same mail tenant label, same provider-assigned nameserver pair, distinctive favicon or body string) with nothing contradicting it.
  • Unconfirmed — shared-hosting or CDN addresses, bundled-certificate names,
    org:
    -only attribution, or an aggregator result whose underlying record you have not seen.
Per-technique criteria in the technique skills override these where more specific.
清单归属分别进行分级。一个主机可以同时是已确认的活跃服务和未确认的目标资产,混淆两者是域名侦察报告中最常见的错误。
  • 已确认资产——位于你已验证注册信息的域名下,或在目标名义重新分配的网段上,或提供目标可证明控制的证书,并由第二个独立来源证实。
  • 可能资产——有一个强基础设施指纹(共享DKIM密钥、相同邮件租户标签、相同提供商分配的域名服务器对、独特的图标或主体字符串),且无矛盾信息。
  • 未确认——共享主机或CDN地址、捆绑证书名称、仅基于
    org:
    的归属,或未查看底层记录的聚合器结果。
如果技术技能中有更具体的标准,将覆盖上述通用标准。

Worked example

实战示例

Engagement: a client is acquiring
meridian-freight.test
and wants its internet-facing estate before signing. Scope: the apex plus any domain the registrant demonstrably controls. Boundary: resolution allowed, no brute-forcing, no HTTP contact.
Step 2: five-year-old registration, registrant redacted but country
NL
, a Microsoft 365 tenant, and TXT tokens for a support desk, an identity provider and a GitHub organization. That GitHub org name is the highest-value item in the entire record set and it cost one lookup.
Step 3 returns 74 candidates, and a certificate-subject search surfaces
meridian-logistics-group.test
, which is not in the brief. Back through step 2: same M365 tenant label in its MX, so same operator. Included, client notified.
Step 4: 31 resolve, nine of those to third-party CNAMEs — relationships, not assets.
uat-portal
sits in a small Dutch hosting netblock distinct from everything else, which makes it the lead of the engagement.
Step 5: that UAT host had 443 and 3306 observed open five weeks earlier. Also eleven hosts sharing a favicon hash, which looked like a hidden estate until the hash turned out to belong to a stock CMS theme — the dead end, and exactly the kind that inflates a report if you skip the check.
Step 6: a public repo in the GitHub org holds a CI config naming two internal hostnames absent from DNS. They do not resolve; they still matter, because the acquirer inherits those systems.
Step 7: third consecutive source adds nothing,
web02
accounted for, every vendor chased. Complete, with one stated gap — the apex wildcard cert means subdomains issued after it are invisible to CT. Step 8: Dutch registrant country plus the sibling domain plus the group name in the cert subject point at a holding structure, so it goes to
x-ray-a-company
.
任务:客户正在收购
meridian-freight.test
,希望在签约前了解其互联网暴露资产。范围:顶级域名加上注册人可证明控制的任何域名。边界:允许解析,禁止暴力破解和HTTP接触。
步骤2:注册信息已有5年历史,注册人信息被隐藏但显示国家为
NL
,使用Microsoft 365租户,TXT记录包含支持台、身份提供商和GitHub组织的令牌。该GitHub组织名称是整个记录集中最有价值的信息,仅需一次查询即可获取。
步骤3返回74个候选对象,证书主体搜索发现
meridian-logistics-group.test
,不在任务简报中。回到步骤2:其MX记录中有相同的M365租户标签,说明是同一运营者。将其纳入范围并通知客户。
步骤4:31个可解析,其中9个指向第三方CNAME——这些是关系,而非资产。
uat-portal
位于一个独立的小型荷兰托管网段中,成为本次任务的重点。
步骤5:该UAT主机在5周前被观测到开放443和3306端口。另外11个主机共享相同的图标哈希,看起来像隐藏资产,直到发现该哈希属于一款通用CMS主题——这是死胡同,如果跳过检查会导致报告内容膨胀。
步骤6:GitHub组织中的一个公共仓库包含CI配置,提及两个DNS中不存在的内部主机名。它们无法解析,但仍然重要,因为收购方将继承这些系统。
步骤7:连续第三个数据源未添加任何新内容,
web02
的情况已说明,所有供应商都已排查完毕。任务完成,存在一个明确的空白——顶级域名通配符证书意味着证书颁发后的子域名无法通过证书透明度发现。步骤8:荷兰注册国家、兄弟域名和证书主体中的集团名称指向控股结构,因此移交至
x-ray-a-company

Pivots out

关联跳转

SelectorGoes to
Legal entity, group name, jurisdiction
x-ray-a-company
,
who-really-owns-it
Emails and phone numbers
what-an-email-reveals
,
whose-number-is-this
Named employees from archives or metadata
find-anyone
Developer handles from repositories
hunt-a-handle
Documents pulled from the estate
secrets-in-file-metadata
Breach exposure for the domain's mailboxes
what-leaked-about-you
The whole asset and entity set, for structure
graph-the-network
选择器跳转至
法人实体、集团名称、司法管辖区
x-ray-a-company
,
who-really-owns-it
电子邮件和电话号码
what-an-email-reveals
,
whose-number-is-this
归档或元数据中的员工姓名
find-anyone
代码仓库中的开发者别名
hunt-a-handle
从资产中提取的文档
secrets-in-file-metadata
域名邮箱的泄露情况
what-leaked-about-you
完整的资产和实体集合(用于构建结构)
graph-the-network

Legal and ToS notes

法律与服务条款说明

Passive collection from third-party datasets is lawful research in most jurisdictions; the boundary is traffic to the target and access to non-public systems. Registrant data recovered from historical WHOIS is personal data under GDPR even though it was once public, so you need a lawful basis and must minimize. Scan-platform and archive terms restrict bulk redistribution — cite findings, do not republish datasets. A discovered exposure authorizes a report to the operator or the relevant CERT and nothing else. And in due diligence, confirm you hold the client's written authority for the scope you are running: "our client is buying them" is not authorization from the target.
在大多数司法管辖区,从第三方数据集进行被动收集属于合法研究;边界在于是否向目标发送流量以及是否访问非公开系统。从历史WHOIS恢复的注册人数据即使曾经公开,在GDPR下仍属于个人数据,因此你需要合法依据并最小化收集范围。扫描平台和归档服务的条款限制批量再分发——引用发现内容,不要重新发布数据集。发现的暴露情况仅授权向运营者或相关CERT报告,不得用于其他用途。在尽职调查中,确认你持有客户针对所执行范围的书面授权:“我们的客户正在收购他们”并不代表获得目标的授权。