Skip to content

DNS and Domain Investigation

The Domain Name System is both an investigative resource and an adversary tool, used for attribution, fast-flux evasion, and command-and-control communication. This topic covers DNS record types, WHOIS and passive-DNS querying, and common attacker abuse patterns investigators encounter.

Last updated:

Share

DNS investigation is the practice of querying and analysing Domain Name System records, registration data, and historical resolution logs to attribute cyber activity, map attacker infrastructure, and support criminal proceedings. Every internet-connected device relies on DNS to translate human-readable names into IP addresses, which means every connection leaves a trail of queries that investigators can recover. DNS record types such as A, MX, NS, CNAME, and TXT each expose different facets of how a domain is used. WHOIS registration data identifies the registrant of a domain. Passive DNS databases capture the historical mapping between domain names and IP addresses, allowing investigators to reconstruct infrastructure that an attacker has already taken down or reconfigured.

Attackers exploit DNS in several well-documented ways. Fast-flux networks rotate A records through pools of compromised hosts to defeat IP-based blocking. Domain generation algorithms produce thousands of pseudo-random domains daily so that malware can reach its command-and-control server even if most of the domain list is blocked. DNS tunnelling encodes data inside query and response strings to exfiltrate information through firewalls that permit DNS traffic. Understanding these techniques is a prerequisite to both detecting them in network logs and explaining them to a court.

The investigative process follows a structured sequence: identify the domain or IP anchor, query live DNS and registration data, pivot through passive DNS to find related infrastructure, correlate with threat intelligence feeds, and document the chain of evidence under applicable law. Investigators across India, the US, the UK, and the EU operate under different data-retention regimes and mutual assistance frameworks, but the underlying DNS evidence is the same: records that a domain resolved to a given IP at a given time are among the most durable artefacts in a cyber case.

Anchor: known malicious domain or IP address (from phishing email, malware sample, or incident report)Passive DNS reverselookup: all domainsthat resolved to thesame IP, withtimestampsWHOIS and RDAP:registrar, nameservers,registration date,registrant orgCertificatetransparency logs:sibling domains sharingthe same TLS cert orissuing accountLive DNS query: A, MX,NS, TXT records and TTLvaluesAttribution finding: domains sharing NS, hosting IP, cert account, or registrar cluster to the sameattacker campaignShort TTL on A record (less than 120 s with rotating IP) signals fast-flux. High-entropy non-resolving subdomains in logs signal DGA. Long subdomain labels signal DNS tunnelling.
Four concurrent pivots from a single anchor domain: each pivot source yields a distinct class of related infrastructure, and shared attributes across pivots confirm attribution to one actor.

By the end of this topic you will be able to:

  • Identify the DNS record types relevant to a cyber investigation and explain what each record reveals about domain infrastructure.
  • Conduct a structured WHOIS and passive-DNS query workflow to map a domain's registration history and historical IP associations.
  • Explain fast-flux, double-flux, domain generation algorithms, and DNS tunnelling, and describe the indicators that distinguish each in a query log.
  • Apply pivot analysis to link multiple domains and IP addresses belonging to the same attacker campaign.
  • Describe the legal mechanisms for obtaining DNS and WHOIS evidence in India, the US, the UK, and across borders via mutual legal assistance.
