Live lesson · progress saved to your account

Advanced Network Defence

Stop waiting for alerts. Design zero trust access (NIST SP 800-207), read the network with Zeek, NetFlow and JA4, run hypothesis-driven hunts for beacons, DNS tunnelling and lateral movement, and trap intruders with canary tokens.

advanced140 minwalkthrough

Anyone can read this lesson. To submit answers and earn XP, create a free account.

TASK 01Mission briefing: the advisory

THREAT ADVISORY (fictional) · sector: Indian manufacturing · actor: MONSOON VIPER "The group steals CAD and design files from auto-component makers. Initial access by payroll-themed phishing. Command and control over HTTPS with a fixed 5-minute beacon. Data leaves via DNS tunnelling to look-alike telemetry domains."

Vajra Forge (fictional), a Pune brake-component maker and a Kavach SOC client since Room 17, fits the profile exactly. Nothing has alerted. That proves nothing: modern intruders live inside networks for weeks precisely because they avoid the noisy things rules look for.

So you'll hunt: assume breach, form a hypothesis, and look in the network data. The first thing a hunter learns is that machines behave differently from people:

Beacon hunter: the C2 hides in plain sight 20 connections plotted
0s150s300s450s600s0 min15 min30 min45 min60 min

x: time · y: seconds since the previous connection from the same host to the same destination

Humans: bursty, irregular intervals, many destinations.

Beacon: one destination, every ~60 s, same bytes each time. A flat line.

Score: low standard deviation of intervals + many connections + consistent size = likely beacon (tools like RITA automate this).

Over this room you'll redesign Vajra Forge's access model around zero trust, learn the network data sources that make hunting possible, hunt for C2, tunnelling and lateral movement, and lay deception traps that catch what hunting misses.

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

TASK 02Zero trust architecture

The old model was a castle: hard perimeter, soft inside. Once MONSOON VIPER's phishing macro runs on an engineer's laptop, the castle trusts it. Zero trust removes implicit trust based on network location: never trust, always verify, every request, every time.

Zero trust: every request is a fresh decision trust 100 / needs 85

Live trust signals

Requested resource

Subject + device
PEP
Policy Engine
Policy Administrator
PEP
Resource

ALLOW this one session to this one resource

Re-evaluated continuously: if the device's EDR goes unhealthy mid-session, the PEP cuts the session.

NIST SP 800-207: the Policy Engine decides, the Policy Administrator tells the Policy Enforcement Point to open or close the path. Being "inside the network" earns nothing.

NIST SP 800-207 defines the logical components:

  • Policy Engine (PE): makes the access decision using policy plus signals: identity, device health, threat intel, behaviour, time and location.
  • Policy Administrator (PA): executes the decision, creating or tearing down the session path. PE + PA together form the Policy Decision Point (PDP).
  • Policy Enforcement Point (PEP): sits in front of the resource, opening or closing the connection on the PA's instruction.

Key tenets: all data sources and services are resources; all communication is secured regardless of location; access is granted per session with least privilege; the decision is dynamic; device posture is monitored; and authentication is strict and continuous.

In practice that means strong identity (phishing-resistant MFA), device health checks, microsegmentation so a workstation can't reach other workstations, and identity-aware proxies (ZTNA) instead of flat VPNs. CISA's Zero Trust Maturity Model tracks progress across five pillars: Identity, Devices, Networks, Applications & Workloads, Data.

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

TASK 03Network detection and response: Zeek, NetFlow, JA4

Endpoints can be blinded (EDR disabled, logs cleared). The network still sees every packet that leaves. Network Detection and Response (NDR) turns traffic into evidence at three levels of detail:

One connection, three levels of visibility zeek
ENG-WS-044network tap → sensor

conn.log 1764560400.1 CzT9a3 10.20.3.44 51522 93.184.216.34 443 tcp ssl 2.41 1180 8812 SF

Protocol-aware metadata, linked by the connection uid. The sweet spot for hunting.

JA3 / JA4 fingerprint the TLS ClientHello (version, ciphers, extensions). Malware families often keep the same fingerprint even when they change domains and IPs.

  • Flow records (NetFlow, IPFIX, sFlow): who talked to whom, ports, bytes, duration. Cheap enough to keep for months.
  • Zeek (formerly Bro): a network security monitor that writes protocol-aware logs: conn.log, dns.log, http.log, ssl.log, files.log, smb_files.log and more. Every log line for a connection shares the same uid, so you can pivot from a DNS query to the TLS session to the file it carried. zeek-cut extracts columns by name.
  • Full packet capture (PCAP): perfect detail, huge storage, so usually kept for days around critical segments.

Encrypted traffic hides payloads, not behaviour. JA3 (2017) and its successor JA4 (2023) fingerprint how a client builds its TLS ClientHello, so a malware family's custom TLS stack can be recognised even when its domains change. Other strong signals survive encryption: certificate details, SNI, destination age, timing and byte counts.

Sensors receive traffic from a TAP or a switch SPAN (mirror) port, placed at the internet edge and at key internal choke points so east-west movement is visible too.

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

TASK 04Threat hunting

Threat hunting is the proactive, human-led search for attackers that existing detections missed. It is hypothesis-driven: you start with a testable statement, not a vague feeling.

Threat hunting: assume breach, then go looking hypothesis-driven

1 →

Hypothesis

2 →

Collect data

3 →

Analyse

4 →

Findings

5 ↺

Automate

"An APT targeting manufacturing is using DNS tunnelling from engineering workstations."

Hunting Maturity Model

HMM0HMM1HMM2HMM3HMM4

