Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Lesson 4 of 6 · Lab · 30 min · revision 2

Hunting Scans, Beacons and Floods in Captures and Flows

Generate a seeded two-hour capture, turn it into Zeek flow and DNS logs, and find a port scan, an internal SMB sweep, a beaconing host, DGA and tunnelling DNS, and a SYN flood with short scripts, then write the DDoS escalation runbook for the flood.

Contentsand lesson path

What you will learn

  • Analyse packet captures, flow data and connection logs to identify scanning, lateral movement, beaconing, DNS anomalies or a volumetric flood, and for a flood follow a DDoS runbook that escalates to the upstream or scrubbing provider.

Prerequisites: Networking Basics

01. Goal and setup

Alerts only cover what someone wrote a rule for. Threat hunting starts from a question instead, such as "which hosts talk to many targets and mostly fail?", and answers it from data you already collect. In this lab you hunt in two kinds of data: the capture (every packet) and flow records (one summary line per connection, here Zeek conn.log; NetFlow and IPFIX exports carry similar fields). You will find five problems hidden in two hours of ordinary traffic, and for the flood you will produce the evidence a DDoS runbook asks for.

You need: Docker, Python 3.10 or later, and about 200 MB of disk. Tested versions: Scapy 2.8.0, Zeek 9.0.1 from the Zeek package repository for Debian 12 (bookworm), tcpdump 4.99 and jq 1.6 from Debian 12. Every output below comes from a run of these exact files, and the capture uses a fixed random seed, so your numbers should match.

Folder layout at the end of the lab
hunt-lab/
├── make_hunt.py            step 1: writes hunt.pcap
├── install-zeek.sh, zeek-obs.asc   step 2
├── zeek/                   step 3: conn.log and dns.log as JSON
├── zeeklog.py, scans.py    step 4
├── beacons.py              step 5
├── dns_anomalies.py        step 6
└── flood.py                step 7

02. Step 1: Generate the capture

The script writes two hours of traffic starting at 08:00 UTC on 3 November 2026: a user browsing ten sites at random times, a monitoring agent and five problems. Read the comments to see what is planted, then try to find each one as if you had not.

Python · hunt-lab/make_hunt.py
"""Write hunt.pcap: two hours of a small network with five problems hidden in it."""
import random
from datetime import datetime, timezone

from scapy.all import DNS, DNSQR, DNSRR, IP, TCP, UDP, Ether, wrpcap

rng = random.Random(759)  # fixed seed: everyone gets the same capture
T0 = datetime(2026, 11, 3, 8, 0, tzinfo=timezone.utc).timestamp()
RESOLVER, WEB = "10.1.20.53", "10.1.30.10"
MAC_A, MAC_B = "02:00:00:00:00:0a", "02:00:00:00:00:0b"
pkts, ports = [], iter(range(20000, 65000))


def add(t, src, dst, l4, data=b""):
    p = Ether(src=MAC_A, dst=MAC_B) / IP(src=src, dst=dst) / l4
    p = p / data if data else p
    p.time = t
    pkts.append(p)


def session(t, cli, srv, dport, up, down):
    """A full TCP conversation that sends `up` bytes and receives `down` bytes."""
    sp, c, s = next(ports), 1000, 5000
    add(t, cli, srv, TCP(sport=sp, dport=dport, flags="S", seq=c))
    add(t + .01, srv, cli, TCP(sport=dport, dport=sp, flags="SA", seq=s, ack=c + 1))
    add(t + .02, cli, srv, TCP(sport=sp, dport=dport, flags="A", seq=c + 1, ack=s + 1))
    add(t + .03, cli, srv, TCP(sport=sp, dport=dport, flags="PA", seq=c + 1, ack=s + 1),
        rng.randbytes(up))
    add(t + .04, srv, cli, TCP(sport=dport, dport=sp, flags="PA", seq=s + 1,
                               ack=c + 1 + up), rng.randbytes(down))
    c, s = c + 1 + up, s + 1 + down
    add(t + .05, cli, srv, TCP(sport=sp, dport=dport, flags="FA", seq=c, ack=s))
    add(t + .06, srv, cli, TCP(sport=dport, dport=sp, flags="FA", seq=s, ack=c + 1))
    add(t + .07, cli, srv, TCP(sport=sp, dport=dport, flags="A", seq=c + 1, ack=s + 1))


