Live lesson · progress saved to your account

Network Security & Traffic Analysis

Firewalls, IDS/IPS, VPNs and segmentation, then hands-on packet analysis: Wireshark display filters, port scans, beaconing and DNS exfiltration. Write a Suricata rule and a firewall policy to stop a 2 AM data leak.

intermediate120 minwalkthrough

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

TASK 01Mission briefing: what leaves at 2 AM?

TICKET · KK-SOC-0412 KartKaro (a fictional online store in Jaipur) noticed its outbound traffic graph spiking every night around 2 AM, when nobody is working. Last week, customers started getting scam calls quoting their recent orders. The network team captured ten minutes of traffic (02:00–02:10) on the server VLAN and handed you the PCAP file.

Logs can be deleted and endpoints can lie, but packets are what actually crossed the wire. In this room you'll learn the controls that shape network traffic (firewalls, IDS/IPS, VPNs, segmentation), then read the capture yourself like a SOC analyst.

By the end you'll name the leaking server, the channel, the destination and the stolen file, write a detection rule, and build the firewall policy that would have stopped it.

Answer the questions

+10 XP

+10 XP

TASK 02Firewalls

A firewall decides which traffic may pass between networks, using an ordered list of rules. Each rule matches on things like protocol, source, destination and port, and says allow or deny.

Two rules every firewall follows:

  1. First match wins. Rules are checked top to bottom; the first one that matches decides.
  2. Implicit deny. Anything no rule allows is dropped (a "default deny" policy).

KartKaro's firewall has a problem. Watch the packets, then fix the rule order:

Firewall: first matching rule wins 2/5 packets handled right
  1. 1allowtcp any → web:443 · customers → shop (HTTPS)
  2. 2allowudp internal → resolver:53 · staff DNS
  3. 3allowany any → any:any · temporary: 'fix later'
  4. 4denytcp any → any:3389 · no RDP
  5. 5denytcp internet → db:3306 · no MySQL from internet
  6. ∞DENYeverything else (implicit deny)

incoming packet

HTTPS · customer → web:443

ALLOWED by rule 1

✓ as intended

Rule 3 lets everything through, so the deny rules below it never run. Move it, or better, delete it.

Kinds of firewall

Four kinds of firewall Pick a type

Looks at+ connection state

Remembers connections it allowed out, so replies are let back in automatically and unsolicited 'replies' are dropped. The baseline for every modern firewall.

  • Telnet from the internet (port 23)
  • Fake 'reply' packets with no request
  • BitTorrent running on port 443
  • Malware download matching a signature
  • ' OR 1=1 -- in a login form

Firewalls also sit on every host: Windows Defender Firewall, Linux iptables/nftables and ufw, and cloud security groups in AWS and Azure. Watch egress (outbound) as well as ingress: plenty of breaches are only noticed when data leaves.

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

TASK 03IDS, IPS and detection

A firewall checks where traffic goes. An intrusion detection system looks at what's inside it.

  • IDS (detection): watches a copy of the traffic (from a SPAN/mirror port or a network TAP) and raises alerts. It can't block, but it can't break anything either.
  • IPS (prevention): sits inline, in the traffic path, and drops what matches. Powerful, but a false positive blocks real users.
IDS watches, IPS blocks Passive detection

attacker

customer

firewall

IDS (copy via SPAN)

switch

web server

The IDS gets a copy of traffic and raises an alert, but the exploit has already reached the server. A human (or SOAR playbook) has to respond.

real attacks caught

69%

false positives / day

26

Signature detection matches known patterns (few false positives, misses new attacks). Anomaly detection flags unusual behaviour (catches new attacks, but tune it or analysts drown in alerts).

Detection methodHowStrengthWeakness
SignatureMatch known patterns (bytes, domains, hashes)Precise, few false positivesMisses new (zero-day) attacks
Anomaly / behaviourLearn "normal", flag deviationsFinds new attacksMore false positives, needs tuning

Alert outcomes you'll hear in every SOC:

  • True positive: real attack, alert fired. 👍
  • False positive: harmless traffic, alert fired (noise and wasted time).
  • False negative: real attack, no alert (the dangerous one).

Popular open-source engines: Suricata and Snort (signatures), Zeek (turns traffic into rich logs for hunting).

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

TASK 04VPNs and secure tunnels

A VPN (virtual private network) builds an encrypted tunnel across an untrusted network such as the internet or café Wi-Fi. Inside the tunnel, traffic behaves as if you were plugged into the office.

VPN: a private tunnel over a public network Toggle the VPN

your laptop

café Wi-Fi

sniffer

internet

VPN gateway

office app

video site