Key terms
A record
A DNS resource record that maps a domain name to an IPv4 address. The primary attribution record in most investigations. An AAAA record performs the same function for IPv6 addresses.
Passive DNS
A historical database of DNS resolutions collected by sensors at recursive resolvers or network taps. Passive DNS shows which IP addresses a domain resolved to in the past and when, enabling investigators to reconstruct attacker infrastructure after it has changed.
Fast-flux
An evasion technique in which a domain's A records cycle through a large pool of IP addresses with very short TTL values. Double-flux additionally rotates the NS records. Both techniques make takedown significantly harder.
Domain generation algorithm (DGA)
Code embedded in malware that produces a large set of pseudo-random domain names on a scheduled basis. The malware tries each until one resolves, connecting it to command-and-control infrastructure even if most of the domain list has been blocked.
DNS tunnelling
A technique that encodes data inside DNS query strings or TXT/CNAME response records to carry non-DNS traffic through firewalls that permit DNS. Used for data exfiltration and C2 communication in environments with strict egress filtering.
WHOIS
A query protocol that returns registration data for a domain, including registrant name, organisation, email, nameservers, and registration and expiry dates. Since ICANN's GDPR alignment policy took effect in 2018, much registrant contact data for .com and other gTLDs is redacted by default in public queries.

DNS record types and their investigative value

DNS is a distributed database that answers one core question: what IP address corresponds to this name? But the database holds many record types beyond simple name-to-address mappings, and each type exposes a different facet of how a domain is configured and used. Investigators who understand the full record set can extract far more attribution data from a single domain query than one who only looks at the A record.

Record typeMaps or containsInvestigative use
ADomain to IPv4 addressPrimary host attribution; TTL reveals fast-flux when very short
AAAADomain to IPv6 addressIPv6 infrastructure attribution; often overlooked in manual queries
MXDomain to mail server hostnameIdentifies phishing and spam infrastructure; shared MX ties campaigns
NSDomain to authoritative nameserverNameserver reuse links domains across campaigns; rotated in double-flux
CNAMEDomain alias to canonical nameReveals CDN or bulletproof-host relationships; masks true origin IP
TXTArbitrary textSPF/DKIM/DMARC fingerprint email infra; C2 data encoded here in DNS tunnelling
SOAZone authority and serialZone serial changes reveal when a domain's DNS was last modified

The TTL (time-to-live) field on any record is an underused forensic indicator. A legitimate CDN or enterprise domain typically sets TTL values between 300 and 3600 seconds. Fast-flux domains frequently use values of 60 seconds or less because they need resolvers to re-query quickly as the IP pool rotates. When a domain's A record TTL is below 120 seconds and the record changes on every query, that combination is a strong indicator of fast-flux operation.

WHOIS querying and registration data

WHOIS returns the registration record for a domain: who registered it, when, through which registrar, what nameservers it uses, and when it expires. Before May 2018, public WHOIS for gTLDs often included full registrant name, postal address, phone number, and email. After ICANN aligned its policies with the EU's General Data Protection Regulation, most registrars began redacting personal contact data from public responses. The underlying data still exists at the registrar but requires a formal legal request to access.

Even with redacted contact data, WHOIS records remain investigatively useful. The registrar itself, the nameservers assigned, the registration date, and the registrant organisation field (when present) can all serve as pivot points. A cluster of domains registered on the same date, through the same registrar, pointing to the same nameservers is a strong signal of a coordinated campaign, even if the registrant contact is redacted. The RDAP protocol (Registration Data Access Protocol) is the modern replacement for WHOIS and provides structured JSON output that is easier to process programmatically.

Country-code TLDs such as .in, .uk, and .de are administered by national registries with their own WHOIS policies. India's .in domains are managed by the National Internet Exchange of India (NIXI). UK domains under .co.uk are managed by Nominet, which provides a tiered WHOIS service with fuller data available to accredited law enforcement. Investigators must identify the correct registry for the TLD before querying, as a gTLD WHOIS server will not have data for ccTLD domains.

Passive DNS and historical resolution analysis

Passive DNS databases are built by organisations that operate large recursive resolvers or that deploy sensors across network infrastructure. Every time one of those resolvers answers a query, the resolution, the domain queried, the answer returned, and the timestamp are stored. Over time, these databases accumulate resolution histories for hundreds of billions of domains. Commercial providers including Farsight Security DNSDB, VirusTotal passive DNS, and RiskIQ (now part of Microsoft Defender) offer investigator access.