def probe(t, cli, srv, dport, answer):
    """One SYN. answer: 'open' (SYN-ACK, then we reset), 'closed' (RST) or None."""
    sp = next(ports)
    add(t, cli, srv, TCP(sport=sp, dport=dport, flags="S", seq=1))
    if answer == "open":
        add(t + .001, srv, cli, TCP(sport=dport, dport=sp, flags="SA", seq=9, ack=2))
        add(t + .002, cli, srv, TCP(sport=sp, dport=dport, flags="R", seq=2))
    elif answer == "closed":
        add(t + .001, srv, cli, TCP(sport=dport, dport=sp, flags="RA", seq=0, ack=2))


def lookup(t, cli, name, qtype="A", answer=None):
    sp, qid = next(ports), rng.randrange(65536)
    q = DNSQR(qname=name, qtype=qtype)
    add(t, cli, RESOLVER, UDP(sport=sp, dport=53), DNS(id=qid, rd=1, qd=q))
    an = DNSRR(rrname=name, type=qtype, ttl=60, rdata=answer) if answer else None
    add(t + .005, RESOLVER, cli, UDP(sport=53, dport=sp),
        DNS(id=qid, qr=1, rd=1, ra=1, rcode=0 if answer else 3, qd=q, an=an))


# 1. Normal browsing: one user, ten sites, irregular times and sizes.
for _ in range(90):
    t, site = T0 + rng.uniform(0, 7200), rng.randrange(10)
    lookup(t, "10.1.10.15", f"site{site}.example.com", answer=f"203.0.113.{20 + site}")
    session(t + .1, "10.1.10.15", f"203.0.113.{20 + site}", 443,
            rng.randrange(300, 2000), rng.randrange(2000, 60000))
# 2. A monitoring agent that reports every 300 s on the dot.
for i in range(24):
    session(T0 + 30 + 300 * i, "10.1.10.30", "203.0.113.80", 443, 512, 128)
# 3. A beacon: every 60 s with a few seconds of jitter, small and uniform.
lookup(T0 + 115, "10.1.10.23", "cdn-sync.example", answer="198.51.100.66")
for i in range(118):
    session(T0 + 120 + 60 * i + rng.uniform(-3, 3), "10.1.10.23", "198.51.100.66",
            443, rng.randrange(290, 311), rng.randrange(60, 81))
# 4. A port scan of the DMZ web server from the internet.
for n, port in enumerate(range(1, 1025)):
    state = "open" if port in (22, 80, 443) else "closed"
    probe(T0 + 1200 + n * 0.01, "203.0.113.99", WEB, port, state)
# 5. An internal host sweeping the server subnet for SMB (TCP 445).
for n, last in enumerate(range(1, 121)):
    state = "open" if last in (10, 11) else "closed" if last < 20 else None
    probe(T0 + 3000 + n * 0.25, "10.1.10.42", f"10.1.20.{last}", 445, state)
# 6. DNS anomalies: DGA-like NXDOMAIN bursts and TXT tunnelling.
for n in range(60):
    word = "".join(rng.choice("abcdefghijklmnopqrstuvwxyz") for _ in range(14))
    lookup(T0 + 2700 + n * 2, "10.1.10.57", f"{word}.example")
for n in range(80):
    label = "".join(rng.choice("abcdefghijklmnopqrstuvwxyz234567") for _ in range(48))
    lookup(T0 + 3600 + n * 1.5, "10.1.10.88", f"{label}.t.exfil-lab.example", "TXT",
           answer="ok")