HMM1 · Minimal: Searches for known IOCs from threat intel feeds.

Good hypotheses come from:

  • Threat intelligence: "MONSOON VIPER uses DNS tunnelling; is it here?"
  • ATT&CK gaps from Room 18: techniques you have data for but no rule.
  • Situational awareness: crown-jewel systems, new exposures, recent incidents in your sector.

Every hunt ends with an outcome: confirmed (open an incident), disproved (documented, with the data you checked), or inconclusive (you lacked data, so that's a visibility gap to fix). The best hunts end with automation: the query becomes a detection so nobody has to hunt for that again.

David Bianco's Hunting Maturity Model grades a team from HMM0 (relies only on automated alerting) to HMM4 (systematically automates successful hunts).

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

TASK 05Detecting C2, DNS tunnelling and lateral movement

Beaconing. Implants call home on a schedule. Score each source → destination pair on the regularity of intervals (low standard deviation), number of connections, consistent payload sizes and destination age. Open-source tools like RITA do this over Zeek logs. Attackers add jitter, which widens the band but rarely makes it look human.

DNS tunnelling encodes data into DNS queries and replies (tools like iodine and dnscat2). ATT&CK lists DNS as a C2 channel under T1071.004.

DNS tunnelling: data smuggled inside lookups type to encode

Infected host → company resolver → internet → attacker's name server

MJZGC23FL5RWC3DJOBSXEX3WG4XGI53H.0001.t.vf-telemetry.example TXT

www.google.com A

outlook.office365.com A

erp.vajraforge.example A

update.microsoft.com A

Why it stands out

Long labels: 32 chars vs ~10 for normal names (limit 63 per label, 253 total).

High entropy: Base32/Base64 text looks random, unlike words.

Volume: hundreds of unique subdomains under one domain from one host.

Record types: lots of TXT (or NULL) queries; replies carry commands back.

It works because almost every network lets DNS out. The fix: only the company resolver may talk DNS to the internet, and that resolver is monitored.

Hunt for: unusually long query names and labels, high-entropy subdomains, many unique subdomains under one parent domain, heavy TXT / NULL usage, and any host sending DNS directly to the internet instead of through your resolver.

Lateral movement shows up as connections that don't fit the baseline: workstation → workstation SMB to ADMIN$ (PsExec-style, with Event 7045 service installs on the target), RDP or WinRM to servers from desktops, new admin logons at odd hours, and Kerberos anomalies like a burst of service-ticket requests (Kerberoasting).

Lateral movement: odd paths between hosts anomalies vs baseline
HTTPSKerberosSMB → ADMIN$RDPWinRMENG-WS-044ENG-WS-012CAD-VAULTVF-DC01FILE01

HTTPS: Engineers open drawings from the CAD vault every day.

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

TASK 06Hands-on: hunt DNS tunnelling in Zeek logs

Hypothesis: "MONSOON VIPER is tunnelling data out over DNS from Vajra Forge's engineering VLAN." You have the last hour of Zeek dns.log and conn.log from the engineering sensor.

Lab · Hunt DNS tunnelling in Zeek logs 0/4 goals
hunter@vf-ndr: ~
hunter@vf-ndr:~$ Zeek sensor: engineering VLAN · type 'help'
$

Hunt goals

Rank hosts by number of DNS queries

Isolate the TXT queries

Decode a subdomain and see what's leaving

Rank external destinations in conn.log

Hints: cat dns.log | zeek-cut id.orig_h | sort | uniq -c | sort -nr ranks hosts. grep TXT dns.log isolates TXT lookups. To decode, take the first label of a query: cat dns.log | zeek-cut query | grep telemetry | head -n 1 | cut -d. -f1 | base32 -d. For conn.log, rank id.resp_h the same way.

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

+30 XP

TASK 07Deception: honeypots, honeytokens and canaries

Hunting is expensive and periodic. Deception is cheap and always on: plant things that no legitimate user or process ever touches. Any interaction is, by definition, suspicious, so deception alerts have almost zero false positives.

  • Honeypots: fake systems. Low-interaction ones emulate a service banner (cheap, safe); high-interaction ones are real systems built to be watched (rich intel, more risk).
  • Honeytokens: fake credentials or data: a decoy AD account with an SPN (catches Kerberoasting), fake AWS keys in a config file, a fake database row.
  • Canary tokens: files, URLs, DNS names or documents that phone home when opened (Thinkst's free Canarytokens is a popular example).

Placement matters more than quantity. Put deception inside, on the paths attackers take after the first foothold: file shares, AD, server VLANs, developer machines. A honeypot on the internet just counts scanners.

Lab · Place 3 canary tokens, then let the intruder in 0/3 placed

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

+30 XP

TASK 08Final mission: the APT hunt report

Vajra Forge's CISO wants the answer in one page: was the hypothesis confirmed, which hosts are involved, and what changes so it can't happen the same way again.

The fix isn't another rule; it's an architecture where:

  • engineering workstations can't send DNS anywhere except a monitored resolver,
  • they can't reach each other's admin shares,
  • and access to the CAD vault is decided per request on identity, device health and context.
Final mission · The APT hunt report evidence + design

1. Hypothesis: "DNS tunnelling from engineering workstations" is…

2. Host doing the tunnelling

3. Host beaconing to 198.51.100.23 every 300 s

4. The zero trust fix (choose every right control, nothing else)

Then close the loop: turn the hunt into detections (long TXT queries per host, beacon scoring on conn.log) so the next hunt can look for something new.

Complete the mission for the Hunter badge and the room's XP.

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

+30 XP