The core investigative pivot in passive DNS is the IP-to-domain lookup, also called a reverse passive DNS query. Given an IP address, the query returns all domains that resolved to that IP over the collection period. If a phishing domain resolves to an IP and an investigator reverse-queries that IP, they may find dozens of other domains that used the same host at different times, each potentially part of the same campaign. Conversely, a domain-to-IP query shows all IPs that the domain has resolved to, which may span multiple hosting providers and time periods.

Timeline reconstruction from passive DNS is particularly powerful in cases involving infrastructure migration. Attackers frequently move domains between hosts, either after detection or as a planned rotation. A passive DNS timeline showing a domain at IP A for three weeks, then at IP B, then at IP C, combined with threat intelligence about those IPs, can establish both the duration of a campaign and its operational security patterns.

Attacker abuse patterns: fast-flux, DGA, and DNS tunnelling

Three DNS abuse patterns appear repeatedly in cyber investigations and each has a distinct signature in query logs.

Fast-flux networks use DNS TTL values as short as 60 seconds and rotate A records through a pool of compromised hosts, each acting as a proxy for the actual backend server. The technique was widely used by the Storm botnet from 2007 onward and remains common in malware distribution and phishing campaigns. Detection in logs requires correlating short TTL values with high change frequency on the same domain. Double-flux additionally rotates NS records, which means the domain's authoritative nameservers themselves change frequently, making registrar-level takedown more complex because there is no stable NS to target.

Domain generation algorithms produce a deterministic but externally unpredictable list of domain names based on a seed value, often the current date. The Conficker worm (2008) generated 250 domains per day. Later families such as Cryptolocker (2013) and Mushtik generated thousands per day. Investigators detect DGA traffic by analysing DNS query logs for bursts of queries to non-resolving high-entropy domains. Reverse-engineering the malware to extract the DGA seed and schedule allows analysts to predict future domains and apply for pre-emptive sinkhole orders.

DNS tunnelling encodes data in the subdomain label of a query. A tool like Iodine or DNScat will convert a file or a shell session into a series of queries such as aGVsbG8gd29ybGQ.attacker-c2.com, where the base64-encoded string in the subdomain carries the payload. The response carries data back in TXT or CNAME records. Detection indicators include: query length far above the median for the domain (legitimate subdomains rarely exceed 20 characters), high query rate to a single second-level domain, and a high proportion of TXT record queries from a single endpoint.

Infrastructure pivoting: linking domains and IP addresses

Attribution in cyber investigations rarely comes from a single record. It comes from building a graph of relationships between domains, IP addresses, nameservers, registrant data, and TLS certificates, and identifying the nodes that connect multiple campaigns to the same actor. This process is called infrastructure pivoting.

A structured pivot workflow begins with the initial indicator, typically a domain or IP from a phishing email, malware sample, or incident report. From that anchor, the investigator queries: (1) all IP addresses the domain has resolved to via passive DNS; (2) all domains that have resolved to each of those IPs; (3) WHOIS registration data for each discovered domain, noting shared registrant email, nameserver, or registrar; (4) TLS certificate transparency logs, which record every SSL certificate issued for a domain and often reveal subdomains and related domains that share the same certificate or the same issuing account. Tools such as Shodan, Censys, and RiskIQ automate parts of this pivot chain.

Certificate transparency logs are a particularly underused resource. Since 2018, all publicly trusted TLS certificates must be logged in public CT log servers before browsers will accept them. When an attacker creates infrastructure for a new campaign, issuing a certificate creates a permanent, timestamped public record. Querying CT logs for a known attacker domain sometimes reveals sibling domains that were not yet known to threat intelligence. Services such as crt.sh provide free access to the consolidated CT log database.

Pivot analysis for attribution is also relevant to the Indicators of Compromise workflow. Domains and IPs discovered through pivoting become IOCs that can be shared with other organisations, ingested into SIEM systems, and incorporated into threat intelligence products. The STIX 2.1 standard supports domain-name and URL objects with relationship links to IP addresses, enabling structured sharing of pivot chains.