# 7. A short SYN flood against the web server from spoofed sources.
for n in range(4500):
    src = f"198.{18 + rng.randrange(2)}.{rng.randrange(256)}.{rng.randrange(1, 255)}"
    sport, seq = rng.randrange(1024, 65536), rng.randrange(2**32)
    add(T0 + 6600 + n / 1500, src, WEB, TCP(sport=sport, dport=443, flags="S", seq=seq))

pkts.sort(key=lambda p: p.time)
wrpcap("hunt.pcap", pkts)
print(f"wrote hunt.pcap: {len(pkts)} packets over {pkts[-1].time - pkts[0].time:.0f} s")
Terminal
mkdir hunt-lab && cd hunt-lab    # then save make_hunt.py here
python3 -m venv .venv && .venv/bin/pip install -q scapy==2.8.0
.venv/bin/python make_hunt.py
sha256sum hunt.pcap
Expected output
wrote hunt.pcap: 9010 packets over 7157 s
6151c08ade1b2253532f6b774a80d6228625fe72291b77a04d333f472cd9657f  hunt.pcap

03. Step 2: Look at the capture with tcpdump

Start a Debian container with Zeek, tcpdump and jq. The install script is the one from the Suricata and Zeek lab; it passes extra package names to apt. Wireshark opens the same pcap file in a graphical window with a decoder for each protocol, which is handy on a desktop; this lab uses tcpdump because its text output runs in a container and can be compared line by line.

Shell · hunt-lab/install-zeek.sh
#!/bin/sh
# Install Zeek 9.0 (LTS line) from the Zeek project's openSUSE Build Service repo.
set -e
REPO=http://download.opensuse.org/repositories/security:/zeek/Debian_12/
echo "deb [signed-by=/lab/zeek-obs.asc] $REPO /" > /etc/apt/sources.list.d/zeek.list
apt-get update -qq
apt-get install -y -qq --no-install-recommends zeek-9.0-core "$@" > /dev/null
/opt/zeek/bin/zeek --version
Terminal
KEY=https://download.opensuse.org/repositories/security:zeek/Debian_12/Release.key
curl -fsSL "$KEY" -o zeek-obs.asc
docker run -d --name hunt-zeek -v "$PWD:/lab" -w /lab debian:12-slim sleep infinity
docker exec hunt-zeek sh /lab/install-zeek.sh tcpdump jq
docker exec hunt-zeek sh -c "tcpdump -nn -tt -r hunt.pcap \
  'tcp[tcpflags] == tcp-syn' 2>/dev/null | cut -d. -f1 | uniq -c | sort -rn | head -5"
Expected output of the tcpdump command (the install prints the Zeek version first)
   1500 1793699402
   1500 1793699401
   1500 1793699400
    100 1793694009
    100 1793694008

The filter keeps packets whose only TCP flag is SYN, the first packet of every connection attempt. -tt prints Unix timestamps, cut keeps whole seconds, and uniq -c counts packets per second. Three seconds stand out with 1,500 new connection attempts each, from 1793699400, which is 09:50:00 UTC. The next busiest seconds have 100, from the port scan. This is the fastest first look at a flood: count SYNs, packets or bytes per second and compare with what is normal for that link.

04. Step 3: Turn the capture into flow records

Terminal
mkdir -p zeek
docker exec hunt-zeek sh -c 'cd zeek && /opt/zeek/bin/zeek -C -r ../hunt.pcap \
  LogAscii::use_json=T && wc -l *.log'
docker exec hunt-zeek jq -c 'select(."id.orig_h" == "203.0.113.99"
  and ."id.resp_p" >= 21 and ."id.resp_p" <= 23)
  | [."id.resp_p", .conn_state, .history]' zeek/conn.log
docker exec hunt-zeek jq -c 'select(."id.orig_h" == "10.1.10.42")
  | [."id.resp_h", .conn_state, .history]' zeek/conn.log | sed -n '10,11p;19,21p'
