In this section

0.2 One Person, Many Names

Module 0

Introduction

An action in a modern network leaves records in more than one place. The machine that started it records something, the server it reached records something else, and the network in between can record the packets. Each of those systems names the person and the machine in its own way, and each keeps its own clock.

This lesson follows one action through three records and finds the same person and machine under five different names, at four different times. The records are real: a recording from a public research dataset, made in a test Windows domain called theshire.local, in which a program on a workstation searched the domain's directory. The program was a red-team tool, but this lesson isn't about what it did. It's about how one connection looks from three sides. Module 2 does this for whole cases, so the habits start here.

You don't need to install anything to follow it: every record is shown on the page. If you'd like to open the capture yourself, the Practice section at the end says where it's published and under what license, so you can download it and follow along in Wireshark.

1

One Action, Three Systems

A workstation asks the domain controller a question, and three records are written

On 22 September 2020, on a workstation called WORKSTATION5, a program running as the user pgustavo connected to the domain controller, MORDORDC, and searched the directory. Three systems recorded that moment, and each recorded it differently.

WORKSTATION5the user's machineThe networkbetween themMORDORDCdomain controllerRecord left behindconnect to port 389 from port 623201Sysmon event 3the packets cross the wire2the capturethe account logs on (Kerberos)3Security event 4624a directory search request4the capture

One action, three systems, and the record each one keeps

The workstation ran Sysmon, Microsoft's free system monitor, which recorded the network connection. Microsoft's documentation says event 3 logs TCP and UDP connections, links each one to the process that made it, and records host names, addresses and ports. It also notes the event is off by default, so a workstation records connections only if someone configured it to.

The domain controller recorded a logon. When a program on another machine authenticates to a server, the server writes event 4624. Microsoft's reference is clear that it's written on the computer that was accessed, so this record lives on the controller, not the workstation.

And a capture recorded the packets: the connection opening, the search request and the reply. The research dataset includes it alongside the event logs, which is unusual and very useful. Most real investigations have the event logs and no capture, or a flow summary at best.

The records also lived in different places before the dataset gathered them. The Sysmon event was on the workstation, the 4624 on the controller, and the packets on a sensor watching the network. In a real organization, getting all three can mean three different teams and three different tools, and some may not exist at all. Knowing which system would have recorded what is the first step in asking for it.

Three records, one action. None of them uses the same name for everything, and none of them shows the whole action alone. The workstation knows which program connected. The controller knows the logon succeeded. The capture knows exactly what was asked. Put together, they describe one action fully.

This is the normal shape of evidence. An investigation rarely finds one record that answers its question. It finds several partial ones, each from a system that saw only its part, and the analyst's work is joining them correctly. Joining them correctly depends on two things this lesson covers: recognizing the same person and machine under different names, and lining the records up on one clock.

2

The Workstation's Record

Sysmon names the person, the program, the ports and the machine

Here's the workstation's Sysmon event, field by field:

The workstation's record: Sysmon event 3UtcTime2020-09-22 18:10:22.516HostnameWORKSTATION5.theshire.local1UserTHESHIRE\pgustavo2ImageC:\Users\pgustavo\Desktop\GruntHTTP.e…SourceIp172.18.39.53SourcePort62320DestinationIp172.18.38.5DestinationPort3891The person, as DOMAIN\user2The program that made theconnection3The port the other systemsalso record

Sysmon names the person by domain and user, and the machine by its full host name

Sysmon names the person as THESHIRE\pgustavo: the domain, THESHIRE, a backslash and the user name. That's the form Windows uses for domain accounts on the machine itself. It names the machine by its full host name, WORKSTATION5.theshire.local. It names the program by its path on disk. And it records both ends of the connection: from 172.18.39.5 port 62320 to 172.18.38.5 port 389, the directory service's port.

Notice the source port. When a machine opens a connection, it picks a port number for its own end, usually one it isn't using for anything else at that moment. That number is the same in every record of the connection, which makes it one of the most useful values in this lesson.

