Post-Breach DNS Analysis for Finding C2 Traffic
When an Australian organisation confirms a breach, DNS history can reveal the attacker's operational timeline after the initial alert. Queries to staging domains, generated hostnames or a command-and-control server often leave a trace even when later payloads travel through HTTPS. This helps defenders distinguish isolated malware from a coordinated intrusion, identify systems that contacted attacker infrastructure, and establish how long the adversary remained inside. Correlation also shows whether the same infrastructure appeared across several business units, reducing the risk of chasing a single false positive.
Post-breach analysis of DNS logs to find C2 communication turns those traces into a repeatable investigation rather than a single indicator search. Analysts can reconstruct beacon intervals, expose data channels hidden in DNS tunnelling, and connect suspicious domains to processes and accounts through endpoint telemetry. The result supports faster scoping, prioritised containment and defensible remediation across hybrid environments. This matters because the visible domain is often only the handshake, while later traffic may use a second domain, direct IP address or encrypted web channel.
Comparing DNS Evidence Sources
DNS evidence is only as useful as its visibility and retention. Combine client-side records with infrastructure context rather than relying on one feed, and correlate sources before testing a theory.
| Evidence source | What it reveals | Main value | Important limitation |
|---|---|---|---|
| Recursive resolver logs | Client lookups, answers, response codes, TTLs and timestamps | Broad internal visibility across users and systems | Retention, caching and client-IP handling vary |
| Endpoint and EDR telemetry | The process, user and host associated with each lookup | Strong attribution to a running process | History may be short or a collection gap may exist |
| Passive DNS and threat intelligence | Historical resolutions, registration and hosting relationships | Expands context beyond the local network | Records can be incomplete, delayed or ambiguous |
| Network flow metadata | Query timing, volume and destination infrastructure | An independent view of beaconing or bulk transfers | Encrypted traffic and shared hosting can obscure meaning |
The strongest finding links a fully qualified domain name to a source host, process, user and time. Internal recursive logs often provide that link, while EDR telemetry identifies the requesting process. Passive DNS can reveal recent infrastructure changes or related malicious hosts. Analysts should normalise timestamps to UTC, preserve original device times, record collection gaps and avoid treating a shared IP or CDN domain as proof of compromise. Known benign exceptions should be recorded beside each indicator so containment can be reversed safely.
The Australian Context for DNS Investigations
Australian investigations must reconcile operating environments, privacy duties and response models. Teams in Sydney, Melbourne and Brisbane may support offices, cloud services and remote workers across time zones, so beaconing can appear as separate clusters after daylight-saving changes or delayed resolver synchronisation. Central logging helps, but both converted and original timestamps should be retained.
Local operating customs shape the evidence available. Many Australian mid-market businesses have historically outsourced 24-hour monitoring to managed detection and response providers, while larger organisations run local security operations teams. The market includes MSSPs, MDR specialists and global vendors with different log schemas and escalation paths. ASD and ACSC guidance through the Joint Cyber Security Centre offers a coordination baseline, but access to resolver and endpoint data must be secured. Collection should respect Privacy Act 1988 and Notifiable Data Breaches scheme requirements while preserving evidence for any eligible notification. The locally managed .au namespace also gives defenders a relevant enrichment path: registration changes, misleading brand subdomains and domain takeover attempts should be checked alongside global threat intelligence.
Reconstructing Command-and-Control Behaviour
A defensible reconstruction starts by establishing which internal clients communicated with infrastructure plausibly controlled by the intruder. Search around confirmed malicious domains, then pivot on shared labels, registration details, rare subdomains, matching addresses and hosting relationships. Each pivot should produce a timestamped set of source hosts rather than an unstructured indicator list.
Analysts should group lookups and calculate intervals. Regular callbacks with modest jitter suggest automated beaconing, while bursts of unique, high-entropy subdomains returning NXDOMAIN fit a domain generation algorithm. High label length, TXT response volume or response size can indicate DNS tunnelling used for commands or staged exfiltration. Caching can make activity look sparse, so TTLs must be considered. Preserve raw query names and answers, because stripped or aggregated logs may conceal the subdomain pattern needed to identify the channel.
Confidence rises when DNS behaviour aligns with endpoint facts. A script, scheduled task or suspicious binary generating the queries is stronger evidence than a reputation hit alone. Check whether destinations used cloud, CDN or shared hosting and whether they appeared in the initial access path. Identity sign-ins, VPN sessions and lateral-movement records can show whether the traffic represents persistence, follow-on control or a second compromised system.
Separating Malicious DNS from Legitimate Traffic
Beaconing is identifiable through periodicity, but software updates, health checks and telemetry are also automated. The stronger signal combines repetition from an unusual process or host with sparse responses, an odd destination or an endpoint finding. Test candidate intervals against legitimate local agents, and compare resolver-side with endpoint-side timing because caching distorts cadence.
Tunnelling has another shape: many unique labels, high entropy, large responses, retries and sustained volume. It may conceal command traffic or exfiltrate data through TXT, CNAME and other supported records. Malware can split traffic across domains, so searching only for known C2 hostnames will miss behaviour. Detecting unusual label distributions and tracking destination cohorts provides a behavioural route into the incident. Analysts should also watch for IP-based fallback communication after a domain is blocked or sinkholed.
False positives remain a risk. Security scanners, domain generation errors, tracking pixels and compromised sites can look alarming, while legitimate domains may be flagged because of shared infrastructure. A sound finding states what was observed, explains the rule, lists alternatives and names the corroborating source. This avoids disruptive DNS blocks or account suspensions based on a weak indicator. Reputation alone should never trigger broad containment where business-critical services share the destination.
Moving from Detection to Coordinated Remediation
The first remediation decision is scope. Place every host, account and application that contacted confirmed infrastructure on the incident timeline, not merely on a blocklist. Use first and last DNS contacts to distinguish persistent beaconing from one-off resolution, then map user-to-asset relationships. Endpoint isolation, session revocation and temporary DNS deny rules can follow in proportion to confidence.
Containment should preserve options. Resolver blocking may stop callbacks, but sinkholing shared cloud services could interrupt unrelated traffic. If command traffic has moved to HTTPS, DNS blocking alone will not suffice; malware processes, persistence, credentials and the entry point also need treatment. Rebuilding a system may be safer than manual cleanup when the adversary held privileged access or used fileless techniques. Maintain an evidence chain documenting each action, affected asset and observed result.
CARM Security, developed by Exclusive Networks around integrated vendor technologies for post-breach attack remediation and mitigation, reflects that broader need. DNS-derived findings must sit alongside endpoint, identity, network and threat-intelligence context before remediation begins. The sequence remains: establish confidence, contain active paths, remove persistence, rotate exposed secrets, close the entry point and monitor for renewed resolution or fallback channels.
Practical Priorities for Australian Security Teams
A useful response plan should assign ownership and deadlines before evidence begins moving quickly.
- Preserve resolver, endpoint, proxy, identity and firewall logs, recording the time range, collection method and known gaps.
- Search confirmed and suspected domains in historical DNS, then pivot on timing, uncommon subdomains, registration attributes and shared infrastructure.
- Correlate suspicious lookups with EDR process trees and user identities to separate routine software traffic from malicious execution.
- Apply scoped resolver blocks or sinkholes, isolate confirmed endpoints and revoke sessions without disrupting shared or CDN-backed services.
- Hunt for persistence, credential theft and lateral movement, then patch the entry point and reimage systems when integrity cannot be assured.
- Retest detection and containment rules after eradication, including fallback domains, alternative DNS clients and HTTPS command channels.
The practical takeaway is to treat DNS as a time-ordered map of attacker activity, not just a source of suspicious names. When that map is tied to affected hosts, identities and process evidence, it gives responders a defensible way to scope the breach, stop command-and-control traffic and verify that the attacker has lost access.