Expected output (log sizes)
   6107 conn.log
    231 dns.log
      1 packet_filter.log
   6339 total
Expected output (connection states)
[21,"REJ","Sr"]
[22,"RSTO","ShR"]
[23,"REJ","Sr"]
["10.1.20.10","RSTO","ShR"]
["10.1.20.11","RSTO","ShR"]
["10.1.20.19","REJ","Sr"]
["10.1.20.20","S0","S"]
["10.1.20.21","S0","S"]

The connection state says how far each TCP handshake got, and the history shows the packets. REJ with history Sr means the originator sent a SYN and the responder answered with a reset: the host is alive and the port is closed. S0 with history S means a SYN with no reply at all: the address may be unused, or a firewall drops the packet. RSTO with ShR means the port answered SYN-ACK and the originator then reset the connection without sending data. That is how a half-open "SYN scan" looks when it finds an open port. Normal sessions end in SF.

05. Step 4: Hunt for scanning and lateral movement

The question: which sources tried many targets and completed almost none of them? zeeklog.py reads a JSON log. scans.py groups TCP flows by source and reports sources with at least 50 host-port targets and 80% or more failed handshakes.

Python · hunt-lab/zeeklog.py
"""Read a Zeek JSON log (one JSON object per line)."""
import json


def read(path):
    with open(path) as f:
        return [json.loads(line) for line in f if line.strip()]
Python · hunt-lab/scans.py
"""Flag sources that try many targets and mostly fail to complete a handshake."""
from collections import defaultdict

from zeeklog import read

FAILED = {"S0", "REJ", "RSTO", "RSTOS0"}  # no full TCP session was completed
by_src = defaultdict(list)
for c in read("zeek/conn.log"):
    if c["proto"] == "tcp":
        by_src[c["id.orig_h"]].append(c)

print(f"{'source':<15} {'conns':>5} {'hosts':>5} {'ports':>5} {'failed':>6}  states")
for src, conns in sorted(by_src.items()):
    hosts = {c["id.resp_h"] for c in conns}
    ports = {c["id.resp_p"] for c in conns}
    failed = sum(c["conn_state"] in FAILED for c in conns) / len(conns)
    if len(hosts) * len(ports) < 50 or failed < 0.8:
        continue  # too few targets, or mostly normal sessions
    states = defaultdict(int)
    for c in conns:
        states[c["conn_state"]] += 1
    kind = "horizontal" if len(hosts) > len(ports) else "vertical"
    top = " ".join(f"{k}={v}" for k, v in sorted(states.items(), key=lambda kv: -kv[1]))
    print(f"{src:<15} {len(conns):>5} {len(hosts):>5} {len(ports):>5} {failed:>6.0%}  "
          f"{top}  ({kind})")
Terminal
.venv/bin/python scans.py
Expected output
source          conns hosts ports failed  states
10.1.10.42        120   120     1   100%  S0=101 REJ=17 RSTO=2  (horizontal)
203.0.113.99     1024     1  1024   100%  REJ=1021 RSTO=3  (vertical)

Two very different findings. 203.0.113.99 is a vertical scan: one internet host tried 1,024 ports on the DMZ web server and found three open. Internet-facing servers see this constantly; the useful follow-up is to check that the three open ports are the ones you meant to expose. 10.1.10.42 is a horizontal scan, also called a sweep: one internal workstation tried TCP 445 (SMB, Windows file sharing) on 120 addresses in 30 seconds, and most never answered. Workstations do not normally do that. It is typical of a worm or of an attacker looking for the next machine, which is lateral movement, so this one deserves an incident ticket and a look at the host.

06. Step 5: Hunt for beacons

Malware that waits for commands beacons: it checks in with its C2 server on a timer. Timers make traffic regular in two ways, the gap between connections and the size of each request. beacons.py takes every source, destination and port with ten or more completed connections and computes the coefficient of variation (CV) of the gaps: the standard deviation divided by the mean. A CV near 0 means a near-perfect clock; human browsing is usually well above 0.5. It also reports the spread of request sizes relative to the median.