On open Wi-Fi anyone nearby can capture your traffic. HTTPS protects web pages, but DNS, old protocols and misconfigured apps leak.

Site-to-site VPNs link offices permanently (usually IPsec). Remote-access VPNs connect people (WireGuard, IPsec/IKEv2, SSL VPN). VPN gateways are a top target: patch them fast and require MFA.

ProtocolNotes
IPsecThe classic for site-to-site links. IKE negotiates keys; ESP encrypts the packets.
WireGuardModern, tiny codebase, fast; uses Curve25519 and ChaCha20 (Room 09!).
SSL/TLS VPNRuns over port 443, so it works almost anywhere (OpenVPN, many corporate VPN clients).

Split tunnelling sends only company traffic through the VPN. It saves bandwidth but turns the laptop into a bridge between the internet and the office.

VPN gateways (Fortinet, Pulse/Ivanti, Citrix, Palo Alto) are among the most exploited devices on the internet: they're exposed by design and give direct access inside. Patch them fast and require MFA.

A VPN is about secure transport, not anonymity. A consumer "privacy VPN" just moves your trust from your ISP to the VPN company.

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

TASK 05Segmentation and the DMZ

In a flat network, every device can talk to every other one. One phished laptop can reach the database, the payment systems and the backups. Segmentation splits the network into zones and forces traffic between them through a firewall.

Flat vs segmented network Contain the infection

infected PC

HR laptop

flat switch

web

customer db

payments

Everything can talk to everything (east-west traffic is unchecked). One phished laptop reaches the database and payment systems directly: this is how ransomware spreads.

DMZ: a zone for internet-facing servers, so a hacked web server isn't inside the office network. Micro-segmentation goes further, with a policy per workload (zero trust).

  • VLANs split one physical switch into separate logical networks (Room 04).
  • A DMZ (demilitarised zone) holds internet-facing servers like the web shop, so a hacked web server isn't inside the office network.
  • North-south traffic crosses the perimeter (in and out). East-west traffic moves between internal systems, and it's where ransomware spreads.
  • Micro-segmentation gives every workload its own policy, a core idea of zero trust.

Payment-card systems must be segmented by rule: PCI DSS requires the card-data environment to be isolated.

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

TASK 06Wireshark from zero

Wireshark is the standard tool for reading packets. (tcpdump and tshark capture on servers without a screen.) Here's KartKaro's 2 AM capture in a Wireshark-style viewer:

Lab · Wireshark: the 2 AM capture 105/105 packets shown
No.TimeSourceDestinationProtoLenInfo
102:00:29.43910.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
202:00:29.619198.51.100.7710.10.20.15TLS160Application Data
302:00:37.98010.10.30.4210.10.10.53DNS74Standard query A www.google.com
402:00:37.99210.10.10.5310.10.30.42DNS90Standard query response A www.google.com A 142.250.183.36
502:00:38.01010.10.30.42142.250.183.36TCP6650001 → 443 [SYN]
602:00:38.030142.250.183.3610.10.30.42TCP66443 → 50001 [SYN, ACK]
702:00:38.05010.10.30.42142.250.183.36TLS571Client Hello (SNI=www.google.com)
802:01:11.43449.36.100.2010.10.20.21TLS517Client Hello (SNI=shop.kartkaro.in)
902:01:11.47410.10.20.2149.36.100.20TLS1400Server Hello, Change Cipher Spec, Application Data
1002:01:30.45110.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
1102:01:30.631198.51.100.7710.10.20.15TLS160Application Data
1202:02:02.32510.10.20.15198.51.100.77DNS134Standard query TXT 637573746f6d6572732e6373767c6e.0000.x.sync-cdn-telemetry.net
1302:02:02.415198.51.100.7710.10.20.15DNS156Standard query response TXT 637573746f6d6572732e6373767c6e.0000.x.sync-cdn-telemetry.net TXT "ok"
1402:02:11.33510.10.30.4210.10.10.53DNS74Standard query A mail.kartkaro.in
1502:02:11.34710.10.10.5310.10.30.42DNS90Standard query response A mail.kartkaro.in A 13.234.18.9
1602:02:11.36510.10.30.4213.234.18.9TCP6650018 → 443 [SYN]
1702:02:11.38513.234.18.910.10.30.42TCP66443 → 50018 [SYN, ACK]
1802:02:11.40510.10.30.4213.234.18.9TLS571Client Hello (SNI=mail.kartkaro.in)
1902:02:21.20010.10.30.4210.10.20.21TCP6651544 → 80 [SYN]
2002:02:21.21010.10.20.2110.10.30.42TCP6680 → 51544 [SYN, ACK]
2102:02:21.24010.10.30.4210.10.20.21HTTP512POST /admin/login HTTP/1.1 (application/x-www-form-urlencoded)
2202:02:21.30010.10.20.2110.10.30.42HTTP330HTTP/1.1 302 Found (→ /admin/dashboard)
2302:02:21.57210.10.20.15198.51.100.77DNS134Standard query TXT 616d652c70686f6e652c656d61696c.0001.x.sync-cdn-telemetry.net
2402:02:21.662198.51.100.7710.10.20.15DNS156Standard query response TXT 616d652c70686f6e652c656d61696c.0001.x.sync-cdn-telemetry.net TXT "ok"
2502:02:29.96649.36.107.2310.10.20.21TLS517Client Hello (SNI=shop.kartkaro.in)
2602:02:30.00610.10.20.2149.36.107.23TLS1400Server Hello, Change Cipher Spec, Application Data
2702:02:30.55910.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
2802:02:30.739198.51.100.7710.10.20.15TLS160Application Data
2902:02:45.00610.10.20.15198.51.100.77DNS134Standard query TXT 2c636172645f6c617374340a416e6a.0002.x.sync-cdn-telemetry.net
3002:02:45.096198.51.100.7710.10.20.15DNS156Standard query response TXT 2c636172645f6c617374340a416e6a.0002.x.sync-cdn-telemetry.net TXT "ok"
3102:03:07.38810.10.20.15198.51.100.77DNS134Standard query TXT 616c692052616f2c39383435307878.0003.x.sync-cdn-telemetry.net
3202:03:07.478198.51.100.7710.10.20.15DNS156Standard query response TXT 616c692052616f2c39383435307878.0003.x.sync-cdn-telemetry.net TXT "ok"
3302:03:10.000203.0.113.6610.10.20.21TCP5861123 → 21 [SYN] Seq=0 Win=1024 Len=0
3402:03:10.00210.10.20.21203.0.113.66TCP5421 → 61123 [RST, ACK]
3502:03:10.004203.0.113.6610.10.20.21TCP5861123 → 22 [SYN] Seq=0 Win=1024 Len=0
3602:03:10.00610.10.20.21203.0.113.66TCP5422 → 61123 [RST, ACK]
3702:03:10.008203.0.113.6610.10.20.21TCP5861123 → 23 [SYN] Seq=0 Win=1024 Len=0
3802:03:10.01010.10.20.21203.0.113.66TCP5423 → 61123 [RST, ACK]
3902:03:10.012203.0.113.6610.10.20.21TCP5861123 → 25 [SYN] Seq=0 Win=1024 Len=0
4002:03:10.01410.10.20.21203.0.113.66TCP5425 → 61123 [RST, ACK]
4102:03:10.016203.0.113.6610.10.20.21TCP5861123 → 80 [SYN] Seq=0 Win=1024 Len=0
4202:03:10.01810.10.20.21203.0.113.66TCP5880 → 61123 [SYN, ACK]
4302:03:10.020203.0.113.6610.10.20.21TCP5861123 → 110 [SYN] Seq=0 Win=1024 Len=0
4402:03:10.02210.10.20.21203.0.113.66TCP54110 → 61123 [RST, ACK]
4502:03:10.024203.0.113.6610.10.20.21TCP5861123 → 143 [SYN] Seq=0 Win=1024 Len=0
4602:03:10.02610.10.20.21203.0.113.66TCP54143 → 61123 [RST, ACK]
4702:03:10.028203.0.113.6610.10.20.21TCP5861123 → 443 [SYN] Seq=0 Win=1024 Len=0
4802:03:10.03010.10.20.21203.0.113.66TCP58443 → 61123 [SYN, ACK]
4902:03:10.032203.0.113.6610.10.20.21TCP5861123 → 445 [SYN] Seq=0 Win=1024 Len=0
5002:03:10.03410.10.20.21203.0.113.66TCP54445 → 61123 [RST, ACK]
5102:03:10.036203.0.113.6610.10.20.21TCP5861123 → 3306 [SYN] Seq=0 Win=1024 Len=0
5202:03:10.03810.10.20.21203.0.113.66TCP543306 → 61123 [RST, ACK]
5302:03:10.040203.0.113.6610.10.20.21TCP5861123 → 3389 [SYN] Seq=0 Win=1024 Len=0
5402:03:10.04210.10.20.21203.0.113.66TCP543389 → 61123 [RST, ACK]
5502:03:10.044203.0.113.6610.10.20.21TCP5861123 → 8080 [SYN] Seq=0 Win=1024 Len=0
5602:03:10.04610.10.20.21203.0.113.66TCP548080 → 61123 [RST, ACK]
5702:03:26.30310.10.20.15198.51.100.77DNS134Standard query TXT 7878782c616e6a616c692e72406578.0004.x.sync-cdn-telemetry.net
5802:03:26.393198.51.100.7710.10.20.15DNS156Standard query response TXT 7878782c616e6a616c692e72406578.0004.x.sync-cdn-telemetry.net TXT "ok"
5902:03:30.49110.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
6002:03:30.671198.51.100.7710.10.20.15TLS160Application Data
6102:03:48.36210.10.20.15198.51.100.77DNS134Standard query TXT 616d706c652e696e2c343431370a56.0005.x.sync-cdn-telemetry.net
6202:03:48.452198.51.100.7710.10.20.15DNS156Standard query response TXT 616d706c652e696e2c343431370a56.0005.x.sync-cdn-telemetry.net TXT "ok"
6302:03:55.94810.10.30.4210.10.10.53DNS74Standard query A www.irctc.co.in
6402:03:55.96010.10.10.5310.10.30.42DNS90Standard query response A www.irctc.co.in A 23.57.70.104
6502:03:55.97810.10.30.4223.57.70.104TCP6650035 → 443 [SYN]
6602:03:55.99823.57.70.10410.10.30.42TCP66443 → 50035 [SYN, ACK]
6702:03:56.01810.10.30.4223.57.70.104TLS571Client Hello (SNI=www.irctc.co.in)
6802:04:00.79549.36.114.2610.10.20.21TLS517Client Hello (SNI=shop.kartkaro.in)
6902:04:00.83510.10.20.2149.36.114.26TLS1400Server Hello, Change Cipher Spec, Application Data
7002:04:10.68110.10.20.15198.51.100.77DNS134Standard query TXT 696b72616d20532c39393030317878.0006.x.sync-cdn-telemetry.net
7102:04:10.771198.51.100.7710.10.20.15DNS156Standard query response TXT 696b72616d20532c39393030317878.0006.x.sync-cdn-telemetry.net TXT "ok"
7202:04:30.58610.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
7302:04:30.766198.51.100.7710.10.20.15TLS160Application Data
7402:04:32.99410.10.20.15198.51.100.77DNS134Standard query TXT 7878782c76696b2e73406578616d70.0007.x.sync-cdn-telemetry.net
7502:04:33.084198.51.100.7710.10.20.15DNS156Standard query response TXT 7878782c76696b2e73406578616d70.0007.x.sync-cdn-telemetry.net TXT "ok"
7602:04:54.70010.10.20.15198.51.100.77DNS126Standard query TXT 6c652e696e2c393032310a.0008.x.sync-cdn-telemetry.net
7702:04:54.790198.51.100.7710.10.20.15DNS148Standard query response TXT 6c652e696e2c393032310a.0008.x.sync-cdn-telemetry.net TXT "ok"
7802:05:00.50010.10.30.4210.10.10.53ICMP74Echo (ping) request id=0x0001, seq=12
7902:05:00.50110.10.10.5310.10.30.42ICMP74Echo (ping) reply id=0x0001, seq=12
8002:05:23.75010.10.30.4210.10.10.53DNS74Standard query A github.com
8102:05:23.76210.10.10.5310.10.30.42DNS90Standard query response A github.com A 20.207.73.82
8202:05:23.78010.10.30.4220.207.73.82TCP6650052 → 443 [SYN]
8302:05:23.80020.207.73.8210.10.30.42TCP66443 → 50052 [SYN, ACK]
8402:05:23.82010.10.30.4220.207.73.82TLS571Client Hello (SNI=github.com)
8502:05:26.56149.36.121.2910.10.20.21TLS517Client Hello (SNI=shop.kartkaro.in)
8602:05:26.60110.10.20.2149.36.121.29TLS1400Server Hello, Change Cipher Spec, Application Data
8702:05:30.48110.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
8802:05:30.661198.51.100.7710.10.20.15TLS160Application Data
8902:06:30.35810.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
9002:06:30.538198.51.100.7710.10.20.15TLS160Application Data
9102:06:36.50949.36.128.3210.10.20.21TLS517Client Hello (SNI=shop.kartkaro.in)
9202:06:36.54910.10.20.2149.36.128.32TLS1400Server Hello, Change Cipher Spec, Application Data
9302:06:55.70610.10.30.4210.10.10.53DNS74Standard query A cdn.jsdelivr.net
9402:06:55.71810.10.10.5310.10.30.42DNS90Standard query response A cdn.jsdelivr.net A 151.101.1.229
9502:06:55.73610.10.30.42151.101.1.229TCP6650069 → 443 [SYN]
9602:06:55.756151.101.1.22910.10.30.42TCP66443 → 50069 [SYN, ACK]
9702:06:55.77610.10.30.42151.101.1.229TLS571Client Hello (SNI=cdn.jsdelivr.net)
9802:07:30.12910.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
9902:07:30.309198.51.100.7710.10.20.15TLS160Application Data
10002:08:02.74049.36.135.3510.10.20.21TLS517Client Hello (SNI=shop.kartkaro.in)
10102:08:02.78010.10.20.2149.36.135.35TLS1400Server Hello, Change Cipher Spec, Application Data
10202:08:29.52710.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
10302:08:29.707198.51.100.7710.10.20.15TLS160Application Data
10402:09:30.51510.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
10502:09:30.695198.51.100.7710.10.20.15TLS160Application Data