The time is in a field called UtcTime: 2020-09-22 18:10:22.516. Microsoft's documentation states that Sysmon's timestamps are in UTC, which is the label in the field name. Not every Windows record is so obliging, as the next section shows.

What the workstation's record doesn't show is whether the connection achieved anything. It records that a connection was made. Whether the server accepted the logon, and what the program asked, are in the other two records.

The record also carries a ProcessGuid, which Sysmon assigns to every process it sees. Sysmon's documentation describes it as unique across a domain, so it can tie this connection to the event that recorded the process starting, even if Windows later reuses the process ID. Following an action from a connection back to the program that made it, and from the program to whatever started it, is a large part of Module 5.

One more detail is worth noticing: the event names its own computer in the Hostname field, as a full domain name. A different collection could have recorded it as WORKSTATION5 alone, or by a device ID. The machine is the same. The name is whatever that pipeline wrote.

3

The Domain Controller's Record

Event 4624: the account, its SID, the address and the port it came from

On the domain controller, the same moment produced a logon event. Here it is in Event Viewer's layout:

Event 4624, Microsoft-Windows-Security-Auditing
GeneralDetails
An account was successfully logged on.
Subject:
	Security ID:		S-1-0-0
	Account Name:		-
	Account Domain:		-
	Logon ID:		0x0
Logon Information:
	Logon Type:		3
	Restricted Admin Mode:	-
	Virtual Account:		No
	Elevated Token:		Yes
Impersonation Level:		Impersonation
New Logon:
	Security ID:		S-1-5-21-4228717743-1032521047-1810997296-1104
	Account Name:		pgustavo
	Account Domain:		THESHIRE.LOCAL
	Logon ID:		0x7ADD6AC
	Linked Logon ID:		0x0
	Network Account Name:	-
	Network Account Domain:	-
	Logon GUID:		{124e2e6a-8da2-326e-482c-a8c6bf2462bc}
Process Information:
	Process ID:		0x0
	Process Name:		-
Network Information:
	Workstation Name:	-
	Source Network Address:	172.18.39.5
	Source Port:		62320
Detailed Authentication Information:
	Logon Process:		Kerberos
	Authentication Package:	Kerberos
	Transited Services:	-
	Package Name (NTLM only):	-
	Key Length:		0
Log Name:Security
Source:Microsoft-Windows-Security-Auditing
Logged:2020-09-22 14:10:21
Event ID:4624
Task Category:Logon
Level:Information
Keywords:Audit Success
User:N/A
Computer:MORDORDC.theshire.local
OpCode:Info

The domain controller's record, in Event Viewer's layout; the message as recorded, blank lines removed, explanatory text after it cut

The controller names the person differently. Under New Logon, the account name is pgustavo and the account domain is THESHIRE.LOCAL, the full domain name rather than THESHIRE. Microsoft's reference notes that this field's format varies, from a short NetBIOS name to a full domain name to a computer name for local accounts. And it names the account a third way: by its security identifier, S-1-5-21-4228717743-1032521047-1810997296-1104, a value Windows assigns once and never reuses.

The logon type is 3, a network logon: a user or computer logged on to this computer from the network. The source network address is 172.18.39.5 and the source port is 62320. That's the workstation's address and the same port Sysmon recorded. The workstation's name doesn't appear. Microsoft's reference explains why: network logons with Kerberos often carry no workstation name, which is what this one used.

The time is different too. Event Viewer's Logged field reads 2020-09-22 14:10:21, with no time zone shown. Event Viewer displays times in the viewing machine's own zone, and this collection recorded the controller's local time, four hours behind UTC in September in the lab's time zone. The same moment is 18:10:21 in UTC. Nothing in the field says so: you find out by comparing it with a record whose clock you know, which section 6 does.

The Logon ID, 0x7add6ac, is worth noting. Microsoft's reference says it ties this event to later events from the same logon session on the same controller, which is how you'd follow what the session did next.

