← Course Index

2.5 Encrypted Traffic Analysis (ETA) & Behavioral NDR

Inspecting Unencrypted Handshake Metadata, Flow Timing, Byte Ratios & Baseline Deviations Without Breaking End-to-End Encryption

Module 2: NDR & Segmentation Encrypted Traffic Analysis Behavioral NDR

1. Analyzing Encrypted Flows Without TLS Interception

With HTTPS, TLS 1.3, and encrypted management channels used across almost all network traffic, payload inspection alone cannot read application bodies. Encrypted Traffic Analysis (ETA) and behavioral Network Detection & Response (NDR) address this by examining handshake metadata, certificate attributes, packet timing, and flow volume baselines to identify anomalous communication patterns.

Architectural Advantage: Metadata and flow-timing analytics preserve end-to-end encryption integrity and avoid the operational complexity and trust risks of broad TLS man-in-the-middle decryption.
ENCRYPTED WIRE FLOWS TLS Handshake & SNI Certificate Chain Metadata Packet Sizes & Inter-Arrival Session Duration & Byte Ratio Payload Remains Encrypted ETA & BEHAVIORAL NDR ENGINE Handshake & Cert Profiling SNI • Issuer/Subject • Expiry & Trust Temporal & Volume Baselines Periodicity • Asymmetry • Peer Novelty Anomaly & Risk Scoring Suppresses baseline noise • Surfaces high-signal deviations for SOC triage SOC & CORRELATION • Suspicious Check-In Cadence • Unusual Encrypted Transfer • Rare Cert / SNI / Destination • Endpoint & DNS Correlation
Figure 2.5: Encrypted Traffic Analysis Combining TLS Metadata, Flow Timing, and Behavioral Baselines for NDR Detection.

2. Key Behavioral & Metadata Signals in ETA

Signal Category Observable Attributes Detection & Triage Value
TLS Handshake & Certificates SNI, TLS version, cipher/extension profile, issuer/subject, validity window, validation status. Highlights self-signed or newly issued certificates, mismatched hostnames, or unusual SNI patterns.
Connection Periodicity Inter-arrival intervals, jitter, recurring connection counts over time windows. Helps distinguish regular check-in intervals from sporadic or user-driven browsing traffic.
Volume & Directionality Origin vs. responder byte/packet counts, session duration, transfer bursts. Surfaces large outbound encrypted transfers or asymmetric sessions that warrant closer review.
Host & Peer Novelty First-seen internal-to-external pairs, rare destination ports, unusual internal-to-internal paths. Reduces alert fatigue on chatty routine services while spotlighting atypical communication graphs.
Avoid Over-Reliance on Single Signals: Legitimate cloud sync agents, telemetry collectors, and software updaters can exhibit periodic connections or large uploads. Correlate network anomalies with endpoint process context, DNS history, and asset criticality before taking containment action.

3. Practical ETA & Behavioral NDR Analysis Examples (10 Scenarios)

Example 1: Inspecting TLS SNI & Certificate Status in Zeek ssl.log

Shell (jq) — Listing TLS Sessions with Server Name and Validation Status
jq -c '{ts, uid, src: ."id.orig_h", dst: ."id.resp_h", dst_p: ."id.resp_p", server_name, version, validation_status}' \
  ssl.log | head -n 20
SAMPLE OUTPUT
{"ts":1795679102.41,"uid":"C8x92kLmNpQrStUvWx","src":"10.10.24.55","dst":"198.51.100.72","dst_p":443,"server_name":"cdn-sync-check.example","version":"TLSv12","validation_status":"self signed certificate in certificate chain"}
{"ts":1795679108.19,"uid":"C9p14rTzAbCdEfGhIj","src":"10.10.14.22","dst":"93.184.216.34","dst_p":443,"server_name":"www.example.com","version":"TLSv13","validation_status":"ok"}

Example 2: Hunting Self-Signed or Untrusted TLS Certificates

Shell (jq) — Filtering Non-OK TLS Validation Statuses
jq -c 'select(.validation_status != null and (.validation_status | startswith("ok") | not)) |
  {ts, uid, src: ."id.orig_h", dst: ."id.resp_h", server_name, validation_status}' \
  ssl.log
SAMPLE OUTPUT
{"ts":1795679102.41,"uid":"C8x92kLmNpQrStUvWx","src":"10.10.24.55","dst":"198.51.100.72","server_name":"cdn-sync-check.example","validation_status":"self signed certificate in certificate chain"}
{"ts":1795679421.88,"uid":"C2n77vWxYzKlMnOpQr","src":"10.10.18.90","dst":"203.0.113.44","server_name":"internal-gw.local","validation_status":"unable to get local issuer certificate"}

Example 3: Identifying TLS Sessions Missing an SNI Hostname

Shell (jq) — Spotting Direct-IP TLS Connections Without SNI
jq -c 'select(.server_name == null or .server_name == "") |
  {ts, uid, src: ."id.orig_h", dst: ."id.resp_h", dst_p: ."id.resp_p", version}' \
  ssl.log
SAMPLE OUTPUT
{"ts":1795679510.12,"uid":"C5w33mNbVcXzAsDfGh","src":"10.10.12.64","dst":"203.0.113.88","dst_p":443,"version":"TLSv12"}
{"ts":1795679804.67,"uid":"C7q88pOiUyTrEwQaSd","src":"10.10.12.64","dst":"203.0.113.88","dst_p":8443,"version":"TLSv12"}

