Home / Blogs

What Firewall, Flow and DNS Logs Already Reveal About an Intrusion

Every firewall, router and DNS resolver on a network keeps a record of what the machines behind it are doing. In most organisations that record is collected, often for compliance, and then rarely read. There is too much of it for people to review, and the simple threshold alerts usually placed on top of it either miss quiet attacks or bury analysts in noise.

That is a missed opportunity. Network logs cover systems that endpoint agents cannot reach, such as appliances, legacy servers and devices owned by other teams, and they do it without capturing packet contents. This post looks at what connection and DNS records can and cannot reveal about an intrusion, and at the practical problems that decide whether detection built on them is useful or ignored.

The Data Most Networks Already Produce

Four sources cover most environments:

  • Firewall syslog. Session starts and ends, allow and deny decisions, byte counts and, on many platforms, application and intrusion-prevention labels.
  • Flow records. NetFlow, IPFIX and sFlow from routers and switches give addresses, ports, protocol, byte and packet counts and timing for each conversation. sFlow is sampled, so short or low-volume conversations can be missed.
  • Host firewall logs. Windows Firewall and Linux iptables or nftables can log connections on the machine itself, which helps inside flat network segments that no network firewall sees.
  • DNS resolver logs. The names each client looked up and the answers it got. These are among the most useful sources and among the least collected.

None of these contain payloads. That keeps storage manageable and avoids collecting the content of users’ traffic, but it also sets the limits discussed at the end of this post.

Five Behaviours That Show Up in Connection Records

Scanning. A host that contacts many addresses or ports in a short period, with a high share of denied, reset or unanswered connections, is usually doing reconnaissance. Inside the network this corresponds to MITRE ATT&CK T1046 (Network Service Discovery); from outside it is T1595 (Active Scanning). Slow scans spread over hours are the ones fixed per-minute thresholds miss.

Command and control. Malware that checks in with its operator tends to produce connections at regular intervals with similar sizes. Most C2 frameworks add random jitter, so the useful signal is a narrow spread of intervals over many hours, not an exact period. A machine suddenly using a service or port it has never used before is a second, independent clue (T1071, T1571).

Data exfiltration. The signal is outbound volume far above what that particular machine normally sends, especially to an address it has not talked to before (T1041, T1048). Backups and cloud sync produce the same pattern, which is why the comparison has to be against each machine’s own history rather than a network-wide limit.

DNS tunneling and generated domains. Tunnels encode data in query names, which shows up as long, random-looking subdomains, many unique names under a single parent domain, and unusual record types such as TXT (T1071.004). Malware that uses domain generation algorithms produces bursts of lookups for random names, most of which fail with NXDOMAIN (T1568.002).

Lateral movement. One internal machine reaching out to many other internal systems over administrative services such as SMB, RDP, WinRM or SSH is a classic sign of an attacker spreading (T1021). It is also what an IT management server does all day, which leads to the main practical problem.

Matches against threat intelligence feeds are best treated as supporting evidence rather than a verdict on their own. Lists go stale, and shared hosting and content delivery networks put legitimate and malicious sites on the same addresses.

Keeping the Noise Down

A network alert that fires every few minutes for normal traffic is soon ignored. Three habits make the biggest difference.

Compare each machine with itself. A single rule such as “more than N connections per minute” fires daily on the vulnerability scanner and stays silent for a patient attacker. Baselines per machine catch the change in behaviour that matters.

Record what addresses are for. Vulnerability scanners, DNS and directory servers, admin jump hosts, monitoring systems, proxies, VPN gateways and NAT devices all look anomalous by design. Declaring their roles once removes a large share of false positives. A log collector’s own traffic may need to be excluded from analysis entirely while its records stay searchable.

Make exceptions temporary and accountable. Penetration tests and maintenance windows are real, but permanent exceptions are where attackers hide. Suppressions that require a reason, expire on their own and record what they silenced keep the alert stream clean without creating blind spots.

Grouping also matters. A single port scan can trigger a dozen alerts in ten minutes; grouping them by source address and technique turns that into one item for an analyst to handle.

The Addressing Problem

Network logs identify machines by IP address. Endpoint tools, ticketing systems and people use machine names. DHCP reassigns addresses, servers have several interfaces, and NAT hides many hosts behind one address, so an alert about 10.20.1.15 at 14:05 is only useful once someone has worked out which machine held that address at that moment.

DHCP lease logs and the addresses that endpoint agents observe on their own machines can be used to build that mapping automatically, with time taken into account. Once network and endpoint alerts share a machine name, two alerts about the same incident can be linked rather than investigated separately, and an analyst can move from a suspicious connection to the processes behind it without a manual lookup.

What Connection Records Cannot Show

Log-based network detection has clear limits. It sees that a connection happened, not what was said. Malicious content inside an allowed, encrypted session looks like any other session. Clients using DNS over HTTPS bypass the resolver logs entirely unless that traffic is blocked or redirected. Sampled flow data can miss brief activity, and anything that never crosses a logging device is invisible. Network logs complement endpoint visibility; they do not replace it.

Within those limits, the data is already being generated and in many cases already stored. Reading it continuously, against each machine’s own history and with a clear record of what is expected, is a modest step that turns a compliance archive into an early warning.

By Hammad Anjum, Software Developer at EUNOMATIX —

Disclosure: the author works at EUNOMATIX, which develops log-based threat detection software.

Visit Page

Filed Under

Comments

  Notify me of follow-up comments

We encourage you to post comments and engage in discussions that advance this post through relevant opinion, anecdotes, links and data. If you see a comment that you believe is irrelevant or inappropriate, you can report it using the link at the end of each comment. Views expressed in the comments do not represent those of CircleID. For more information on our comment policy, see Codes of Conduct.

CircleID Newsletter The Weekly Wrap

More and more professionals are choosing to publish critical posts on CircleID from all corners of the Internet industry. If you find it hard to keep up daily, consider subscribing to our weekly digest. We will provide you a convenient summary report once a week sent directly to your inbox. It's a quick and easy read.

Related

Topics

DNS

Sponsored byDNIB.com

DNS Security

Sponsored byWhoisXML API

New TLDs

Sponsored byRadix

Cybersecurity

Sponsored byVerisign

Domain Names

Sponsored byVerisign

IPv4 Markets

Sponsored byIPv4.Global

Brand Protection

Sponsored byCSC