References
Network visibility
Visibility is the ability to see traffic, identity and configuration change before an incident forces you to guess. This note maps the data sources, what each one answers, and where it lies to you.
Sources are linked at the end. The claims below are from those sources unless marked as inference.
Why flows first#
A flow record is a conversation summary: source, destination, port, protocol, bytes, packets, time and interfaces. It survives encryption because it does not need content. It is generated by routers and switches, so a compromised server cannot easily edit it. SANS calls it a phone bill: you cannot hear the call, but you can prove who talked to whom.
What flows answer:
- Which internal host talks to a new external address.
- Beaconing: repeated connections at a fixed interval.
- Scan and fan-out patterns: one source, many destinations and ports.
- DDoS shape: many sources, one destination, SYN-heavy.
- Whether containment worked.
What flows miss:
- Content, file names, commands, credentials.
- A single short exchange inside a long-lived connection.
- Anything encrypted at the flow layer without metadata.
Placement: ingress and egress points, inter-VLAN boundaries, cloud VPC flow logs, and the management segment. Keep the exporter and collector off the path you are protecting. CISA recommends flow exporters and collectors at key ingress and egress locations.
Packet capture and enriched metadata#
Full packet capture is the strongest evidence and the largest cost. SANS describes a middle tier: protocol metadata such as HTTP method, user agent and URI, with short full-packet retention and long metadata retention. Metadata can trigger retrieval of the matching packets from a ring buffer.
Decide four things before capturing:
- What layer: full packet, enriched metadata or flow only.
- Where: north-south and selected east-west links.
- How long: short hot buffer, long cold metadata.
- Who may read it: personal data and payloads need an owner.
Privacy: full capture can contain credentials, cookies, personal messages and health data. CISA's communications guidance says to choose capture points and retention from organizational need. A privacy notice and a deletion date are part of the design.
IDS and IPS#
NIST SP 800-94 is still the reference. It splits network IDPS, wireless IDPS, network behavior analysis and host IDPS, and says a mix is needed for an effective deployment. Two properties matter:
- Anomaly detection catches unknown behavior and produces many false positives. A slow attacker can train the profile and become normal.
- Signature detection is precise for known traffic and blind to new encodings.
Tuning is not optional. Reducing false negatives usually raises false positives, which costs analyst time. A rule that nobody triages is noise with a severity label.
Zeek and Suricata#
Zeek produces protocol logs: conn, dns, http, ssl, ssh, smb,
files, x509, notice and more. It is a sensor and a scripting platform, not
a block engine by default. notice.log and intel.log are the analyst entry
points. capture_loss.log tells you when the sensor itself is blind.
Suricata's EVE JSON is one stream of alerts, flows, DNS, HTTP, TLS, file and
anomaly records. community_id ties a record to other tools. Alert records can
carry the decoded transaction, which is useful and also a privacy decision.
Both sensors need care:
- A sensor on a tapped link sees one direction unless the tap is configured for both.
- TLS 1.3 with Encrypted Client Hello hides the real SNI. Certificate fields and JA4 still help, but host identity gets weaker.
- DoH moves DNS into HTTPS to a resolver. Network DNS logs then show the resolver, not every name. Endpoint DNS telemetry or a controlled resolver restores some visibility.
DNS as a sensor#
DNS is allowed almost everywhere and carries metadata in clear text unless DoH or DoT is in use. MITRE ATT&CK T1071.004 documents DNS as a command channel: long subdomains, TXT records, infrequent beacons and encoded labels. Its detection guidance focuses on unusual query volume, long labels, encoded content and non-browser processes making queries.
Useful DNS signals:
- Query length and label entropy above the host baseline.
- TXT and NULL record volume from one host.
- A workstation querying a name that only a server should need.
- NXDOMAIN bursts and random subdomains.
- Resolver changes and direct-to-internet DNS bypassing the corporate resolver.
False positives: CDNs, antivirus lookups, telemetry, mail gateways and content filters all generate odd DNS. Baseline per subnet, not per company.
Identity and configuration#
Traffic without identity is half a story. Join flows and logs to:
- DHCP leases and IPAM, so an IP maps to a device and a person.
- DNS resolver logs, so a name maps to a query.
- VPN, SSO and directory logs, so a session maps to an account.
- Switch and firewall config change logs.
CISA recommends storing configurations centrally, alerting on out-of-band changes, and watching route updates, weak protocols and ACL edits. A change window is a detection rule.
Runtime and host network telemetry#
eBPF sensors such as Tetragon observe process execution, file access, network connections and privilege changes from the kernel, with Kubernetes identity awareness and optional enforcement. They answer what a process did, which flows cannot. Falco and auditd cover similar ground with different tradeoffs.
Use runtime data to explain a flow: which binary opened the connection, which user, which container image. Use flows to find the host in the first place.
Deception#
A honeypot is a known asset that should see little legitimate traffic. Cowrie is an SSH and Telnet honeypot that logs brute force and shell interaction, stores uploaded files and writes JSON events. Any login is interesting by definition.
Rules for a useful honeypot:
- Put it in the same segment as the real asset, on a separate address.
- Do not let it become a jump host.
- Capture files, but treat them as hostile.
- Alert on interaction, not on port scans alone.
- Keep the image and the emulated filesystem current.
Detection engineering#
Sigma is a vendor neutral rule format. A rule names a log source, a selection,
a condition and metadata such as severity, tags and known false positives. The
falsepositives field is documentation for the analyst, not an automatic
filter. Use the condition block or Sigma filters to suppress.
A rule review asks:
- Which log source, and is it actually collected?
- What is the normal baseline for that field?
- What breaks the rule: a software update, a new subnet, a scanner?
- What is the analyst supposed to do on a match?
- When was it last true?
Minimum viable visibility for a small network#
- Firewall and VPN logs to a central store, with time sync.
- NetFlow or IPFIX at the border and between VLANs.
- DNS resolver logs with query length and answer type.
- Zeek or Suricata on the border tap, alerts only at first.
- DHCP lease log joined to the above.
- One honeypot in the server VLAN.
- A weekly review of new external destinations and long DNS labels.
Sources#
- CISA, Enhanced Visibility and Hardening Guidance for Communications Infrastructure, 2024: https://www.cisa.gov/resources-tools/resources/enhanced-visibility-and-hardening-guidance-communications-infrastructure
- NIST SP 800-94, Guide to IDPS: https://csrc.nist.gov/pubs/sp/800/94/final
- NIST SP 800-61r3, Incident Response: https://nvlpubs.nist.gov/nistpubs/specialpublications/nist.sp.800-61r3.pdf
- SANS, Shedding Light on Security Incidents Using Network Flows: https://www.giac.org/paper/gcih/1241/shedding-light-security-incidents-network-flows/102204
- SANS, Packets or It Didn't Happen: https://symantec-enterprise-blogs.security.com/sites/default/files/2021-05/White%20Paper%20%28SANS%29%20-%20Packets%20or%20it%20didn%27t%20happen.pdf
- Zeek log files: https://docs.zeek.org/en/current/script-reference/log-files.html
- Suricata EVE JSON: https://docs.suricata.io/en/latest/output/eve/eve-json-output.html
- MITRE ATT&CK T1071.004, DNS: https://attack.mitre.org/techniques/T1071/004/
- Sigma rules: https://sigmahq.io/docs/basics/rules.html
- Tetragon documentation: https://tetragon.io/docs/
- Cowrie: https://github.com/cowrie/cowrie
- Cloudflare, Good-bye ESNI, hello ECH: https://blog.cloudflare.com/encrypted-client-hello/
- RFC 8484, DNS over HTTPS: https://www.rfc-editor.org/rfc/rfc8484.html