Check your understanding
Question 1 of 4· 0 answered

An analyst observes that a suspicious domain has A record TTL values of 60 seconds and the IP address changes on every query. Which attacker technique does this most likely indicate?

Key Takeaways

  • DNS record types beyond the A record, including MX, NS, TXT, and CNAME, each expose different facets of domain infrastructure and serve as pivot points in attribution analysis.
  • Passive DNS databases provide historical resolution data that survives attacker infrastructure migration; reverse passive DNS queries on a hosting IP are among the fastest ways to find related malicious domains.
  • Fast-flux is identified by very short TTL values combined with rapid IP rotation; DGA traffic shows as high-volume queries to high-entropy, non-resolving domains; DNS tunnelling appears as unusually long subdomains and a high rate of TXT record queries from a single host.
  • Certificate transparency logs record every publicly trusted TLS certificate and provide a timestamped, publicly accessible pivot to subdomains and sibling domains that may not yet appear in passive DNS.
  • DNS evidence collection must follow applicable law: India's Bharatiya Nagarik Suraksha Sanhita 2023 and IT Act 2000, the US Stored Communications Act, the UK Investigatory Powers Act 2016, and EU data retention frameworks all impose different obligations on investigators and custodians.
What is passive DNS and why do investigators use it?
Passive DNS is a historical database of DNS resolutions collected by sensors placed at recursive resolvers or network taps. Unlike live WHOIS or active DNS queries, passive DNS shows what IP addresses a domain resolved to in the past, and when those resolutions occurred. Investigators use it to link domains that shared an IP, track infrastructure migration, and reconstruct attacker timelines even after the attacker has changed their hosting.
What is a fast-flux network and how does DNS enable it?
Fast-flux is an evasion technique in which a domain's A records cycle through a large pool of IP addresses with very short TTL values, often 60 seconds or less. Each IP belongs to a compromised host acting as a proxy. When law enforcement or defenders block one IP, the domain simply resolves to a different one within seconds. Double-flux extends this by also rotating the NS records, making it harder to seize the domain through its registrar.
What DNS record types are most useful in a cyber investigation?
A and AAAA records map domains to IPv4 and IPv6 addresses and are the primary attribution data. MX records identify mail servers and help attribute phishing infrastructure. NS records identify the authoritative nameservers for a domain, which often share infrastructure across campaigns. TXT records frequently contain SPF, DKIM, and DMARC configurations that fingerprint email infrastructure. CNAME records reveal domain aliasing relationships and CDN usage.
What is a domain generation algorithm (DGA) and how do investigators detect it?
A domain generation algorithm is code embedded in malware that produces a large list of pseudo-random domain names on a daily or hourly schedule. The malware tries each in turn until one resolves, connecting it to attacker infrastructure. Investigators detect DGA traffic by analysing DNS query logs for high-entropy, high-volume queries to non-resolving domains, or by reverse-engineering the malware to predict the domain schedule.
What legal frameworks govern DNS evidence collection across jurisdictions?
In India, DNS query logs may be obtained from ISPs under Section 91 of the Bharatiya Nagarik Suraksha Sanhita 2023 or through directions under the Information Technology Act 2000. In the US, the Stored Communications Act (18 USC 2701) governs ISP data requests. In the EU, data retention obligations under national laws implementing the e-Privacy Directive apply, though the Court of Justice of the European Union has constrained bulk retention. Cross-border requests use Mutual Legal Assistance Treaties.

Test yourself on Cyber Forensics with free, timed mocks.

Practice Cyber Forensics questions

Found this useful? Pass it along.

Share

Spotted an error in this page? Report a correction or read our editorial standards.

Your journey to becoming a forensic professional starts here.

Practice with mock tests, learn from structured notes, and get your questions answered by a global forensic community, all in one place.