Python · hunt-lab/beacons.py
"""Rank repeated connections by how regular their timing and size are."""
from collections import defaultdict
from statistics import mean, median, pstdev

from zeeklog import read

pairs = defaultdict(list)
for c in read("zeek/conn.log"):
    if c["proto"] == "tcp" and c["conn_state"] == "SF":
        pairs[(c["id.orig_h"], c["id.resp_h"], c["id.resp_p"])].append(c)

rows = []
for (src, dst, port), conns in pairs.items():
    if len(conns) < 10:
        continue  # too few repeats to judge timing
    times = sorted(c["ts"] for c in conns)
    gaps = [b - a for a, b in zip(times, times[1:])]
    sizes = [c["orig_bytes"] for c in conns]
    cv = pstdev(gaps) / mean(gaps)  # coefficient of variation of the gaps
    spread = (max(sizes) - min(sizes)) / median(sizes)
    rows.append((cv, src, dst, port, len(conns), mean(gaps), median(sizes), spread))

print(f"{'source':<11} {'destination':<14} {'port':>4} {'n':>3} {'gap_s':>6} "
      f"{'cv':>5} {'bytes':>5} {'spread':>6}")
for cv, src, dst, port, n, gap, size, spread in sorted(rows):
    flag = "  <- regular" if cv < 0.1 and spread < 0.2 else ""
    print(f"{src:<11} {dst:<14} {port:>4} {n:>3} {gap:>6.1f} {cv:>5.2f} {size:>5.0f} "
          f"{spread:>6.2f}{flag}")
Terminal
.venv/bin/python beacons.py
docker exec hunt-zeek jq -r 'select(."id.orig_h" == "10.1.10.23")
  | [(.ts | todate), .query, (.answers | join(","))] | @tsv' zeek/dns.log
Expected output
source      destination    port   n  gap_s    cv bytes spread
10.1.10.30  203.0.113.80    443  24  300.0  0.00   512   0.00  <- regular
10.1.10.23  198.51.100.66   443 118   60.0  0.04   301   0.07  <- regular
10.1.10.15  203.0.113.26    443  13  508.7  0.61  1248   1.21
10.1.10.15  203.0.113.27    443  10  680.9  0.73  1576   0.91
10.1.10.15  203.0.113.24    443  12  570.1  0.96  1746   0.79
10.1.10.15  203.0.113.25    443  10  499.3  1.16   819   1.83
10.1.10.15  203.0.113.29    443  11  609.4  1.66  1553   1.01
Expected output (DNS of the suspect; columns are tab-separated)
2026-11-03T08:01:55Z    cdn-sync.example    198.51.100.66

Two pairs look regular, and only one is malicious. 10.1.10.30 reports to 203.0.113.80 every 300 seconds exactly, with identical sizes: that is the monitoring agent, and your asset inventory should say so. 10.1.10.23 connects to 198.51.100.66 every 60 seconds with a few seconds of jitter (random delay that malware adds to look less regular), with small requests of about 300 bytes, 118 times. Its DNS log shows it resolved cdn-sync.example just before the first check-in. Jitter raised the CV only to 0.04, still far below browsing. The lesson is that statistics rank candidates; context such as the asset owner, the domain and the process on the host decides.

07. Step 6: Hunt for DNS anomalies

DNS shows two common abuses. Malware with a domain generation algorithm (DGA) tries many random-looking names until one resolves, so it produces many NXDOMAIN (name does not exist) answers. DNS tunnelling hides data in query names, so it produces long labels and many unique names under one parent domain, often with TXT records for the replies.

Python · hunt-lab/dns_anomalies.py
"""Per client: NXDOMAIN share, TXT use, label length and name diversity."""
from collections import defaultdict

from zeeklog import read

clients = defaultdict(list)
for q in read("zeek/dns.log"):
    clients[q["id.orig_h"]].append(q)