Example 4: Measuring Connection Frequency per Source-Destination Pair

Shell (jq / sort) — Counting Repeated TLS Connections Between Hosts
jq -r '[."id.orig_h", ."id.resp_h", ."id.resp_p", (.server_name // "-")] | @tsv' ssl.log | \
  sort | uniq -c | sort -nr | head -n 20
SAMPLE OUTPUT
    142 10.10.24.55	198.51.100.72	443	cdn-sync-check.example
     64 10.10.14.22	93.184.216.34	443	www.example.com
     19 10.10.12.64	203.0.113.88	443	-

Example 5: Detecting Large Outbound Byte Transfers on Encrypted Ports

Shell (jq) — Filtering High Originated Byte Counts in conn.log
jq -c 'select(."id.resp_p" == 443 and ((."orig_bytes" // 0) > 10485760)) |
  {ts, uid, src: ."id.orig_h", dst: ."id.resp_h", duration, orig_bytes, resp_bytes}' \
  conn.log
SAMPLE OUTPUT
{"ts":1795680120.04,"uid":"C3e44rTyUiOpLkJhGf","src":"10.10.30.12","dst":"198.51.100.120","duration":48.62,"orig_bytes":28450912,"resp_bytes":18420}

Example 6: Analyzing Inter-Arrival Intervals for Periodic Traffic in Python

Python — Computing Time Deltas Between Repeated Outbound Flows
import json

timestamps = []
with open("conn.log") as f:
    for line in f:
        rec = json.loads(line)
        if rec.get("id.orig_h") == "10.10.24.55" and rec.get("id.resp_h") == "198.51.100.72":
            timestamps.append(float(rec["ts"]))

timestamps.sort()
deltas = [round(timestamps[i] - timestamps[i - 1], 2) for i in range(1, len(timestamps))]
print("Connection count:", len(timestamps))
print("Inter-arrival deltas (sec):", deltas[:20])
SAMPLE OUTPUT
Connection count: 142
Inter-arrival deltas (sec): [60.02, 59.98, 60.05, 60.01, 59.95, 60.03, 60.0, 60.04, 59.97, 60.01]

Example 7: Extracting Certificate Subject & Issuer Details from x509.log

Shell (jq) — Reviewing X.509 Certificate Subjects and Issuers
jq -c '{id, certificate.subject, certificate.issuer, certificate.not_valid_before, certificate.not_valid_after}' \
  x509.log | head -n 15
SAMPLE OUTPUT
{"id":"F4a91bC2dE3fG4h5I6","certificate.subject":"CN=temp-node-01","certificate.issuer":"CN=temp-node-01","certificate.not_valid_before":1795478400,"certificate.not_valid_after":1798156800}
{"id":"F9z88yX7wV6uT5s4R3","certificate.subject":"CN=www.example.com","certificate.issuer":"CN=DigiCert Global G2 TLS RSA SHA256 2020 CA1","certificate.not_valid_before":1770000000,"certificate.not_valid_after":1801536000}

Example 8: Hunting Encrypted Traffic to Rare External Destinations

Shell (jq / awk) — Finding External IPs Contacted by Only One Internal Host
jq -r '[."id.resp_h", ."id.orig_h"] | @tsv' ssl.log | \
  sort -u | awk '{dst_srcs[$1] = (dst_srcs[$1] ? dst_srcs[$1] "," : "") $2; count[$1]++}
  END {for (d in count) if (count[d] == 1) print count[d], d, dst_srcs[d]}'
SAMPLE OUTPUT
1 198.51.100.72 10.10.24.55
1 203.0.113.88 10.10.12.64
1 198.51.100.120 10.10.30.12

Example 9: Inspecting TLS Handshake Details with tshark

Shell (tshark) — Extracting TLS Handshake Type and SNI from a PCAP
tshark -r traffic.pcap -Y "tls.handshake.type == 1" \
  -T fields -e frame.time -e ip.src -e ip.dst -e tls.handshake.extensions_server_name
SAMPLE OUTPUT
Nov 26, 2026 08:45:02.410291000 IST	10.10.24.55	198.51.100.72	cdn-sync-check.example
Nov 26, 2026 08:45:08.191042000 IST	10.10.14.22	93.184.216.34	www.example.com

Example 10: Correlating Suspicious TLS Destinations with DNS Queries

Shell (jq) — Checking DNS Queries Made by a Specific Internal Host
TARGET_IP="10.10.24.55"
jq -c "select(.\"id.orig_h\" == \"$TARGET_IP\") | {ts, uid, query, qtype_name, answers}" dns.log
SAMPLE OUTPUT
{"ts":1795679102.18,"uid":"D1m22nB3vC4xZ5lK6j","query":"cdn-sync-check.example","qtype_name":"A","answers":["198.51.100.72"]}

4. Interactive ETA & Behavioral NDR Triage Simulator

Select a network behavior scenario below to review the encrypted traffic signal and recommended investigation workflow:

← Previous: 2.4 Edge & Application Layer Defense Next: 3.1 Identity Attack Path Mapping (BloodHound) →