Objectives: By the end of this topic, you will be able to…
Distinguish the three types of network telemetry used in security operations
Map attacker activity to observable traffic patterns across the attack lifecycle
Identify a compromised host and its user from DHCP, Kerberos, and SAMR traffic
Trace a malware C2 channel from an IDS alert to its domain and HTTP payload
Extract and structure network indicators of compromise (IOCs) from a packet capture
Use Zeek to generate structured network logs from raw traffic
Write a Suricata detection rule based on observed malware behavior
Network analysis in security operations
Network analysis is one of the primary sources of evidence for a security operations center (SOC) analyst investigating an incident. Endpoint forensics needs access to the specific machine involved, while network evidence is collected passively at chokepoints such as firewalls, switches and network taps, so it covers every host whose traffic crosses them. That makes it the natural starting point when you need to establish what happened, when, which systems were involved, and whether data left the network.
Your job as a network analyst is to separate normal traffic from anomalous traffic, extract evidence from the anomalies, and turn that evidence into a timeline that the wider investigation can build on.
Question
Before continuing: name one question about an incident that network evidence can answer and endpoint evidence on a single machine cannot, and one that only the endpoint can answer. If you can’t, re-read the paragraph above with “covers every host whose traffic crosses them” in mind.
Types of network telemetry
Security teams work with three complementary forms of network data, each with different trade-offs in granularity, storage cost, and detection capability:
Full packet capture is expensive to store at scale, so many organizations keep flow data for months but full packets only for a short rolling window, often a few days. Some deployments keep that rolling buffer specifically so that when an alert fires, the packets surrounding it can be preserved before they are overwritten. A capture you are handed during an investigation therefore usually exists because something already looked suspicious.
Question
An alert fires on a connection that happened 10 days ago. Your organization keeps flow records for 90 days and full packets for 72 hours. Which of the three telemetry types can you still use, and which question about that connection can you no longer answer?
The attack lifecycle in network traffic
Most phases of an intrusion leave a recognizable footprint on the network, and knowing which pattern belongs to which phase tells you where to look first.
Phase
What the attacker does
Observable network pattern
Reconnaissance
Port scanning, service enumeration
Many SYN packets to sequential ports with no established connections; OS fingerprinting probes
Initial access
Exploiting a web app, phishing link, credential stuffing
Unusual HTTP POST volumes; authentication failures in rapid succession; connections to suspicious external IPs
Command & control (C2)
Maintaining persistent access from compromised host
Periodic outbound connections (beaconing) at fixed intervals; DNS queries for algorithmically generated domains (DGA); long-duration low-bandwidth sessions
Lateral movement
Spreading through the internal network
SMB/RDP connections between internal hosts that don’t normally communicate; LDAP enumeration queries; NTLM authentications from one host to many others in a short window (a common sign of pass-the-hash)
Exfiltration
Sending data out of the network
Large outbound transfers to external IPs; data encoded in DNS query subdomains (DNS tunneling); unusual volumes for non-standard ports
Question
A workstation makes an HTTPS connection to the same external IP every 60 seconds, each transferring under 1 KB, for six hours. Which phase in the table does this pattern fit, and what in the description points you there?
Detection-oriented protocol analysis
Rather than reading protocols for their own sake, incident detection trains you to ask: what does malicious use of this protocol look like? The protocols below are the ones directly relevant to investigating a compromised Windows host on an Active Directory network.
DHCP
When a Windows device configured for DHCP joins a network, it broadcasts a DHCP Request to obtain an IP address. This packet contains two pieces of information that are invaluable for host identification:
Option 12 (Hostname): the machine’s configured name, sent in plaintext
Ethernet source address: the device’s MAC address, visible in every frame it transmits
DHCP is passive and automatic: the machine exposes its name and MAC address simply by joining the network, so you can identify a host from its DHCP traffic even without access to Active Directory logs. The exchange has four messages, Discover → Offer → Request → Acknowledge (DORA). The Request is the most useful for identification because the client sends it and it carries the hostname option; the MAC also appears inside DHCP itself, in the client hardware address (chaddr) field, which lets you corroborate the Ethernet source.
What the Discover and the Request do not carry is the client’s IP address in the IP header. The client has no address until the server confirms one, so both messages are sent from 0.0.0.0 to the broadcast address 255.255.255.255. The address appears in two other places: the Request names the address the client wants in option 50 (Requested IP Address), and the server’s Acknowledge assigns it in the yiaddr (“your IP address”) field. Read the IP from one of those, never from the source address of the client’s own packets.
The same start-up sequence explains what you see in ARP, the protocol that maps IP addresses to MAC addresses on the local network. Before using an address, Windows sends ARP probes with a sender IP of 0.0.0.0 to check that nobody else holds it. If no DHCP server answers in time, Windows assigns itself a link-local address from 169.254.0.0/16 (Automatic Private IP Addressing, APIPA), and it drops that address once a lease arrives. A single MAC address can therefore appear in ARP with 0.0.0.0, a 169.254.x.x address and its leased address within the first seconds of a capture, and all three still belong to one machine.
DNS
Attackers favour DNS because most networks must let internal resolvers reach the internet, so DNS traffic leaves even where other outbound traffic is filtered. Malware uses it in two ways: to find its C2 server by name, which lets the attacker move the server without changing the malware, and as a covert channel that hides data inside queries and answers. For investigation, DNS is the bridge between IP addresses and domain names, including the domain names that malware uses.
Each signal below is something you can measure, and each has legitimate traffic that looks the same. Establish what normal looks like on the network before you call anything anomalous.
Signal
Normal
Suspicious
Benign look-alikes
What fails (NXDOMAIN)
Failures for readable names under the organization’s own suffixes
Bursts of failures for random-looking names across many unrelated domains (DGA)
Proxy auto-discovery (wpad.<suffix>), Active Directory lookups retried under every DNS suffix, Chrome’s random single-label probes at startup
Subdomains per domain
Readable, structured labels; few unique subdomains under any one domain
High-entropy labels and hundreds of unique subdomains under one domain from one host (tunneling)
Active Directory SRV records (long but structured), CDN hostnames, security products that look up file hashes over DNS
Record types from workstations
A, AAAA, HTTPS, SRV, PTR
Repeated TXT, NULL or CNAME queries to one unusual domain
SPF and DKIM TXT lookups, which come from mail servers rather than desktops
Which resolver
Workstations query only the internal resolver
Port 53 to an external IP, or DNS over HTTPS to a public resolver, bypassing it
VPN clients and browsers configured to use DNS over HTTPS
Timing
Bursts that follow user activity
Lookups of one domain at a regular interval, around the clock (beaconing)
Time sync, update checks, connectivity tests, antivirus telemetry
A domain generation algorithm (DGA) derives a list of pseudo-random domains from a seed, often the date. The attacker registers only one or two of them, so most of the malware’s lookups fail. What gives a DGA away is not how many lookups fail but which names fail: random strings under many different domains, not readable names under your own.
In DNS tunneling, the client encodes data into subdomains of a domain the attacker controls (4a6f686e3a50617373.t.example-c2.com). The attacker’s authoritative nameserver receives every query, decodes the label, and answers with data of its own. Direction matters: data leaving the victim (exfiltration) travels in the query names, while data reaching the victim (commands, payloads) travels in the answers, commonly TXT records, though tunneling tools also use NULL, CNAME and MX. A label holds at most 63 bytes, so a tunnel produces many queries and a large number of unique subdomains, which is a stronger signal than the length of any single name.
Beaconing is often invisible in DNS itself. The client caches an answer for its TTL, so malware that checks in every minute against a record with a TTL of several hours queries DNS once and then reconnects to the cached IP. The regularity then shows in the connection records (conn.log), not in the DNS log. Attackers also add jitter, randomizing the interval, so look for regularity rather than an exact period.
DNS responses also let you work backwards from a known-malicious IP to the domain name: filter for DNS answers containing that IP address (dns.a == <IP>) to recover the domain the malware resolved. The filter matches responses only, because the address exists only in the answer section; a query carries just the name.
Question
In a short capture of a Windows workstation, a quarter of all DNS responses are NXDOMAIN. What would you check before concluding that the host is running a DGA?
HTTP
Unencrypted HTTP exposes the full request and response, including headers and body. For malware analysis this is ideal: the C2 channel, the URI the malware posts to, the data it sends, and any User-Agent it declares are all readable. Key indicators:
User-Agent strings: malware that builds its own HTTP requests often uses outdated, absent, or hardcoded User-Agent values that do not match normal browser patterns. Malware that drives a browser already installed on the victim sends that browser’s own User-Agent, which is identical to legitimate traffic and makes a weak indicator.
URI patterns: paths like /gate.php, /update, /fingerprint are common C2 naming conventions
Request bodies: information-stealers send a victim profile in POST bodies before exfiltrating credentials. The profile may describe the machine (hardware ID, hostname, username) or the victim’s browsers.
A browser profile is built by browser fingerprinting: the C2 server returns a page whose JavaScript reads properties the browser exposes to any website (platform, language, CPU core count), queries the graphics card through WebGL, and draws a hidden canvas image whose exact pixels vary with the GPU, drivers and installed fonts. The script then posts the results back. Stolen browser sessions are easier to replay if the attacker can imitate the victim’s browser, which is one reason stealers collect this.
POST bodies from web forms and scripts are often sent as application/x-www-form-urlencoded: name=value pairs joined by &, with special characters percent-encoded as % plus two hexadecimal digits (%7B is {, %22 is ", %3A is :). Read raw, such a body looks like noise. Wireshark decodes it for you under HTML Form URL Encoded in the packet details, and any URL decoder does the same for text copied from a stream.
When traffic moves to HTTPS, the payload is hidden, but the destination hostname remains visible in the Server Name Indication (SNI) field of the TLS handshake, along with the server certificate in TLS 1.2 and earlier (TLS 1.3 encrypts the certificate). Even the SNI is no longer guaranteed. Encrypted Client Hello (ECH) encrypts the real hostname inside the handshake and leaves only an outer SNI that names the hosting provider’s shared front end; for sites behind Cloudflare, that outer name is cloudflare-ech.com. Chrome and Firefox enabled ECH by default in 2023. When ssl.log shows a provider’s generic name, go back to DNS: the client still had to resolve the real hostname, so the DNS answer containing that IP, shortly before the connection, names it.
Encryption also leaves the shape of the traffic intact: when each connection started, how long it lasted, and how many bytes went in each direction. Zeek’s conn.log records these per connection (orig_bytes from the client, resp_bytes from the server). A workstation that sends far more than it receives to an external server it has no business with is a classic exfiltration pattern, recognizable without reading a single byte of content.
Analysts also fingerprint the TLS client from its handshake parameters: JA3 was the long-standing method, but since browsers began randomizing the order of TLS extensions (Chrome did so in 2023), JA3 values for browsers vary between connections; its successor JA4 sorts those fields before hashing to stay stable. Malware with its own TLS implementation often still produces a stable, distinctive fingerprint.
Kerberos, SAMR, and LDAP
Kerberos is the authentication protocol of Windows Active Directory. When an account logs on, the client sends an AS-REQ (Authentication Service Request) to the Key Distribution Center on a domain controller. The request body, including the CNameString field that names the client principal, travels in cleartext, because the client has no session key yet; only the pre-authentication timestamp is encrypted, with a key derived from the account’s password. That is why Kerberos traffic reliably ties an account name to a source IP even though the authentication itself is protected. The domain controller’s replies, the AS-REP and the TGS-REP (the reply to a request for a service ticket), repeat the client name in cleartext too, so a plain search for CNameString also lists the domain controller’s address next to the username. Kerberos numbers its message types: 10 is AS-REQ, 11 AS-REP, 12 TGS-REQ, 13 TGS-REP. Filtering on type 10 keeps only the messages whose source address is the client.
Not every principal you see belongs to a person. Domain-joined computers have their own accounts and authenticate with them, and computer account names end in $: a workstation named WKSTN-07 authenticates as WKSTN-07$. When you list the CNameString values sent from one host, set the machine account aside before you report who was logged on.
Kerberos exposes the account name and little else. The ticket the domain controller returns does carry richer account data in its authorization data (the PAC), but that part is encrypted and unreadable in a capture. For attributes such as a user’s full name, look at the protocols a workstation uses to query the domain’s account database. SAMR (Security Account Manager Remote, specified in Microsoft’s MS-SAMR) is an MS-RPC interface, usually carried over SMB through the \PIPE\samr named pipe, that Windows clients use to look up and manage accounts. Its QueryUserInfo call at information level 21 returns the account’s full record, including the full name, and when neither SMB encryption nor RPC-level privacy is applied, which is common inside corporate networks, that response is readable in a capture. LDAP (Lightweight Directory Access Protocol) can return the same information through attributes such as displayName, mail and memberOf, but Windows domain members typically protect their LDAP sessions to the domain controller with SASL signing and sealing, so in many captures you can see that a query happened without being able to read the attribute values. Which protocol yields the full name depends on what the client did and how the domain is configured, so check SAMR and LDAP before concluding the name isn’t in the capture.
Question
From a single internal IP you extract three Kerberos CNameString values: FIN-LT-112$, mrojas, and mrojas again an hour later. Which value identifies the logged-on user, and why do you discard the other? If the LDAP traffic from that host shows search requests but no readable displayName, what explains that, and which other protocol would you check for the full name?
Network indicators of compromise (IOCs)
You met indicators of compromise in class 07 as artifacts left on a host; a network IOC is the same idea applied to traffic, an observable value in a capture or log that points to malicious activity. The extraction methods below use tshark, the command-line counterpart of Wireshark: it reads a capture, keeps only the packets that match a display filter (-Y), and prints just the fields you name (-T fields -e …) as text you can pipe into other commands. Common categories:
IOC type
Examples
Extraction method
IP address
C2 server IP, scanner IP
tshark -T fields -e ip.src -e ip.dst
Domain name
C2 domain, DGA domain
DNS log or tshark -Y dns -T fields -e dns.qry.name
Zeek with the ja3 package (stock Zeek does not log JA3)
User-Agent
Malware HTTP header
tshark -Y http -T fields -e http.user_agent
File hash
Malware transferred over HTTP
Extract objects in Wireshark, hash with sha256sum
IOCs feed threat-intelligence platforms such as MISP and OpenCTI, and the correlation rules of a SIEM (a security information and event management system, which centralizes logs and alerts). A single IOC is weak evidence; the same indicator confirmed across independent sources, such as an IDS alert, a DNS log and an HTTP request in a capture, is strong evidence. That is what the confidence you attach to an IOC expresses: high when independent sources agree and the value is specific to the threat, medium when it is specific but seen in one source only, low when it could plausibly appear in legitimate traffic (a shared hosting IP, a common User-Agent).
Indicators also differ in how long they stay useful. David Bianco’s Pyramid of Pain (2013) ranks them by how much it costs an attacker to change them: file hashes at the bottom, then IP addresses, then domain names, then network and host artifacts (URI patterns, User-Agent strings, distinctive protocol behavior), then tools, with tactics, techniques and procedures (TTPs) at the top. An operator can move to a new IP or register a new domain in minutes, but changing the URI scheme or request format their malware uses means rebuilding and redeploying it.
This ranking shapes your response. Blocking IPs and domains is fast and stops the current campaign, so you do it first, but you should expect it to be bypassed soon; detections written against network artifacts survive infrastructure rotation, which is why the next section’s signatures target request structure rather than addresses.
Question
An infostealer campaign has used 40 different C2 IP addresses in a month, but every victim sends the same POST request path and the same unusual User-Agent. Place each of those three indicators on the Pyramid of Pain, and decide which one you would build a long-lived detection on and which you would use only for an immediate block.
Introduction to Zeek
Zeek (formerly Bro) is a network security monitor that reads packet captures or live traffic and writes structured, tab-separated log files, one per protocol or activity type. Instead of reading raw packets, you can query these logs like a database.
Key Zeek log files:
Log file
Content
conn.log
Every TCP/UDP/ICMP flow: IPs, ports, duration, bytes
dns.log
Every DNS query and response
http.log
HTTP requests: method, host, URI, user-agent, status
ssl.log
TLS connections: server name (SNI), TLS version, cipher, whether the handshake completed; certificate details go to x509.log
files.log
Files transferred over HTTP, SMB, SMTP
weird.log
Protocol anomalies Zeek detected automatically
Run offline with zeek -r <capture>, Zeek reads the whole capture and writes its logs into the current directory. A log is only created when Zeek saw something to put in it: no weird.log means Zeek recorded no protocol anomalies, not that something failed. Each log begins with header lines describing its columns, and Zeek ships a small companion utility, zeek-cut, that reads a log on standard input and prints only the columns you name, without the headers, so zeek-cut id.orig_h query < dns.log gives you just the client address and query name of every DNS lookup, ready to pipe into sort and uniq.
Treat weird.log as a lead, not a finding. Zeek writes a “weird” whenever traffic departs from what the protocol specification expects, and most departures come from unusual but harmless implementations: a TCP stack that shrinks its receive window, a Windows service that negotiates authentication in a non-standard way. A weird deserves attention when it involves a host or connection you already suspect, or when many of them cluster around one connection. Each entry carries the connection’s uid and addresses, so you can check exactly that.
Every Zeek log records time in the ts column as a Unix epoch timestamp: seconds since 1970-01-01 00:00 UTC. zeek-cut -u prints it as a readable UTC date and zeek-cut -d as the analyst machine’s local time. Other tools are not consistent with each other: Wireshark and tshark’s frame.time show local time by default, Suricata writes its alerts in the local time of the machine running it, and IDS consoles and threat reports usually use UTC. An analyst in Bogotá (UTC−5) and an alert in UTC will disagree by five hours about the same packet. Pick UTC for an investigation, convert every tool’s output to it, and say so in the report.
Example
Suppose conn.log from some capture has thousands of rows and you want to know which internal hosts contacted port 80 most often. Read this pipeline and predict what each stage removes or adds before you check it against the description of zeek-cut above:
Why does the grep pattern anchor 80 to the end of the line after whitespace, instead of simply searching for 80?
Signature-based detection with Suricata
Zeek describes traffic; an intrusion detection system (IDS) judges it. Suricata is an open-source IDS engine that inspects traffic, live or from a capture, against a set of signatures: rules that each describe one pattern known to indicate malicious activity. When a packet or session matches, Suricata writes an alert, and in its simplest output format, fast.log, each alert is one line with a timestamp, the rule’s message and the addresses involved. Most organizations don’t write all their signatures themselves: they load community or commercial rulesets such as Emerging Threats (ET), whose rule names begin with a category, so an alert named ET MALWARE … comes from the ET ruleset’s malware category. Writing your own rule is how you turn what you learned from an investigation into a detection that catches the next occurrence.
A Suricata rule is written on a single line and has two parts. The header states the action, the protocol, the source address and port, a direction arrow, and the destination address and port. $HOME_NET and $EXTERNAL_NET are variables defined in the Suricata configuration file: $HOME_NET lists your organization’s internal ranges, and by default $EXTERNAL_NET is everything else. The options, inside parentheses and separated by semicolons, describe what must match and how to report it. msg is the text written to the alert. flow:established,to_server restricts the rule to packets of an established TCP session travelling from client to server, so it ignores the server’s responses and half-open connection attempts. content gives bytes that must appear. On its own, content searches the raw payload; when it follows a sticky buffer keyword such as http.method, http.uri, http.host or http.user_agent, it is matched only against that parsed field of the HTTP request, and every content after the buffer keyword stays in that buffer until another buffer keyword appears. http.uri holds the request path and query string, and http.host holds the Host header, so a domain name never matches in http.uri. Finally, classtype categorizes the alert, sid gives it a unique numeric identifier, and rev counts its revisions. Public rulesets reserve SID ranges for themselves (ET uses the 2,000,000 range), so a rule you write yourself takes an SID outside those ranges; 1,000,000 to 1,999,999 is the conventional local range.
A rule is only as good as its behavior on real traffic, and three terms describe that behavior. A true positive is an alert on traffic that really is malicious; a false positive is an alert on legitimate traffic; a false negative is malicious traffic the rule misses. Evasion is a deliberate change by the attacker that turns your true positives into false negatives. Specificity pulls these in opposite directions: a rule that matches a long, exact URI rarely fires on legitimate traffic, but a one-character change to that URI evades it, while a looser rule survives small changes at the cost of more false positives. In terms of the Pyramid of Pain, you want a rule anchored on artifacts the attacker would have to rebuild their malware to change, matched loosely enough to tolerate the parts that vary per victim, such as query-string parameters.
Example
The rule below detects a hypothetical backdoor that reports to its server with an HTTP POST to /gate.php while announcing the User-Agent NetUpdater/2.1:
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"LOCAL Backdoor check-in to /gate.php"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/gate.php"; http.user_agent; content:"NetUpdater/"; classtype:trojan-activity; sid:1000001; rev:1;)
Read it left to right and say, for each content, which part of the request it is matched against. Then decide: would it fire on a GET /gate.php request? On a POST to /gate.php?id=42? On the same POST sent to port 8080? Check each answer against the header and the sticky-buffer explanation above.
Question
Before continuing: in your own words, why does a rule that matches the destination IP address of a C2 server tend to generate few false positives but be easy to evade, and why would matching only content:"POST" in http.method be the opposite?
Hands-on lab
Requirements: two Kali Linux machines, one per student, each with Wireshark and tshark. The PCAP file (2026-01-31-traffic-analysis-exercise.pcap) is available for download on Moodle under the Class 11 materials; both of you download it. Alongside Zeek, tshark and Suricata, the commands use the standard shell utilities from class 02 (ls, mkdir, cat, grep, sort, uniq, tr, and the nano text editor) to list, create, print, filter, count and edit files and text.
Install Zeek on both machines (the Victim analyst needs zeek-cut; the C2 analyst runs Zeek itself). These commands use the Zeek project’s Debian 13 binary package:
# Add the repositoryecho 'deb http://download.opensuse.org/repositories/security:/zeek/Debian_13/ /' | sudo tee /etc/apt/sources.list.d/security:zeek.list# Import the GPG keycurl -fsSL https://download.opensuse.org/repositories/security:zeek/Debian_13/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/security_zeek.gpg > /dev/null# Install Zeeksudo apt update && sudo apt install zeek
Zeek installs to /opt/zeek/. Add its binaries to your PATH so you can run zeek and zeek-cut from any directory:
Working directory (both of you): put the PCAP in a directory of its own, then create a working directory next to it and move into it before running anything:
mkdir lab11-logs && cd lab11-logs
Run every command in this lab from inside lab11-logs/; the commands reach the capture as ../2026-01-31-traffic-analysis-exercise.pcap. Everything you produce (handoff.md, iocs.csv, lumma.rules, suricata-output/) lives there next to the Zeek logs.
Time: report every timestamp in UTC. The commands below already ask for it (frame.time_utc in tshark, zeek-cut -u, TZ=UTC for Suricata); if you add your own, do the same.
Scenario
Your SOC’s intrusion detection system fired the following alert on 2026-01-27 at 23:05 UTC:
Lumma Stealer is an information-stealing malware sold as a service on criminal forums. After infecting a Windows host, it sends a profile of the victim to a command-and-control server and then exfiltrates credentials, browser cookies, and cryptocurrency wallets. A profile can describe the operating system, the browsers, or both; Part 4 asks you to find out which one this sample collected.
Your job is to work backwards from this alert to answer six questions the SOC manager needs answered within the hour:
What is the IP address of the infected Windows client?
What is its MAC address?
What is its hostname?
What user account was logged in at the time?
What is that user’s full name?
What domain is hosted at 153.92.1.49, the server that triggered the alert?
You have one file: 2026-01-31-traffic-analysis-exercise.pcap. Work through the parts below in order.
Roles
You work as a pair, and you split the investigation the way a SOC splits an incident: one of you establishes who was hit, the other establishes what the malware did and builds the detection. Decide now who takes which role.
Traces the largest download; builds iocs.csv from both of your findings
Supplies the C2 rows via handoff.md
Part 6
False-positive review
Writes, runs and tunes the rule; true-positive count; evasion
You exchange three things, at fixed points: lab11-logs/ and the infected IP at the end of Part 1, the C2 findings at the end of Part 4, and fast.log during Part 6. Write each handoff into a shared handoff.md file with the value and the command that produced it, so your partner can re-run it. Each of you answers the [!question] callouts for your own parts; answer Part 1’s and Part 6’s together.
Part 1: Survey the capture
Before chasing the alert, orient yourself. Know the shape of the traffic before narrowing your focus.
Parse the capture with Zeek to generate structured logs (C2 analyst; you are already inside lab11-logs/):
List all unique IP addresses present. tshark outputs source and destination as two tab-separated columns per packet; tr converts each tab to a newline so sort -u deduplicates across both columns. Some packets contain two IP headers: an ICMP error message carries a copy of the header of the packet that caused it, and tshark would print both values joined by a comma. -E occurrence=f keeps only the first, outer value of each field:
Confirm the alert IP appears in the capture. With -z conv,tcp, the display filter must be passed as the third argument inside the -z option (not via -Y), otherwise tshark ignores it:
Check for automatic anomaly detection. If weird.log doesn’t exist, Zeek recorded no protocol anomalies; note that as your answer. If it does, list each kind of weird with the hosts involved, so you can judge whether any of them touches the alert:
How many unique internal IPs (10.1.21.0/24) appear in the capture? What protocols make up the majority of traffic? Does weird.log flag anything that involves 153.92.1.49 or a host talking to it, and on that basis, does any entry deserve follow-up? For each answer, identify which command produced it and explain why that specific command gives you that information, not just what the output shows.
Handoff 1 (C2 analyst → Victim analyst)
From step 4’s conversation table, write into handoff.md the internal IP that exchanged traffic with 153.92.1.49, and paste the conversation line that shows it. Send your partner handoff.md and the .log files from your lab11-logs/, using any way you normally share files (a shared folder, a USB drive, or your course chat). The Victim analyst places them inside their own lab11-logs/, so that dns.log and the other logs sit in the directory they run commands from. The Victim analyst uses this IP as <INFECTED_IP> and as the address whose DHCP lease identifies the infected client in Part 2.
Part 2: Identify the infected host
The infected machine contacted an external C2 server. Its IP, MAC address, and hostname are all visible in routine network protocols; you do not need to inspect malware payloads to find them.
DHCP is the most reliable source: when a Windows machine joins the network, it broadcasts a DHCP Request that includes its hostname (option 12) and the address it wants (option 50), and its MAC address is visible as the Ethernet source.
Filter DHCP traffic and extract host identification fields. dhcp.option.dhcp is the message type (1 Discover, 2 Offer, 3 Request, 5 Acknowledge). dhcp.option.hostname extracts option 12, the hostname the client declares. dhcp.option.requested_ip_address extracts option 50, and dhcp.ip.your is the yiaddr field in which the server assigns the address. ip.src is included so you can see why it is not the answer for the client’s packets. -E header=y prints field names as a header row so the output is self-labeling:
See what the infected host resolved. Its lookups usually include service records for the domain controller (_ldap._tcp.dc._msdcs.<domain>), which reveal the Active Directory domain name; this corroborates the DHCP findings rather than repeating them:
In Wireshark, use the filter dhcp and open a DHCP Request packet. Expand Dynamic Host Configuration Protocol → Option: (12) Host Name for the hostname and Option: (50) Requested IP Address for the address, and read the MAC from the Ethernet II → Source field.
Question
Record the IP address, MAC address, and hostname of the infected client. Do they belong to a single consistent machine? How did you confirm this? The ARP output lists more than one IP address for the infected MAC: explain each one. Which DHCP packet type (Discover, Offer, Request, or Acknowledge) is most useful for host identification, and why is ip.src the wrong field to read the client’s address from?
Part 3: Identify the user account
The hostname tells you which machine was infected. The user account tells you whose credentials and data were at risk. On a Windows Active Directory network, Kerberos authentication traffic reveals usernames in plaintext, even when the authentication itself is encrypted.
Extract every Kerberos message that carries a client principal name. CNameString is the client principal name field, and kerberos.msg_type is the message type (10 AS-REQ, 11 AS-REP, 12 TGS-REQ, 13 TGS-REP). Expect the domain controller’s address in this list too, because its replies repeat the name:
For the user’s full name, extract it from SAMR (Security Account Manager Remote) traffic. The workstation queries the domain controller with QueryUserInfo, which returns the full name stored in Active Directory:
In Wireshark: filter kerberos, find a KRB5 AS-REQ packet from the infected host, expand Kerberos → as-req → req-body → cname → cname-string to read the account name. For the full name, filter samr and look for QueryUserInfo response packets containing the Full Name field.
Question
What is the username of the logged-in account? What is their full name? Step 1 also showed the username next to the domain controller’s IP: why, and why does step 2 filter on message type 10 rather than only on the source IP? Explain why Kerberos gives you the username but not the full name, and why SAMR is the right protocol to retrieve it. What does the presence of Kerberos traffic tell you about the network environment?
Part 4: Trace the C2 channel
With the victim identified, shift focus to the malicious traffic that triggered the alert. Understand what the malware was communicating and to whom.
Find the domain name the malware used to reach this IP. dns.a filters on the IP address in a DNS A record response, which lets you work backwards from a known IP to the domain that resolved to it:
Inspect the exchange to understand what data was transmitted. In Wireshark, filter http and ip.addr == 153.92.1.49, right-click the first GET request, and select Follow → HTTP Stream to read the request, the page the server returned, and the POST that followed. The POST body is URL-encoded: select the POST packet and expand HTML Form URL Encoded in the packet details to read it decoded.
Measure the C2 traffic you cannot read. Step 1 showed that most packets to 153.92.1.49 use port 443, not 80. List every connection to the C2 with its port and the bytes sent by each side, then the hostname those TLS sessions announced:
To total the bytes per port instead of adding rows by hand, awk reads each line as numbered columns ($1, $2, …), adds the sent and received bytes into per-port counters, and prints the totals at the end:
What domain resolved to 153.92.1.49? What URIs were requested, and with which methods? Who wrote the code that collected the data in the POST body: the malware, or the page the server returned? What specifically was being fingerprinted: the operating system or the browsers, and how can you tell? For the port 443 connections: in which direction did most bytes flow, what does that suggest the malware was doing, and what about those sessions can you not determine from the capture?
Handoff 2 (C2 analyst → Victim analyst)
Add to handoff.md the C2 domain, every HTTP method and distinct URI path, the User-Agent values, and the total bytes sent to and received from the C2 on port 443, each with the command that produced it, and send the updated file to your partner. Do not interpret them for your partner: they decide the confidence of each indicator in Part 5.
Part 5: Extract and structure IOCs
Compile your findings into a structured IOC table. This is the artifact you hand to the threat intelligence team so the indicators can be blocked and shared across the organization.
Trace the largest download (Victim analyst). The most frequent destination in the external IP list above is not the C2. Call it <TOP_IP> and find out what it is. First, see what hostname its TLS session announced and how much data it delivered:
If server_name is a hosting provider’s generic name rather than a site, the real hostname was hidden by ECH. Recover it from DNS, then list the lookups the infected host made in the seconds before it, which show how the user got there. Zeek’s epoch timestamps sort in time order, so grep -B 10 prints the 10 lookups that preceded the match:
The Victim analyst builds the IOC table, combining the indicators from the commands above with the C2 findings in handoff.md. Save it as iocs.csv, one row per indicator with the header Type,Value,Confidence,Source, with at least 6 IOCs. The markdown table below shows the expected columns:
Type
Value
Confidence
Source
IP address
153.92.1.49
High
IDS alert + PCAP confirmation
Domain
…
…
…
URL
…
…
…
Domain (download)
…
…
…
User-Agent
…
…
…
Question
Which IOC type is most durable, least likely to change if the attacker rotates infrastructure? Which is least durable? What does this imply for your blocking strategy? What confidence did you give the User-Agent, and why? For <TOP_IP>: what did ssl.log report as its server name, why, which domain did it really serve, and what do the lookups before it suggest about how the infection started? Is <TOP_IP> itself a good indicator to block, given who hosts it? For the external IP list, explain what the grep -Ev regex is doing: what address ranges does it exclude, and why are those excluded rather than included?
Pair check
Before Part 6, the C2 analyst reviews iocs.csv against their own Part 4 output, and the Victim analyst confirms that the host in Handoff 1 is the host whose DHCP, Kerberos and SAMR identity they recorded. Resolve any mismatch now: the report states one identity and one set of C2 values.
Part 6: Write and test a detection rule
The IDS rule that fired was named ET MALWARE Lumma Stealer Victim Fingerprinting Activity. In this part you will write a Suricata rule that reproduces that detection, run it against the same PCAP, and verify it fires.
Install Suricata:
sudo apt install suricata -y
Write the rule. Suricata rules must be written as a single line. Open a text editor and create lumma.rules:
nano lumma.rules
Enter the rule below, all on one line, replacing <METHOD> with the method of the request that carried the fingerprint data back to the C2 (the request with a body), and <URI_PATH> with the path component of that request’s URI, both taken from handoff.md. Three distinctions matter:
http.uri holds the path and query string, everything after the domain, starting with /. Do not put the hostname here.
http.host matches the Host header, the domain name you recovered in Part 4. These are separate sticky buffers.
Use the path, not the query string: content matches anywhere in the buffer, so the path alone matches every request to that endpoint, regardless of query parameters that change per victim.
The -S flag loads only your rules file, ignoring the default ruleset. The -k none flag skips checksum validation, which is necessary for PCAPs captured with hardware checksum offloading.
Verify the rule fired:
cat suricata-output/fast.log
Each match produces one line in fast.log with a timestamp, the alert message, and the source and destination addresses. Count the alert lines and compare that number against the HTTP requests to the C2 you listed in Part 4.
If fast.log is empty, your rule did not match. Re-check the method and URI path: use tshark to confirm the exact values directly from the PCAP before editing lumma.rules and re-running.
Handoff 3 (C2 analyst → Victim analyst)
Once fast.log contains alerts, send suricata-output/fast.log and your final lumma.rules to your partner. The Victim analyst needs both for the false-positive review below.
Evaluate your rule. Split the evaluation by role, then combine it in the report.
True positive rate (C2 analyst): How many times did the rule fire, and how many HTTP requests to the C2 did Part 4 list? For every request the rule did not alert on, say why it did not match and whether it should have. Would a second rule for the other method add detection value, or only duplicate alerts for the same check-in?
False positive risk (Victim analyst): Using fast.log from your partner (Handoff 3), confirm that every alert’s source address is the infected host you identified in Part 2. Then search the HTTP indicator list from Part 5 for any request that contains the same URI path but was sent to a different Host. A match would mean your rule could fire on traffic that isn’t this C2. What makes the URI path in your rule distinctive enough to avoid firing on legitimate traffic?
Evasion (C2 analyst): Name one change the attacker could make that would prevent your rule from firing. How would you modify the rule to catch that variant? Re-run Suricata with the modified rule and report whether it still fires on this capture.
Question
The original IDS signature fired on port 80 HTTP traffic, but Part 4 showed that most of the traffic to the same C2 went over port 443. Would your Suricata rule fire on those sessions, and why not? Using only what stays visible in TLS (the SNI in this capture, the timing, the byte counts), sketch how you would detect the port 443 sessions instead, and say what that detection would miss if the C2 also enabled ECH.
Submission
ZIP archive of your lab11-logs/ directory, containing:
the Zeek logs
handoff.md: the three handoffs, with values and commands
iocs.csv: structured IOC table
lumma.rules: your Suricata rule file
suricata-output/fast.log: alert output confirming the rule fired
Report (3–4 pages) answering all six SOC questions with evidence, covering:
How you identified the infected host and user (which protocols, which fields)
What the malware communicated to the C2 server
Your IOC table with confidence ratings
Your Suricata rule, the alert count from fast.log, and your evasion evaluation
Reflection: compare the C2’s port 80 and port 443 sessions. What could you establish about each, and what did encryption take away? Include the ECH-hidden download from Part 5.
Which role each of you took, and one point where your partner’s handoff changed what you did next
Protocol for querying Active Directory; often signed and sealed between Windows clients and domain controllers, so attribute values may not be readable in a capture
SAMR
Security Account Manager Remote: MS-RPC interface over SMB that Windows clients use to query account records; QueryUserInfo returns a user’s full name
ECH
Encrypted Client Hello: TLS extension that hides the real hostname behind a provider’s generic outer SNI, leaving DNS as the place to recover it
Suricata
Open-source IDS engine that matches traffic against single-line signatures and writes alerts such as fast.log