How to read it:

  • Packet list: one row per packet. Colours help: DNS in blue, TLS in purple, HTTP in green, RST in red.
  • Details: click a row to see each layer, from frame and IP up to TCP/UDP and the application.
  • Display filters hide everything except what you ask for. A green bar means the filter is valid; red means a syntax error.
FilterShows
dns · tls · http · icmpOne protocol
ip.addr==10.10.20.15Packets to or from an IP (ip.src / ip.dst for one direction)
ip.addr==10.10.20.0/24A whole subnet
tcp.port==443 · udp.port==53A port in either direction
tcp.flags.syn==1 && tcp.flags.ack==0Connection attempts only
dns.qry.name contains "kart"Text inside a field
&& || ! and bracketsCombine conditions

Follow stream joins one conversation's packets into readable text. Try it on the HTTP POST: anything not encrypted is readable by anyone who can capture it.

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

TASK 07Spotting malicious traffic

Most traffic is boring. Analysts hunt for patterns that don't fit:

PatternLooks likeFilter to try
Port scanOne source, many destination ports, SYNs answered by RSTstcp.flags.syn==1 && tcp.flags.ack==0
BeaconingSmall, regular check-ins to the same hosttls.handshake.extensions_server_name contains "…"
DNS tunnellingLong, random-looking subdomains; TXT queries; DNS sent to an outside serverdns && !(ip.addr==<your resolver>)
Bulk exfiltrationOne internal host sending far more than it receivesStatistics › Conversations
Cleartext credentialsHTTP, FTP, Telnet loginshttp.request.method=="POST"

