0Pricing
Cloud & IT Cert Prep · Lesson

Network and Memory Forensics

Capture and analyze packet captures (pcap) and memory dumps to reconstruct attacker communications and identify malware hiding in RAM.

Network and Memory Forensics is a free Cloud & IT Cert Prep lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cloud & IT Cert Prep learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Network Forensics Overview

Network forensics captures and analyzes network traffic to reconstruct attacker communications, identify lateral movement, and detect data exfiltration. Unlike endpoint forensics, which examines evidence that may have been tampered with on a compromised host, network evidence is harder for attackers to alter after the fact — they cannot retroactively delete packets already captured by a network tap or flow monitoring system. Network forensics complements endpoint forensics to provide a complete attack picture.

Packet Capture Fundamentals

Packet capture (PCAP) records all network traffic at the packet level, including full payload content. Tools include Wireshark (GUI-based, widely used), tcpdump (command-line, scriptable), and Zeek (formerly Bro, produces protocol-level logs from PCAP). Full packet capture is storage-intensive; high-speed networks may require purpose-built capture appliances. PCAP analysis can reveal: credentials in cleartext protocols, C2 beaconing patterns, exfiltrated data, and lateral movement connections.

# tcpdump: capture all traffic on eth0
tcpdump -i eth0 -w /forensics/incident.pcap

# Capture only traffic to/from attacker IP
tcpdump -i eth0 host 198.51.100.10 -w /forensics/attacker.pcap

# Wireshark filter examples:
# Show HTTP GET requests: http.request.method == 'GET'
# Show DNS queries: dns.qr == 0
# Show large outbound transfers: ip.dst != 10.0.0.0/8 && tcp.len > 1000
# Show cleartext FTP creds: ftp.request.command == 'PASS'

NetFlow and Traffic Analysis

NetFlow (and its open-source equivalent IPFIX) records metadata about network conversations without capturing payload content: source/destination IP, source/destination port, protocol, byte count, packet count, and timestamps. NetFlow is far more storage-efficient than full PCAP and is suitable for long-term retention (90-365 days). During forensics, NetFlow can identify: which systems communicated during the incident window, data exfiltration (large outbound byte counts), and C2 beaconing (regular small connections to external IPs).

# Analyze NetFlow data with nfdump
# Show top talkers (by bytes) in incident time window
nfdump -r /var/cache/netflow/2026/06/20/ \
  -t '2026/06/20.02:00-2026/06/20.06:00' \
  -s ip/bytes -n 20

# Show all connections TO external IPs from suspicious host
nfdump -r /var/cache/netflow/ \
  'src ip 10.0.1.50 and dst ip not in [10.0.0.0/8]'

# VPC Flow Logs provide similar data in cloud environments

DNS Forensics

DNS query logs are a powerful forensic source because most C2 communications and malware downloads require DNS resolution. Indicators of malicious DNS activity include: queries to newly registered or low-reputation domains, high-volume queries to a single domain (DGA malware trying many generated names), DNS tunneling (unusually long or high-entropy subdomain names used to exfiltrate data), and queries to domains associated with known malware families. DNS is often logged even when HTTP traffic inspection is limited.

# DNS sinkhole detection - check for DGA domains
# DGA: malware generates random domain names to find active C2
# Indicators:
# - High volume of NXDOMAIN responses from one host
# - Domain names with high entropy (random characters)
# - Queries to .ru/.cn/.tk TLDs unusual for organization

# Wireshark filter for NXDOMAIN responses
dns.flags.rcode == 3  # NXDOMAIN

# Calculate domain entropy to find DGA
# Legitimate: google.com (low entropy)
# DGA: xk3j9pqm2v.com (high entropy)

C2 Communication Patterns

Command and Control (C2) channels between attacker-controlled servers and compromised systems have characteristic patterns. Beaconing produces regular periodic connections (e.g., every 30 seconds) that are identifiable in NetFlow as many small packets to the same external IP on a regular interval. Jitter adds randomization to beacon intervals to evade detection. Analysts look for statistical regularity in connection timing to identify beaconing among the noise of normal web traffic.

# Detect beaconing behavior with Zeek/RITA
# RITA (Real Intelligence Threat Analytics) analyzes Zeek logs

# Manual NetFlow beacon detection
nfdump -r /var/cache/netflow/ \
  'src ip 10.0.1.50' \
  -o 'fmt:%ts %sa %da %dp %byt' |
  awk '{print $1}' | sort | uniq -c
# Regular intervals in the timestamp column = beaconing

# Zeek conn.log: look for many connections to same IP
# with similar connection durations and small byte counts

Memory Forensics with Volatility

Memory forensics analyzes RAM dumps to extract evidence of malicious activity that may not be present on disk. The Volatility Framework (open source) is the industry-standard tool for memory analysis. Key capabilities: listing running processes and their parent-child relationships, identifying injected code in legitimate processes, extracting network connections open at the time of acquisition, recovering registry hive content from memory, and extracting encryption keys held in RAM.

# Volatility 3 memory analysis commands
# List running processes
vol -f memory.raw windows.pslist

# List processes showing hidden/injected processes
vol -f memory.raw windows.pstree

# Find process injection (code in wrong memory regions)
vol -f memory.raw windows.malfind

# List network connections at time of capture
vol -f memory.raw windows.netstat

# Dump a suspicious process's memory for further analysis
vol -f memory.raw windows.memmap --pid 1234 --dump

Detecting Malware in Memory