print(f"{'client':<11} {'queries':>7} {'nxdomain':>8} {'txt':>4} {'longest':>7} "
      f"{'parents':>7} {'max_names':>9}  verdict")
for client, qs in sorted(clients.items()):
    names = [q.get("query", "") for q in qs]
    nx = sum(q.get("rcode_name") == "NXDOMAIN" for q in qs) / len(qs)
    txt = sum(q.get("qtype_name") == "TXT" for q in qs)
    longest = max(len(label) for n in names for label in n.split("."))
    under = defaultdict(set)  # parent domain -> distinct names asked under it
    for n in names:
        under[".".join(n.split(".")[-2:])].add(n)
    most = max(len(v) for v in under.values())
    verdict = []
    if len(qs) >= 20 and nx > 0.5:
        verdict.append("DGA?")
    if longest > 40 or most > 50:
        verdict.append("tunnel?")
    print(f"{client:<11} {len(qs):>7} {nx:>8.0%} {txt:>4} {longest:>7} "
          f"{len(under):>7} {most:>9}  {', '.join(verdict) or '-'}")
Terminal
.venv/bin/python dns_anomalies.py
Expected output
client      queries nxdomain  txt longest parents max_names  verdict
10.1.10.15       90       0%    0       7       1        10  -
10.1.10.23        1       0%    0       8       1         1  -
10.1.10.57       60     100%    0      14      60         1  DGA?
10.1.10.88       80       0%   80      48       1        80  tunnel?

10.1.10.57 asked for 60 different parent domains in two minutes and every answer was NXDOMAIN, the DGA pattern. 10.1.10.88 asked 80 TXT queries, each a unique 48-character label under exfil-lab.example. Every other label in this capture is 14 characters or fewer. Both thresholds are starting points, not rules: content delivery networks also use long names, so tune them on your own baseline. Once a name is confirmed as malicious, a protective DNS resolver can sinkhole it: it answers with an address that you control, so infected hosts reveal themselves when they connect there. DNS filtering services apply the same idea to published lists of bad domains.

08. Step 7: Measure the flood and trigger the DDoS runbook

A volumetric flood tries to exhaust capacity: link bandwidth, firewall state tables or a server's queue of half-open connections. flood.py reads the capture and counts SYNs per second for each destination service. The runbook threshold here, 500 SYNs per second to one service for two seconds or more, is an example; set yours from your own normal peak.

Python · hunt-lab/flood.py
"""Runbook step 1: measure SYNs per second per service straight from the capture."""
from collections import Counter, defaultdict
from datetime import datetime, timezone

from scapy.all import IP, TCP, PcapReader

THRESHOLD = 500  # SYNs/s to one service for 2 s or more: start the DDoS runbook
syn, sources, octets = Counter(), defaultdict(set), Counter()
with PcapReader("hunt.pcap") as capture:
    for p in capture:
        if TCP in p and p[TCP].flags == "S":  # SYN only, no ACK
            key = (int(p.time), p[IP].dst, p[TCP].dport)
            syn[key] += 1
            sources[key].add(p[IP].src)
            octets[key] += len(p)

hot = sorted(k for k, n in syn.items() if n >= THRESHOLD)
for sec, dst, port in hot:
    k = (sec, dst, port)
    when = datetime.fromtimestamp(sec, timezone.utc).strftime("%H:%M:%S")
    print(f"{when}Z {dst}:{port} syn/s={syn[k]} sources={len(sources[k])} "
          f"kbit/s={octets[k] * 8 // 1000}")
if len(hot) >= 2:
    every = set().union(*(sources[k] for k in hot))
    nets = Counter(".".join(s.split(".")[:2]) + ".0.0/16" for s in every)
    print(f"TRIGGER: {len(hot)} s above {THRESHOLD} SYN/s; "
          f"{sum(syn[k] for k in hot)} SYNs from {len(every)} sources")
    top = ", ".join(f"{n} ({c})" for n, c in nets.most_common(2))
    print("top source networks:", top)