Beaconing

Malware checks in with its command-and-control (C2) server on a timer. Compare it with a person browsing:

Spot the beacon Malware phones home on a timer
10.10.20.15 → 198.51.100.77:44310.10.30.42 → various sites02:00 → 02:20

Gaps between the red host's connections (seconds)

30s60s90s

People browse in bursts. Malware checks in with its C2 server on a schedule, so the gaps pile up around one value (here 60 s). Attackers add jitter to blur it; tools like RITA and Zeek still score the regularity.

Now go back to the capture in the previous task and investigate the scan and the beacon. In a scan, a SYN, ACK reply means the port is open; RST, ACK means closed.

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

TASK 08Lab: write a Suricata rule

Finding it once is good. Detecting it automatically next time is better. Suricata rules look like this:

alert dns $HOME_NET any -> any any (msg:"Possible DNS exfil to sync-cdn-telemetry"; dns.query; content:"telemetry"; nocase; sid:1000001; rev:1;)
│     │   │         │      │   │    └ options: what to look for and how to label it
│     │   │         │      └───┴ destination IP and port
│     │   └─────────┴ source IP and port ($HOME_NET = your internal ranges)
│     └ protocol (tcp, udp, dns, tls, http …)
└ action (alert, drop for IPS mode, pass)
  • msg is what analysts see in the alert.
  • dns.query is a sticky buffer: the next content only searches the DNS query name, not the whole packet.
  • sid is a unique rule ID; use 1000000+ for your own rules. rev is its version.

Write a rule that fires on all three exfiltration queries and stays quiet on the normal traffic:

Lab · Write a Suricata rule Alert on exfil only

Write one rule that alerts on all three exfiltration queries and none of the normal traffic. Edit the ??? parts.

quietexfil query #1
quietexfil query #2
quietexfil query #3
quietstaff: www.google.com
quietstaff: mail.kartkaro.in
quietCDN lookup: cdn.jsdelivr.net
quietcustomer HTTPS

Format: action proto src port -> dst port (msg:"…"; [buffer;] content:"…"; [nocase;] sid:N; rev:1;). Buffers here: dns.query, tls.sni. Variables: $HOME_NET, $EXTERNAL_NET.