Notice also what the controller can't tell you. It doesn't know which program on the workstation asked, or which person was at the keyboard. It knows an account authenticated from an address. That's often all an authentication record can say, and it's why the workstation's record matters: it names the program, and through the program, eventually, the chain of events that started it.

4

The Network's Record

The packets: who spoke to whom, on which ports, and what was asked

The capture shows the same connection from the wire. Filtering on the source port shows just this conversation:

Apply a display filtertcp.port==62320
No.TimeSourceDestinationProtocolLengthInfo
13047.942833172.18.39.5172.18.38.5TCP6662320 → 389 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 WS=256 SACK_PERM
13147.943734172.18.38.5172.18.39.5TCP66389 → 62320 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=1418 WS=256 SACK_PERM
13247.943806172.18.39.5172.18.38.5TCP5462320 → 389 [ACK] Seq=1 Ack=1 Win=524544 Len=0
13347.944446172.18.39.5172.18.38.5LDAP404searchRequest(1) "<ROOT>" baseObject
13447.945092172.18.38.5172.18.39.5TCP1472389 → 62320 [ACK] Seq=1 Ack=351 Win=4197120 Len=1418 [TCP segment of a reassembled PDU]
13547.945093172.18.38.5172.18.39.5LDAP1389searchResEntry(1) "<ROOT>" | searchResDone(1) success [1 result]
13647.945126172.18.39.5172.18.38.5TCP5462320 → 389 [ACK] Seq=351 Ack=2754 Win=524544 Len=0
›Frame 133: 404 bytes on wire (3232 bits), 404 bytes captured (3232 bits)
›Ethernet II, Src: Microsoft_54:2f:ab (00:0d:3a:54:2f:ab), Dst: 12:34:56:78:9a:bc (12:34:56:78:9a:bc)
›Internet Protocol Version 4, Src: 172.18.39.5, Dst: 172.18.38.5
›Transmission Control Protocol, Src Port: 62320, Dst Port: 389, Seq: 1, Ack: 1, Len: 350
▾Lightweight Directory Access Protocol
›LDAPMessage searchRequest(1) "<ROOT>" baseObject
Packets: 7 shown

The same connection in the capture, read by tshark; the search request selected

The first three packets are the connection opening: a SYN from the workstation, the controller's SYN-ACK, and an ACK. Then the workstation sends a search request, and the controller answers. The selected packet's detail shows the protocol layers, from the Ethernet frame to the directory query inside it.

The network names things by address and port only. There's no user and no host name in a packet header. The workstation is 172.18.39.5 and the controller is 172.18.38.5. The conversation is identified by its two addresses and two ports, and the workstation's port, 62320, is the one both event logs recorded.

The capture also knows something neither event log does: exactly what was asked. The search request is visible because this protocol wasn't encrypted. On an encrypted connection, as most traffic now is, the capture would show the conversation's shape and size, and not its content. Module 7 deals with that difference at length.

Captures are the most detailed record of the three and the least common. Few organizations capture all traffic, and those that do keep it for days rather than months. More often you'll have flow records, which keep the addresses, ports, times and sizes of each conversation without the content. Lesson 0.7 compares the two directly, using this same capture.

Notice that the times in this list are relative: seconds since the capture started. They're convenient for reading a conversation and useless for joining it to other records, which need absolute times. Section 6 asks tshark for those.

Wireshark's own display can mislead in the same way as a portal. Its default time column is relative, and when it shows absolute times it uses the viewing machine's time zone unless told otherwise. The capture file stores times in UTC. As with the sign-in pane in lesson 0.1, read the stored value, or check which zone the screen is using.

5

Five Names, One Person and One Machine

Recognizing the same thing under different names, and the value that proves it
ONE ACTION, AS THREE SYSTEMS NAME THE PERSON AND THE MACHINETHESHIRE\pgustavoSysmon event 3: the userpgustavo, THESHIRE.LOCAL4624 on MORDORDC: the accountS-1-5-21-...-11044624: the security identifierWORKSTATION5Sysmon: the machine by name172.18.39.54624 and the capture: by addressport 62320all three: the joinpgustavo onWORKSTATION5