Malware in memory exhibits specific patterns that Volatility plugins identify. Process injection (code injected into a legitimate process like svchost.exe) shows up as memory regions with execute permissions in a process that normally wouldn't have them. Hollow processes (legitimate process shells with malicious code replacing the original) show inconsistencies between the process name and the actual code in memory. Kernel rootkits may hide processes from the process list, but Volatility can detect them by comparing the running process list against the kernel's raw process structure list.

# Find suspicious executable memory regions (malfind output)
# Look for:
# - MZ header (PE file magic bytes: 4d 5a) in injected memory
# - Memory pages with Read+Write+Execute permissions (uncommon)
# - Code in heap or stack regions

vol -f memory.raw windows.malfind
# Output shows process, virtual address, protection flags, hex dump
# MZ in non-standard location = process injection indicator

# Compare pslist (API) vs psscan (pool scanner) to find hidden procs:
vol -f memory.raw windows.psscan  # shows processes hidden from API

Credential Extraction from Memory

Memory forensics is particularly powerful for credential recovery. Windows stores credentials in LSASS (Local Security Authority Subsystem Service) process memory for Single Sign-On purposes. Tools like Mimikatz exploit this by reading LSASS memory to extract plaintext passwords and NTLM hashes. Forensically, Volatility can extract the same information from a memory dump acquired for investigation — revealing what credentials were cached on the compromised system, which informs the scope of potential lateral movement.

# Extract cached credentials from LSASS memory (forensic use)
vol -f memory.raw windows.hashdump  # extracts NTLM hashes from SAM

# Detect Mimikatz execution in memory:
vol -f memory.raw windows.malfind | grep -i lsass
# Or search for Mimikatz strings in process memory:
vol -f memory.raw windows.strings --pid <lsass_pid> |
  grep -i 'mimikatz\|sekurlsa\|wdigest'

# Defense: Credential Guard (Windows 10+) moves LSASS credentials
# to a protected VTL1 hypervisor environment Mimikatz cannot access

Correlating Network and Memory Evidence

The most powerful forensic analysis combines network and memory evidence. Memory shows what processes were running and what code they contained; network forensics shows what those processes communicated with. A process visible in Volatility memory analysis that has a network connection visible in PCAP, connecting to a domain flagged in DNS logs, and corresponding to an external IP in NetFlow — this convergence provides high-confidence attribution of malicious activity and supports a complete attack narrative.

Network Time Protocol (NTP) and Timestamp Accuracy

Accurate timestamps are essential for correlating network and endpoint forensic evidence. If a server's clock is drifted by 15 minutes relative to the firewall's clock, correlating events by timestamp produces false timelines. Network forensics evidence is only as reliable as the time synchronization of the devices generating logs. Organizations must configure consistent NTP (Network Time Protocol) across all security-relevant devices and document any known time discrepancies discovered during an investigation.

# Verify NTP synchronization on Linux
timedatectl status
# Check: 'System clock synchronized: yes'
# Check: 'NTP service: active'

# Check NTP peers
ntpq -p
# *  = current reference, + = candidate

# Windows NTP status
w32tm /query /status

# During incident: document the clock offset of each system
# so timestamps can be normalized in the timeline

Encrypted Traffic Analysis Challenges

Most modern C2 communications use TLS encryption, preventing network forensics analysts from reading payload content directly. However, even encrypted traffic reveals metadata: connection timing patterns (beaconing), certificate anomalies (self-signed certs from attacker infrastructure, mismatched CN fields), JA3 fingerprints (TLS client fingerprinting that can identify specific malware families regardless of destination), and unusual TLS handshake characteristics. Tools like Zeek extract JA3 fingerprints automatically from TLS connections, enabling detection of known malware without decrypting traffic.

# Zeek extracts JA3 fingerprints from TLS connections
# ssl.log contains JA3 and JA3S hashes
# Check against known-malware JA3 database

cat ssl.log | zeek-cut ja3 ja3s server_name |
  sort | uniq -c | sort -rn | head -20

# Known malware JA3 hashes (examples):
# Metasploit: 6734f37431670b3ab4292b8f60f29984
# Cobalt Strike: 72a589da586844d7f0818ce684948eea
# Reference: https://github.com/salesforce/ja3

Quick Check

Test your understanding of CompTIA Security+ (SY0-701) concepts from this lesson.

Lesson Recap

In this lesson you learned: packet captures and NetFlow provide complementary network evidence — PCAP shows full content while NetFlow shows metadata at scale, C2 beaconing appears as regular periodic connections detectable through statistical analysis of connection timing, and Volatility Framework analyzes RAM dumps to detect process injection, extract network connections, and identify malware hiding in legitimate processes. Congratulations on completing the forensics modules — next up is risk management and security frameworks.

Frequently asked questions

Is the “Network and Memory Forensics” lesson free?

Yes — the full text of “Network and Memory Forensics” is free to read here on the web, and the Cloud & IT Cert Prep course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cloud & IT Cert Prep course, upgrade to CoddyKit PRO.

What will I learn in “Network and Memory Forensics”?

Capture and analyze packet captures (pcap) and memory dumps to reconstruct attacker communications and identify malware hiding in RAM. You practise Cloud & IT Cert Prep with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cloud & IT Cert Prep?

No prior experience is required. Cloud & IT Cert Prep on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Network and Memory Forensics” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cloud & IT Cert Prep lesson?

Yes. Every Cloud & IT Cert Prep lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Order of Volatility and Evidence Acquisition
  2. Chain of Custody and Legal Admissibility
  3. Windows Forensic Artifacts: Registry, Event Logs, and Prefetch
  4. Network and Memory Forensics
← Back to Cloud & IT Cert Prep