Reading width
Wide uses the full column for everything, text, diagrams, code, and exercises. Narrow keeps the standard reading width.
Text size
Scales the body text. Headings and code blocks keep their size.
In this section
Network Forensics of Lateral Movement and Exfiltration: East-West Traffic, Uploads and SSH
Introduction
Once an intruder holds one account on one machine, two things usually follow: moving to the hosts where the valuable data or the useful privileges are, and taking something out. Both happen with legitimate protocols and often with legitimate credentials, so neither looks like an attack packet by packet. What gives them away is the shape: which hosts an account reached, in what order, and what left the network afterwards.
jdoe from ws45: a share, a management endpoint and a shell on srv01, then a shell from srv01 to srv02 while the first was still open, and a desktop on srv02.
This lesson reads two windows from the lab. In the first, jdoe's account moves from ws45 across the server segment using SMB, WinRM, SSH and RDP. In the second, the same account reads the finance share and sends data out of the network.
The evidence is the sensors on the LAN, the server segment and the firewall's outside link, the domain controller's authentication log, the servers' own login logs and a key log found on ws45. Module 9 covers the movement and Module 10 the staging and exfiltration.
East-West Traffic
Everything one workstation started on the server segmentMost monitoring watches the internet edge. Movement inside a network happens between internal hosts, on segments the edge never sees, so it needs a sensor between them. The lab has one on the server segment. Every connection ws45 opened there in the Module 9 window:
$ zeek-cut id.orig_h id.resp_h id.resp_p proto < zeek-srv/conn.log \
| awk '$1 == "10.20.30.45"' | sort | uniq -c | sort -k3,4
2 10.20.30.45 10.20.10.10 389 tcp
7 10.20.30.45 10.20.10.10 53 udp
2 10.20.30.45 10.20.10.10 88 udp
4 10.20.30.45 10.20.10.10 88 tcp
1 10.20.30.45 10.20.10.11 22 tcp
1 10.20.30.45 10.20.10.11 445 tcp
1 10.20.30.45 10.20.10.11 5985 tcp
1 10.20.30.45 10.20.10.12 3389 tcp
DNS, Kerberos and LDAP to the domain controller, and then one connection each to four services: SMB and WinRM on srv01, SSH on srv01, and RDP on srv02. That is the whole footprint, and it is small enough to read in full, which is the first advantage of reading east-west traffic by source rather than by alert.
The connections to the domain controller are dependencies rather than steps. A domain account asks the DC for a ticket before it reaches a service, so the Kerberos exchanges are a record of where the account intended to go, timed seconds before each connection.
The four service connections are the path itself: a file share, a remote management endpoint, a shell and a desktop, reached one after another by one workstation in about five minutes.
Each one, alone, is something an administrator might do on an ordinary day. Together, from a user's workstation, under an account that is not an administrator's, they are a pattern that needs explaining. The next two sections attach an account to each connection and find the step the workstation did not make itself.
Note what the sensor cannot see. It sees connections between segments, through the bridge it sits on. A host that reached another on the same segment without crossing the bridge would leave no record here, which is why sensor placement decides which movement a network can investigate at all.
Module 9's first lesson reads east-west traffic and its blind spots. It also reads the opposite problem: a sensor placed where everything crosses it sees so much routine traffic that one workstation's footprint is easy to lose unless the reading starts from that workstation.
The Account Behind Each Connection
Joining on address and portA connection record names two addresses. An account is named by the host that authenticated it: the domain controller for Kerberos, sshd and xrdp on the servers for SSH and RDP. Both sides record the client's address and source port, and that pair is the join. The pack's path.py does it for every connection in the path:
$ python3 path.py 10.20.30.45 | grep -v -e ':389' -e 'no host log' | tail -12
dc01: jdoe, ticket for cifs/srv01
15:23:24 10.20.30.45:38284 > 10.20.10.10:88
dc01: jdoe, ticket for HTTP/srv01
15:23:24 10.20.30.45:46256 > 10.20.10.11:5985
15:24:24 10.20.30.45:44768 > 10.20.10.11:22
srv01: Accepted password for jdoe
15:24:44 10.20.10.11:49022 > 10.20.10.12:22
srv02: Accepted password for jdoe
15:27:14 10.20.30.45:56956 > 10.20.10.12:3389
srv02 xrdp: login successful for user jdoe
15:28:06 10.20.10.12:53076 > 10.20.10.11:22
srv01: Accepted publickey for svc-mon: ED25519 SHA256:+lD/t4v38+ODuotMIjL2s
Each line under a connection comes from a different host's own record, and there are only a few kinds of record that can name an account:
What names the account behind a connection
A Kerberos ticket, with the client's address and port
sshd and xrdp logins, with the same address and port
A service with no host log leaves only the connection
The output reads as a story. jdoe asked for tickets for the file service and the HTTP service on srv01, which is how SMB and WinRM authenticate in a domain. jdoe logged in to srv01 over SSH with a password. Then the line that matters: a connection from srv01 to srv02 on port 22, accepted for jdoe, and later RDP from ws45 to srv02, also jdoe.
The join is only as good as the host logs. The LDAP connections and the SMB and WinRM sessions themselves have no host log in the pack, so their lines say only that; the account is attached through the Kerberos ticket requested from the same address seconds before.
Where a host log exists and the join is exact, the account is observed. Where it rests on a ticket's timing, it is a strong inference, and a case should say which is which.
The output also includes a line that is not part of jdoe's path: svc-mon logging in to srv01 from srv02 with a key. The script adds any connection a destination opened while a session to it was open, and svc-mon's schedule happened to fall inside one.
Reading the result, rather than trusting it, is what catches that. Module 9's lesson on reconstructing the path walks through path.py line by line before using it. It is about eighty lines, and every rule it applies is one the lesson argues for, which is the standard for any script an investigation relies on.
The Hop the Workstation Never Made
Movement from a server, not from ws45ws45's SSH session to srv01 opened at 15:24:24 and lasted 28 seconds. While it was open, srv01 opened an SSH connection of its own, to srv02, at 15:24:44, and srv02's sshd logged jdoe in with a password. ws45 never connected to srv02's SSH. The account went there from srv01, through the session ws45 had open.
That is the step a source-based search misses. A list of everything ws45 connected to shows srv01 and later srv02's RDP; it does not show that jdoe also reached srv02's shell, because that connection's source was srv01.
Finding it needs two things: a sensor that sees server-to-server traffic, and a rule that follows a session into the host it reached and asks what that host did next while the session was open.
The background makes the rule harder to apply than it sounds. srv02 connects to srv01 over SSH every sixty seconds or so, all window long:
$ zeek-cut ts id.orig_h id.resp_h id.resp_p < zeek-srv/conn.log \
| awk '$2 == "10.20.10.12" && $4 == 22' | wc -l
9
That is svc-mon, a monitoring account with a key, documented in the pack's notes as SSH from srv02 to srv01. It is regular, it uses a key rather than a password, and it repeats on a timer. jdoe's hop runs the other way, from srv01 to srv02, with a password, once, inside an interactive session.
Every one of those differences is visible in the records, and together they separate the movement from the monitoring. None of them needs the content of the sessions; the direction, the authentication method, the count and the timing are all in the connection records and the host logs.
Case 4, the exercise in Module 9, turns this around: legitimate administration that looks like lateral movement, where the same methods have to show why each step is expected rather than why it is suspicious. Module 9 reads SMB, SSH, RDP and WinRM each in its own lesson, with what each protocol shows on the wire and what its host logs add.
Staging: Reading More Than the Role Needs
The finance share, by bytesIn the Module 10 window, jdoe's account on ws45 connected to srv01's SMB service, where the finance share lives. jdoe is a user with no finance role, according to the pack's notes. The connection, from the LAN sensor:
$ zeek-cut id.orig_h id.resp_h id.resp_p orig_bytes resp_bytes < zeek-lan/conn.log \
| awk '$3 == 445 && $1 == "10.20.30.45"'
10.20.30.45 10.20.10.11 445 22206 18489191
ws45 sent 22,206 bytes and received 18,489,191: requests out, file contents back. This lab's SMB is not encrypted, so Zeek's SMB analyzer recorded each file the session opened, with its name and size:
$ zeek-cut id.orig_h name size < zeek-lan/smb_files.log \
| awk '$1 == "10.20.30.45" && $2 != "<share_root>"' | head -5
10.20.30.45 ar-aging-2026-08.csv 313467
10.20.30.45 ap-aging-2026-10.csv 276977
10.20.30.45 board-pack-q3.xlsx 876414
10.20.30.45 gl-2026-07-ledger.csv 301024
10.20.30.45 payroll-2026-10.csv 359828
Those are the first five of the session's opens. Counted by client, across the whole window, the picture is plainer:
$ zeek-cut id.orig_h name size < zeek-lan/smb_files.log \
| awk '$2 != "<share_root>" {n[$1]++; b[$1] += $3}
END {for (h in n) print h, n[h], b[h]}' | sort
10.20.30.45 40 18458395
10.20.30.46 6 5871720
ws45 opened 40 files totalling 18,458,395 bytes, which accounts for nearly all of the bytes the connection received, consistent with reading each file in full. ws46, asmith's workstation in finance, opened one file, q3-forecast.xlsx, 6 times over the window in short separate sessions, which is what working on a document looks like. jdoe, with no finance role, connected once and read forty files in under a minute.
Board packs, aging reports, bonus pools and bank reconciliations are all in the list.
Where SMB 3 encryption is on, the names disappear and only the connection's bytes and direction remain, which is still enough to frame the question; this lab shows what the sensor gains when it is off. Either way, the pattern is an account reading far more, far faster, than any role it holds would explain.
Staging is the name for gathering data in one place before sending it out. On the network it often looks like this, a read of unusual size from a share by an account that does not usually touch it, and sometimes like a copy from several sources to one internal host.
Either way it is the step before exfiltration, and if it is caught here the data has not yet left.
The domain controller's log adds the account: a ticket for the file service on srv01, requested by jdoe from ws45 at the same second. Module 10's first lesson reads staging from both sides, the share's connection and the authentication around it, and the cases where a large read is ordinary.
Uploads, Read Against What Is Approved
Direction first, then sizeTwo minutes after the read, ws45 opened five connections to filedrop.example.net and sent most of them several megabytes each, receiving almost nothing back. Seen from the firewall's outside link, every connection carries the firewall's address, and sorted by bytes sent:
$ zeek-cut id.resp_h id.resp_p orig_bytes resp_bytes < zeek-outside/conn.log \
| sort -k3,3nr | head -6
203.0.113.131 443 20027665 1464
203.0.113.140 22 4509567 5695
203.0.113.130 443 4200820 1439
203.0.113.130 443 4200820 1440
203.0.113.130 443 4192069 1440
203.0.113.150 443 37586 1418
On a timeline, sized by bytes sent, the window's outward transfers look like this:
The read from the share, the upload in parts to the file-sharing service and the SSH session to an unknown server, against the approved nightly backup from srv01, which is larger than all of them.
The largest dot is the one that matters least, which is the trap in reading a list like this from the top:
The reasonable mistake
Ranking uploads by size
An analyst sorts the window's outbound connections by bytes sent and starts at the top. The top is srv01's nightly backup, 20,027,665 bytes to an approved service, larger than the upload and the SSH session together.
Instead: Read uploads against what is approved and expected for that host first. Volume ranks events only among those nothing explains.
Before reading any size, the pack's notes say which outbound services each host is expected to use:
$ sed -n '/Approved/,/vps17/p' hosts.txt
Approved services: CloudSync (cdn-sync.example.org) on finance workstations,
VaultBackup (backup.example.com) on srv01.
No file-sharing service is approved. vps17.example.org is not known to IT.
Read against that list, the largest transfer, 20,027,665 bytes to 203.0.113.131, is srv01's nightly backup to an approved service. The next ones, about 4.2 MB each to 203.0.113.130, are the uploads to filedrop.example.net, which nothing approves. The SSH session to 203.0.113.140 is vps17.example.org, which IT does not know at all.
Direction is the first signal. Ordinary browsing receives far more than it sends; an upload sends far more than it receives, and these sent thousands of times what they received. That ratio is visible on every connection, encrypted or not, and it is the cheapest upload detector there is.
The destination is the second: a file-sharing service, unapproved. Size comes last, and only among the transfers nothing explains. In this window that order turns a list headed by an approved backup into a short list of two destinations, and both come from the same workstation within two minutes of the share read.
The firewall's view hides one thing the inside sensors restore: which workstation. Outside, every one of these connections comes from 198.51.100.10. The LAN sensor's connection log names ws45 for the uploads and the SSH session, and the time and byte counts match one for one.
The key log found on ws45 covers the uploads. The request that opened the upload, and the server's reply to it, are JSON that TShark decodes into fields:
$ tshark -r lan.pcap -o tls.keylog_file:keys/ws45-filedrop.keys \
-Y 'http.request.uri == "/api/v2/uploads"' -T fields -e json.member_with_value
name:q3-close.zip,size:12574161,parts:3
upload_id:u-18eb86f1005f,part_size:4194304
One ZIP, q3-close.zip, of 12,574,161 bytes, in three parts of up to 4 MiB each, matching the three large connections. The name and size are observed; the contents are not, because they are compressed and the key log gives only what the client sent over the wire.
Module 10 reads uploads and direction, cloud storage services and their APIs, and how much of an upload a key log can and cannot reveal.
A Channel With Unknown Cargo
The SSH session to vps17Two minutes after the upload began, ws45 opened an SSH session to vps17.example.org that lasted 101 seconds and sent 4,509,567 bytes while receiving 5,695. The handshake succeeded, as Zeek's SSH log records, and everything after it is encrypted with no key to recover it.
What the network can establish: an SSH session, its timing, its direction and its volume, to a server nobody in IT knows. What it cannot: what was carried. SSH can carry a shell, file transfers or forwarded ports, and the pack's lab built it as a tunnel; from the sensor, all of those look like an encrypted stream whose bytes mostly flow one way.
The session's shape still says something: it lasted well over a minute, it sent almost all of its bytes in one direction, and it followed an upload of a similar order of size. Those are reasons to ask the question, not answers to it. The SSH log adds the client and server software versions, and nothing else about the session's purpose.
Sorted by what kind of statement each one is, the case so far reads:
What the network can and cannot establish here
jdoe read 40 files from the finance share; ws45 uploaded a ZIP to an unapproved service; ws45 sent bytes over SSH to an unknown server
The upload carried data read from the share
What crossed the SSH session, and whether anything was opened elsewhere
That is the point Module 10 makes most firmly. Bytes are not information. The upload sent about 12.6 MB of ZIP; the share read was about 18.5 MB; the SSH session sent about 4.5 MB.
None of those numbers says what data left, how sensitive it was or whether it was complete, and the assessment that goes to whoever decides what happens next has to say so rather than turning the bytes into a claim.
The assessment therefore ends in a decision, not a verdict. The evidence supports escalation: an account with no finance role read the finance share, a ZIP went to an unapproved file-sharing service minutes later, and a channel to an unknown server followed.
Whether data was stolen, and which, is for the endpoint, the file-sharing provider and the people involved to settle. Module 10's assessment lesson writes that document, with each inference's confidence and each unknown's source.
What Modules 9 and 10 Build On It
Movement and exfiltration in depthModule 9 reads east-west traffic, authentication dependencies, and SMB, SSH, RDP and WinRM each in their own lesson, then reconstructs the path and hands over Case 4, legitimate administration to be told apart from movement.
Module 10 reads staging, uploads and direction, cloud storage, covert channels, volume, and the gap between bytes and information, then writes the assessment and hands over Case 5, an unusual cloud upload that supports escalation rather than a conclusion.
Modules 9 and 10, in order
The labs are the same windows this lesson read, with every sensor's logs, the host logs, path.py and the key logs. Nothing has to be captured again. Each module also brings its own case window, built around a different explanation: in Case 4 the explanation is legitimate administration, and in Case 5 it is a cloud upload that may or may not be what it looks like.
In both, the work is to test the innocent explanation properly before writing a conclusion, and to write down how it was tested, so that a reviewer can see the explanation was given a fair chance rather than dismissed because the pattern looked alarming.
The habits to carry into both: read internal movement by account and by session, not by source address alone, and follow each session into the host it reached; read outbound transfers against what is approved before reading their size; and write what the network observed, what it suggests and what it cannot reach as three separate things.
Both modules end on the same discipline. A movement case names the account, the hosts and the order, and states which steps are observed through a host log and which are inferred from timing.
An exfiltration case names what left by direction, destination and size, and states plainly that the bytes are not the data. Neither ends with a verdict the network cannot support. That is not caution for its own sake. An assessment that overclaims is the one that gets overturned when the endpoint or the provider reports, and the network evidence loses its credibility with it.
Practice
What left? the lab firewallThe prepared evidence below is the largest outbound connections in the Module 10 window, from the firewall's outside link, with the name each destination used. Read them against the approved services in the brief. Find the largest upload and decide whether it matters, then find the transfers nothing approves. Each answer comes with its reasoning, so check it against the rows.
The rows show the firewall's address as the source on every line, because that is all the outside link can see; the names come from the TLS and SSH logs for the same connections. Work through the brief's approved list first and mark each row as approved, not approved or unknown, then read the sizes only within the rows that are left.
If you administer a network, write down which outbound services each kind of host is expected to use. That list, more than any threshold, is what makes an upload readable when it happens. Keep it next to the sensor's logs, and update it whenever a new service is approved.
Movement inside a network is read by account and session: join each connection to the host log that names its account, follow sessions into the hosts they reached, and separate scheduled service activity from interactive steps. Exfiltration is read by direction and destination against what is approved, before size; and an assessment ends in a decision to escalate, with the unknowns stated, because bytes are not information.
The next lesson turns what these investigations found into detections that would catch it next time.
Versions this lesson relies on: Wireshark and TShark 4.6.9; Zeek 9.0.1 (LTS).