Five names for one action's person and machine around the action they share, and the port that appears in all three records

Across three records, the person and machine have appeared under five names, and the figure puts them around the one action they share. The sixth spoke, the source port, is the value that appears in all three records.

The account appears as THESHIRE\pgustavo on the workstation, as pgustavo in THESHIRE.LOCAL on the controller, and as a security identifier. The machine appears as WORKSTATION5.theshire.local in Sysmon and as 172.18.39.5 on the controller and the wire. None of these is wrong. Each is the form that system uses.

Names alone are a weak join. The user name pgustavo appears in both event logs, but a user can be logged on to several machines at once, and two people can share a name across two domains. The address is weaker still: it belongs to whichever machine holds it at that moment, and addresses are reassigned. What makes these three records one action is the combination: the same source address, the same source port and the same destination, within the same second.

The port is the key. A source port is chosen for one connection and released when it closes. Two records that agree on address and port within a second or two almost certainly describe the same connection. That's a much stronger claim than "the same user name appears in both logs", and it's the kind of join Module 2 teaches you to look for.

Ports have a limit as a key, and it's worth knowing. Over minutes and hours, a machine reuses source port numbers, so the same address and port can describe two different connections an hour apart. The join holds because the times agree as well. Address, port and time together are the key, and dropping any one of them weakens it.

The security identifier is the strongest name for the account. It's issued once and never reused, even if the account is renamed. Where a record carries it, it's the value to follow. Where a record carries only a name, note that you joined on a name, and how sure that makes you.

The same pattern appears in cloud records, with different names. Lesson 0.1 showed a sign-in naming an account by its sign-in name and its object ID. Lesson 0.6 shows mail and audit records naming the same account in still other ways. The habit is the same everywhere: list the names each record uses, and find the value they share.

Write the mapping down as soon as you find it. A short list at the top of your case notes, pairing each name with the system that uses it, saves you rebuilding it every time a new record type appears. In Module 2's practical, that list is half the deliverable.

6

Four Clocks

What time each record means, and putting them on one axis

Every record has a time, and each means something slightly different. Asked for the capture's own times in UTC, tshark gives the first packet of the connection:

$ tshark -r ldap-search.cap \
    -Y "tcp.port==62320 && tcp.flags.syn==1 && tcp.flags.ack==0" -t ud -T fields \
    -e frame.number -e _ws.col.Time -e ip.src -e tcp.srcport -e ip.dst \
    -e tcp.dstport
130	2020-09-22 18:10:21.735668	172.18.39.5	62320	172.18.38.5	389

The first packet left the workstation at 18:10:21.735 UTC. The controller's logon is recorded at 14:10:21 in its local time, which is 18:10:21 in UTC. Sysmon's UtcTime is 18:10:22.516, under a second after the packet. And the collector that gathered the logs stamped each event when it arrived, at 18:10:23.084 for the controller's event and 18:10:24.101 for Sysmon's.

Capturefirst packetMORDORDC4624 EventTime + 4hWORKSTATION5Sysmon UtcTimeCollectorwhen it arrived18:10:2018:10:2118:10:2218:10:2318:10:2418:10:25UTCSYN 18:10:21.736logon 18:10:21connect 18:10:22.516DC event 18:10:23.084Sysmon 18:10:24.101

One connection on four clocks, all on one UTC axis

On one UTC axis, the four times fall within three seconds of each other, and the order makes sense once you know what each clock means. The packet is the action. The logon is the controller's record of handling it. Sysmon's time is when Sysmon logged the connection, a fraction of a second later, by the workstation's clock. And the collector's times are delivery times, which say when the records reached the log store, not when anything happened.

Two lessons follow. First, convert everything to UTC before comparing, and write down what each source's time means. Second, expect small disagreements between machines. Clocks drift, systems log at different stages of an action, and collectors add delay. A difference of a second or two is normal. A difference of an hour usually means a time zone was missed, as it would have been here if the controller's local time had been read as UTC.