else:
    print("no sustained SYN flood found")
Terminal
.venv/bin/python flood.py
docker rm -f hunt-zeek
Expected output
09:50:00Z 10.1.30.10:443 syn/s=1500 sources=1491 kbit/s=648
09:50:01Z 10.1.30.10:443 syn/s=1500 sources=1494 kbit/s=648
09:50:02Z 10.1.30.10:443 syn/s=1500 sources=1493 kbit/s=648
TRIGGER: 3 s above 500 SYN/s; 4500 SYNs from 4411 sources
top source networks: 198.18.0.0/16 (2271), 198.19.0.0/16 (2140)

Almost every SYN came from a different address, spread evenly across 198.18.0.0/15. That is what spoofed sources look like: the attacker forged the source addresses, so blocking them one by one achieves nothing. This flood is small, about 0.65 Mbit/s of SYNs, so the server and the link survive it, and local controls such as SYN cookies (RFC 4987) or a rate limit at the edge are the right first response. The runbook still matters, because the next wave may be a thousand times larger. When a flood fills your internet link, packets are lost before they reach your firewall, and only your ISP or a scrubbing service (a provider that filters attack traffic in its own network before passing on the rest) can help. Agree the contacts and the process with them before an attack.

Runbook skeleton · hunt-lab/ddos-runbook.md (fill in your own values)
# DDoS runbook: inbound flood against a public service
1. Trigger: SYN, packet or bit rate to one service above the agreed
   threshold for 2 s or more (lab: 500 SYN/s), or link use above 80 %.
2. Confirm: measure rate per second, top destinations, source spread,
   protocol and ports. Spoofed and reflected sources are not the attacker.
3. Local response: SYN cookies, edge rate limits, CDN or web application firewall rules.
4. Escalate when the link is near capacity or local steps do not hold:
   ISP NOC phone, contract ID, scrubbing activation steps, who may call.
5. Hand over: target IP and port, start time (UTC), peak rate, protocol,
   top source networks, a short sample capture, what you already did.
6. Communicate: incident channel, status page owner, next update time.
7. Afterwards: timeline, what worked, threshold and contact changes.

09. Troubleshooting

10. Check your understanding

Practice check · 3 questions

Reading flows and rates

Three questions about the evidence in this lab.

Q1. In `conn.log`, one probe to 10.1.20.19 shows state `REJ`, history `Sr`; another to 10.1.20.20 shows `S0`, history `S`. What does the difference tell you?
Q2. Host A connects every 60 s with up to 30 s of random jitter. Host B connects every 900 s with up to 5 s of jitter. Which pair gets the lower CV in `beacons.py`?
Q3. `flood.py` shows 1,500 SYN/s from spoofed sources at about 0.65 Mbit/s. The link is 1 Gbit/s and users still reach the site. Which runbook action fits now?
Practice only: not graded, not saved, not evidence.

11. Apply it

This completes the analysis part of the skill project:

  • For each of the five findings, write an analyst note: what you saw, the evidence (log lines or script output), how sure you are, and the next action.
  • Write a Suricata rule for one finding, for example dns.query on exfil-lab.example, and test it on hunt.pcap with the steps from the Suricata and Zeek lab.
  • Fill in the runbook skeleton with real names: your threshold, your ISP contact route and what evidence you will hand over, and add a date for the first test of the plan.

12. Review prompt

Without looking back:

  1. What do the states SF, S0, REJ and RSTO mean, and which pattern marks a sweep?
  2. Why is a regular timer not enough to call a host infected?
  3. Which two DNS signals separate a DGA from tunnelling?
  4. When does a flood move from local mitigation to the upstream provider, and what do you hand over?

References

Your progress

Reading state

Sign in to save that you finished reading this lesson.

Sign in to mark reading complete

Prove this skill

10 questions · about 8 minutes · scored automatically. Marking a lesson as read never demonstrates a skill.
Take the skill check