Alerts land in eve.json (Suricata's JSON log), which the SIEM collects. You'll meet it again in the SOC rooms.

Answer the questions

+20 XP

+10 XP

+10 XP

+10 XP

TASK 09Final mission: stop the 2 AM leak

Put it together. Use the capture to answer the questions about the leak (hints: Statistics › Conversations, the filter dns && !(ip.addr==10.10.10.53), and the hex decode button on an exfiltration query):

Lab · Wireshark: the 2 AM capture 105/105 packets shown
No.TimeSourceDestinationProtoLenInfo
102:00:29.43910.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
202:00:29.619198.51.100.7710.10.20.15TLS160Application Data
302:00:37.98010.10.30.4210.10.10.53DNS74Standard query A www.google.com
402:00:37.99210.10.10.5310.10.30.42DNS90Standard query response A www.google.com A 142.250.183.36
502:00:38.01010.10.30.42142.250.183.36TCP6650001 → 443 [SYN]
602:00:38.030142.250.183.3610.10.30.42TCP66443 → 50001 [SYN, ACK]
702:00:38.05010.10.30.42142.250.183.36TLS571Client Hello (SNI=www.google.com)
802:01:11.43449.36.100.2010.10.20.21TLS517Client Hello (SNI=shop.kartkaro.in)
902:01:11.47410.10.20.2149.36.100.20TLS1400Server Hello, Change Cipher Spec, Application Data
1002:01:30.45110.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
1102:01:30.631198.51.100.7710.10.20.15TLS160Application Data
1202:02:02.32510.10.20.15198.51.100.77DNS134Standard query TXT 637573746f6d6572732e6373767c6e.0000.x.sync-cdn-telemetry.net
1302:02:02.415198.51.100.7710.10.20.15DNS156Standard query response TXT 637573746f6d6572732e6373767c6e.0000.x.sync-cdn-telemetry.net TXT "ok"
1402:02:11.33510.10.30.4210.10.10.53DNS74Standard query A mail.kartkaro.in
1502:02:11.34710.10.10.5310.10.30.42DNS90Standard query response A mail.kartkaro.in A 13.234.18.9
1602:02:11.36510.10.30.4213.234.18.9TCP6650018 → 443 [SYN]
1702:02:11.38513.234.18.910.10.30.42TCP66443 → 50018 [SYN, ACK]
1802:02:11.40510.10.30.4213.234.18.9TLS571Client Hello (SNI=mail.kartkaro.in)
1902:02:21.20010.10.30.4210.10.20.21TCP6651544 → 80 [SYN]
2002:02:21.21010.10.20.2110.10.30.42TCP6680 → 51544 [SYN, ACK]
2102:02:21.24010.10.30.4210.10.20.21HTTP512POST /admin/login HTTP/1.1 (application/x-www-form-urlencoded)
2202:02:21.30010.10.20.2110.10.30.42HTTP330HTTP/1.1 302 Found (→ /admin/dashboard)
2302:02:21.57210.10.20.15198.51.100.77DNS134Standard query TXT 616d652c70686f6e652c656d61696c.0001.x.sync-cdn-telemetry.net
2402:02:21.662198.51.100.7710.10.20.15DNS156Standard query response TXT 616d652c70686f6e652c656d61696c.0001.x.sync-cdn-telemetry.net TXT "ok"
2502:02:29.96649.36.107.2310.10.20.21TLS517Client Hello (SNI=shop.kartkaro.in)
2602:02:30.00610.10.20.2149.36.107.23TLS1400Server Hello, Change Cipher Spec, Application Data
2702:02:30.55910.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
2802:02:30.739198.51.100.7710.10.20.15TLS160Application Data
2902:02:45.00610.10.20.15198.51.100.77DNS134Standard query TXT 2c636172645f6c617374340a416e6a.0002.x.sync-cdn-telemetry.net
3002:02:45.096198.51.100.7710.10.20.15DNS156Standard query response TXT 2c636172645f6c617374340a416e6a.0002.x.sync-cdn-telemetry.net TXT "ok"
3102:03:07.38810.10.20.15198.51.100.77DNS134Standard query TXT 616c692052616f2c39383435307878.0003.x.sync-cdn-telemetry.net
3202:03:07.478198.51.100.7710.10.20.15DNS156Standard query response TXT 616c692052616f2c39383435307878.0003.x.sync-cdn-telemetry.net TXT "ok"
3302:03:10.000203.0.113.6610.10.20.21TCP5861123 → 21 [SYN] Seq=0 Win=1024 Len=0
3402:03:10.00210.10.20.21203.0.113.66TCP5421 → 61123 [RST, ACK]
3502:03:10.004203.0.113.6610.10.20.21TCP5861123 → 22 [SYN] Seq=0 Win=1024 Len=0
3602:03:10.00610.10.20.21203.0.113.66TCP5422 → 61123 [RST, ACK]
3702:03:10.008203.0.113.6610.10.20.21TCP5861123 → 23 [SYN] Seq=0 Win=1024 Len=0
3802:03:10.01010.10.20.21203.0.113.66TCP5423 → 61123 [RST, ACK]
3902:03:10.012203.0.113.6610.10.20.21TCP5861123 → 25 [SYN] Seq=0 Win=1024 Len=0
4002:03:10.01410.10.20.21203.0.113.66TCP5425 → 61123 [RST, ACK]
4102:03:10.016203.0.113.6610.10.20.21TCP5861123 → 80 [SYN] Seq=0 Win=1024 Len=0
4202:03:10.01810.10.20.21203.0.113.66TCP5880 → 61123 [SYN, ACK]
4302:03:10.020203.0.113.6610.10.20.21TCP5861123 → 110 [SYN] Seq=0 Win=1024 Len=0
4402:03:10.02210.10.20.21203.0.113.66TCP54110 → 61123 [RST, ACK]
4502:03:10.024203.0.113.6610.10.20.21TCP5861123 → 143 [SYN] Seq=0 Win=1024 Len=0
4602:03:10.02610.10.20.21203.0.113.66TCP54143 → 61123 [RST, ACK]
4702:03:10.028203.0.113.6610.10.20.21TCP5861123 → 443 [SYN] Seq=0 Win=1024 Len=0
4802:03:10.03010.10.20.21203.0.113.66TCP58443 → 61123 [SYN, ACK]
4902:03:10.032203.0.113.6610.10.20.21TCP5861123 → 445 [SYN] Seq=0 Win=1024 Len=0
5002:03:10.03410.10.20.21203.0.113.66TCP54445 → 61123 [RST, ACK]
5102:03:10.036203.0.113.6610.10.20.21TCP5861123 → 3306 [SYN] Seq=0 Win=1024 Len=0
5202:03:10.03810.10.20.21203.0.113.66TCP543306 → 61123 [RST, ACK]
5302:03:10.040203.0.113.6610.10.20.21TCP5861123 → 3389 [SYN] Seq=0 Win=1024 Len=0
5402:03:10.04210.10.20.21203.0.113.66TCP543389 → 61123 [RST, ACK]
5502:03:10.044203.0.113.6610.10.20.21TCP5861123 → 8080 [SYN] Seq=0 Win=1024 Len=0
5602:03:10.04610.10.20.21203.0.113.66TCP548080 → 61123 [RST, ACK]
5702:03:26.30310.10.20.15198.51.100.77DNS134Standard query TXT 7878782c616e6a616c692e72406578.0004.x.sync-cdn-telemetry.net
5802:03:26.393198.51.100.7710.10.20.15DNS156Standard query response TXT 7878782c616e6a616c692e72406578.0004.x.sync-cdn-telemetry.net TXT "ok"
5902:03:30.49110.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
6002:03:30.671198.51.100.7710.10.20.15TLS160Application Data
6102:03:48.36210.10.20.15198.51.100.77DNS134Standard query TXT 616d706c652e696e2c343431370a56.0005.x.sync-cdn-telemetry.net
6202:03:48.452198.51.100.7710.10.20.15DNS156Standard query response TXT 616d706c652e696e2c343431370a56.0005.x.sync-cdn-telemetry.net TXT "ok"
6302:03:55.94810.10.30.4210.10.10.53DNS74Standard query A www.irctc.co.in
6402:03:55.96010.10.10.5310.10.30.42DNS90Standard query response A www.irctc.co.in A 23.57.70.104
6502:03:55.97810.10.30.4223.57.70.104TCP6650035 → 443 [SYN]
6602:03:55.99823.57.70.10410.10.30.42TCP66443 → 50035 [SYN, ACK]
6702:03:56.01810.10.30.4223.57.70.104TLS571Client Hello (SNI=www.irctc.co.in)
6802:04:00.79549.36.114.2610.10.20.21TLS517Client Hello (SNI=shop.kartkaro.in)
6902:04:00.83510.10.20.2149.36.114.26TLS1400Server Hello, Change Cipher Spec, Application Data
7002:04:10.68110.10.20.15198.51.100.77DNS134Standard query TXT 696b72616d20532c39393030317878.0006.x.sync-cdn-telemetry.net
7102:04:10.771198.51.100.7710.10.20.15DNS156Standard query response TXT 696b72616d20532c39393030317878.0006.x.sync-cdn-telemetry.net TXT "ok"
7202:04:30.58610.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
7302:04:30.766198.51.100.7710.10.20.15TLS160Application Data
7402:04:32.99410.10.20.15198.51.100.77DNS134Standard query TXT 7878782c76696b2e73406578616d70.0007.x.sync-cdn-telemetry.net
7502:04:33.084198.51.100.7710.10.20.15DNS156Standard query response TXT 7878782c76696b2e73406578616d70.0007.x.sync-cdn-telemetry.net TXT "ok"
7602:04:54.70010.10.20.15198.51.100.77DNS126Standard query TXT 6c652e696e2c393032310a.0008.x.sync-cdn-telemetry.net
7702:04:54.790198.51.100.7710.10.20.15DNS148Standard query response TXT 6c652e696e2c393032310a.0008.x.sync-cdn-telemetry.net TXT "ok"
7802:05:00.50010.10.30.4210.10.10.53ICMP74Echo (ping) request id=0x0001, seq=12
7902:05:00.50110.10.10.5310.10.30.42ICMP74Echo (ping) reply id=0x0001, seq=12
8002:05:23.75010.10.30.4210.10.10.53DNS74Standard query A github.com
8102:05:23.76210.10.10.5310.10.30.42DNS90Standard query response A github.com A 20.207.73.82
8202:05:23.78010.10.30.4220.207.73.82TCP6650052 → 443 [SYN]
8302:05:23.80020.207.73.8210.10.30.42TCP66443 → 50052 [SYN, ACK]
8402:05:23.82010.10.30.4220.207.73.82TLS571Client Hello (SNI=github.com)
8502:05:26.56149.36.121.2910.10.20.21TLS517Client Hello (SNI=shop.kartkaro.in)
8602:05:26.60110.10.20.2149.36.121.29TLS1400Server Hello, Change Cipher Spec, Application Data
8702:05:30.48110.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
8802:05:30.661198.51.100.7710.10.20.15TLS160Application Data
8902:06:30.35810.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
9002:06:30.538198.51.100.7710.10.20.15TLS160Application Data
9102:06:36.50949.36.128.3210.10.20.21TLS517Client Hello (SNI=shop.kartkaro.in)
9202:06:36.54910.10.20.2149.36.128.32TLS1400Server Hello, Change Cipher Spec, Application Data
9302:06:55.70610.10.30.4210.10.10.53DNS74Standard query A cdn.jsdelivr.net
9402:06:55.71810.10.10.5310.10.30.42DNS90Standard query response A cdn.jsdelivr.net A 151.101.1.229
9502:06:55.73610.10.30.42151.101.1.229TCP6650069 → 443 [SYN]
9602:06:55.756151.101.1.22910.10.30.42TCP66443 → 50069 [SYN, ACK]
9702:06:55.77610.10.30.42151.101.1.229TLS571Client Hello (SNI=cdn.jsdelivr.net)
9802:07:30.12910.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
9902:07:30.309198.51.100.7710.10.20.15TLS160Application Data
10002:08:02.74049.36.135.3510.10.20.21TLS517Client Hello (SNI=shop.kartkaro.in)
10102:08:02.78010.10.20.2149.36.135.35TLS1400Server Hello, Change Cipher Spec, Application Data
10202:08:29.52710.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
10302:08:29.707198.51.100.7710.10.20.15TLS160Application Data
10402:09:30.51510.10.20.15198.51.100.77TLS248Client Hello (SNI=update.sync-cdn-telemetry.net)
10502:09:30.695198.51.100.7710.10.20.15TLS160Application Data

The server is pushing data out through DNS queries sent straight to the attacker's name server, bypassing KartKaro's own resolver. Nobody blocks DNS, so it's a favourite tunnel.

Now write the firewall policy: let customers shop, let the web server reach its database, let admins in over SSH and let servers use the internal resolver. Block everything else, including that exfil path:

Lab · Firewall rule builder 5/9 flows correct

Keep KartKaro's business running and block the attacks. Rules are checked top to bottom; anything unmatched is denied.

  1. 1→:
  2. ∞ deny any any (implicit)
allowCustomers → shop (HTTPS 443)
denyCustomers → shop (HTTP 80, redirects to HTTPS)
denyWeb server → database (MySQL 3306)
denyAdmins → web server (SSH 22)
denyServers → internal resolver (DNS 53)
denyInternet → database (3306)
denyInternet → web server (RDP 3389)
denyInternet → web server (SSH 22)
denyServers → internet DNS (the 2 AM exfil path)

Report:

  1. Contain: isolate 10.10.20.15; block 198.51.100.77 and *.sync-cdn-telemetry.net.
  2. Fix egress: servers may only use the internal resolver; DNS to the internet is denied and alerted on.
  3. Detect: deploy the Suricata rule and alert on long or high-volume TXT queries.
  4. Hygiene: move /admin to HTTPS-only and rotate the leaked admin password.

Complete the mission for the Wire Reader badge and the room's XP.

Answer the questions

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

+10 XP

+20 XP

+10 XP