Recording the clock as well as the time is a small habit with large effects. A timeline built from records whose clocks were assumed rather than checked can put an effect before its cause, and once that's in a report it's hard to undo.

This recording happens to be well behaved: the machines' clocks agree within a second, and the only trap is the controller's local time. Real environments are often messier. A workstation that missed its time sync for a week, a firewall set to local time and a cloud service in UTC can disagree by minutes or hours. Module 2 teaches how to measure the offset between sources, using events that both record, rather than assuming they agree.

7

When an Assistant Joins the Records

Same account, same person, same computer: three claims, one supported

Assistants are often asked to join records like these, and they're good at spotting that two records mention the same name. Here's one asked whether the workstation's user and the controller's logon are the same person.

AI assistantNew chat

In these logs, pgustavo appears on WORKSTATION5 and in a logon to the domain controller from 172.18.39.5. Is that the same person?

Yes. THESHIRE\pgustavo on WORKSTATION5 and pgustavo logging on from 172.18.39.5 are the same person: 172.18.39.5 is pgustavo's computer, WORKSTATION5.

Reply to AI assistant...

Check before you use it

Two claims go too far. The records show the same account, not necessarily the same person. And 172.18.39.5 is the address WORKSTATION5 had at that moment, not "pgustavo's computer": addresses are reassigned, and other accounts can use the same machine. What ties these two records together is the shared source port, 62320, at the same second.

An illustrative exchange, written for this lesson: an assistant you ask will word it differently.

The answer joins on the name and then says more than the name supports. Same account, yes. Same person is an inference, because the records show an account, not who was using it. And "172.18.39.5 is pgustavo's computer" turns an address held by a machine at one moment into a permanent fact about a person.

The assistant also missed the strongest evidence. The records agree on the source port, 62320, at the same second. That's what makes them one connection, and it's the join a reviewer would want to see. An answer that rests on the user name alone is weaker than the records allow, even where its conclusion happens to be right.

So when an assistant joins records for you, ask what it joined on. If the answer is a name, look for a better key: an identifier, a port, a session ID, a process GUID. If there isn't one, say in your notes that the join rests on a name, and say how sure that makes you.

Assistants are useful for the conversion work, too. Asked to convert a list of times to UTC, given each source's time zone, they're quick and usually right. Check the zone you gave them, because that's where the error will be.

The deeper habit is the one this module keeps returning to: a claim is only as strong as the field behind it. An assistant joining records on names produces fluent sentences that sound like evidence. Your job is to know which field each sentence rests on, and to choose the strongest field the records offer.

When you write up a join like this one, the sentence to aim for names the value. "The workstation's Sysmon event and the controller's 4624 describe the same connection: both record source address 172.18.39.5 and port 62320 at 18:10:21 to 18:10:22 UTC." That's specific, checkable and no stronger than the records.

Practice

Do

Practice

Map one action across three records
the three records

Use the three records in this lesson, which are printed in full on the page.

Work on paper or in a text file, whichever you'll actually keep. The point is to practice the mapping by hand once, so you know what to look for when the records are many and the tools do the joining for you.

Do this Map one action across three records
  1. List the names. From sections 2 to 4, write every name each record uses for the person and the machine.
  2. Find the join. Write the value that ties the three records to one connection, and say why a name alone would not.
  3. Line up the times. Convert each record's time to UTC and put them in order, noting which clock each one used.
  4. State what is shown. Write one sentence that says what the three records together show, and one that says what they do not.
You will have an identifier map and a UTC timeline for one action, the two things Module 2 builds for whole cases.

If you have Wireshark installed, you can repeat section 4 yourself. The capture and the event logs are published by the OTRF Security-Datasets project on GitHub under the MIT License, in its atomic Windows discovery datasets.

The next lesson moves from reading single records to finding the ones you need among thousands, using several different tools on the same data.