Latest / CyberCode Academy / Course 13 - Network Forensics | Episode 2: Architecture, Protocols (TCP/UDP), and Evidentiary Value
Transcript
- 0:00Speaker 1: Welcome back to the deep dive. You know, when we
- 0:02Speaker 1: talk about the Internet, it's so often described as the cloud.
- 0:05Speaker 1: It's this simple kind of ethereal concept. It really is,
- 0:08Speaker 1: but the reality is far more compelling. The Internet is
- 0:12Speaker 1: a massive, meticulously structured machine. It's a physical map of cables, routers, switches,
- 0:20Speaker 1: all speaking these very specific formalized languages scilicely.
- 0:23Speaker 2: And if you're learning how to secure systems or know
- 0:26Speaker 2: how to perform network forensics, you have to treat the
- 0:29Speaker 2: Internet not as a cloud, but as a defined geographic space.
- 0:32Speaker 1: Right.
- 0:33Speaker 2: Our mission today is to become well master navigators of
- 0:36Speaker 2: this digital geography. We are going to map out the
- 0:39Speaker 2: foundational architecture, defining the entry points, the identities, and the
- 0:43Speaker 2: traffic rules.
- 0:44Speaker 1: We want to give you a shortcut to understanding how
- 0:46Speaker 1: every single message you sent, whether it's an email or
- 0:49Speaker 1: just a web request, actually traverses this global system and crucially,
- 0:53Speaker 1: where it leaves a permanent trail of evidence. Yes, so
- 0:56Speaker 1: let's start with the geography itself. We have these zones
- 0:59Speaker 1: of connected that define the boundaries.
- 1:01Speaker 2: Yes, and these boundaries are everything when it comes to security.
- 1:06Speaker 2: We begin small with the land, the local area network.
- 1:09Speaker 1: So like my network at home or in the office.
- 1:11Speaker 2: Exactly the network contained inside a single facility. It's the
- 1:15Speaker 2: most protected space.
- 1:16Speaker 1: And when you start connecting those local networks across a
- 1:19Speaker 1: vast distances city to city or even continent to continent.
- 1:23Speaker 2: So that scales up immediately to the whan or wide
- 1:26Speaker 2: area network. This is really the backbone of the Internet.
- 1:28Speaker 2: You know, networks spread across large geographic eras.
- 1:31Speaker 1: I've also heard of things like can or Man. Yeah.
- 1:35Speaker 2: So, while some documents still define specific mid sized zones
- 1:38Speaker 2: like the campus area network or a metropolitanary network, those
- 1:41Speaker 2: are increasingly less critical than understanding the primary security.
- 1:45Speaker 1: Barrier, which brings us to I think the most vital
- 1:48Speaker 1: geographic concept for anyone interested in cybersecurity, the DMZ.
- 1:52Speaker 2: The demilitarized zone.
- 1:54Speaker 1: That name is no accident, not at all.
- 1:55Speaker 2: It describes its function perfectly. The DMZ is a critical
- 1:59Speaker 2: buffer zone. It sits strategically between your highly trusted internal
- 2:03Speaker 2: land and the well the completely untrusted public Internet, the WWW.
- 2:07Speaker 1: So if a company hosts its public website or its
- 2:09Speaker 1: email server, any service the public needs to access it
- 2:12Speaker 1: should live.
- 2:13Speaker 2: There right Absolutely, those servers are inherently exposed, and you
- 2:17Speaker 2: design that DMZ architecture so that if an external thread
- 2:20Speaker 2: actor successfully breaches one of them, they are still contained.
- 2:23Speaker 2: They're in the buffer.
- 2:24Speaker 1: They haven't immediately gained access to your protected internal corporate
- 2:28Speaker 1: data exactly. This sounds like a core forensic insight. Then,
- 2:31Speaker 1: if the DMZ is the first major internal target the
- 2:35Speaker 1: logs generated, there must be the goal standard for attribution,
- 2:40Speaker 1: even if the attacker gets.
- 2:41Speaker 2: Deeper, they are critical. Understanding this architecture is foundational because
- 2:45Speaker 2: if an attacker compromises a DMZ server, their goal is
- 2:48Speaker 2: to use that server as a pivot point to move
- 2:51Speaker 2: laterally to jump through a secondary firewall and access the
- 2:54Speaker 2: protected land, and every step of that process leaves evidence
- 2:58Speaker 2: in the DMZ.
- 2:59Speaker 1: Okay, So to me make that pivot, or even to
- 3:01Speaker 1: send the initial request, we need physical infrastructure. Let's break
- 3:05Speaker 1: down the anatomy of connection. What are the universal ingredients
- 3:08Speaker 1: of any network?
- 3:09Speaker 2: There are three core components, and it's essential to understand
- 3:12Speaker 2: them as you know physical things. First, you have the medium.
- 3:16Speaker 1: The path of data travels on right.
- 3:18Speaker 2: This is either physical like COKEX twisted pair or fiber
- 3:23Speaker 2: optic cables, or its atmospheric think Wi Fi, Bluetooth, infrared.
- 3:28Speaker 1: Okay medium first, what's second?
- 3:30Speaker 2: Second, we have the Network interface card or nice This
- 3:34Speaker 2: is the physical hardware built into your computer that translates
- 3:37Speaker 2: digital data into a signal that can actually travel across
- 3:40Speaker 2: that medium.
- 3:41Speaker 1: And finally, the devices themselves.
- 3:43Speaker 2: We call those the nodes. The node is simply any
- 3:46Speaker 2: device connected via NICEE a server, a laptop, a printer.
- 3:50Speaker 2: When we talk about securing a network, what we're really
- 3:52Speaker 2: talking about is securing these nodes and controlling the traffic
- 3:56Speaker 2: between them and for.
- 3:57Speaker 1: All these you know, disparate nodes and mediums to interact,
- 4:00Speaker 1: they have to follow a strict, standardized set of rules.
- 4:04Speaker 1: The protocols.
- 4:05Speaker 2: Yes, protocols are the standardized language. They define exactly how
- 4:08Speaker 2: systems communicate. Whether you have a decades old mainframe talking
- 4:11Speaker 2: to a modern Linux box.
- 4:12Speaker 1: It's a translation layer. It is.
- 4:15Speaker 2: This communication needs formal rules, which are all documented under
- 4:19Speaker 2: the RFC's the Requests for comments. They are like the
- 4:23Speaker 2: Internet's constitution.
- 4:25Speaker 1: Now that we have the architecture and the rules, how
- 4:28Speaker 1: do we establish digital identity? You mentioned nos are critical,
- 4:32Speaker 1: but how does the network know which node you are
- 4:34Speaker 1: and where you're going?
- 4:35Speaker 2: So this brings us into the realm. Of the layered
- 4:37Speaker 2: network model, which is necessary to understand this distinction. We
- 4:41Speaker 2: have the MS address, which functions that layer two, the
- 4:44Speaker 2: data link layer. Okay, it is a lower level address.
- 4:47Speaker 2: It's usually permanent, physically burned into the NIC at the factory.
- 4:51Speaker 2: Think of it as the device's unchangeable physical serial number.
- 4:55Speaker 1: But that physical serial number isn't what the public Internet
- 4:58Speaker 1: uses to route traffic. Is it? That seems too local?
- 5:01Speaker 2: No, you're right, because traffic needs a routable logical address.
- 5:05Speaker 2: That's the IP address, which functions at layer three, the
- 5:07Speaker 2: network layer.
- 5:08Speaker 1: Logical, meaning it can change exactly.
- 5:10Speaker 2: It can be dynamically assigned, it changes frequently or statically assigned,
- 5:14Speaker 2: depending on the network configuration. The IP is what determines
- 5:18Speaker 2: the location within the global network.
- 5:20Speaker 1: And we all know about the historical headache here we
- 5:23Speaker 1: ran out a room that pushed us from IPv four
- 5:25Speaker 1: to the massive expansion of IPv six.
- 5:28Speaker 2: Right. IPv four uses thirty two bits, which we see
- 5:31Speaker 2: as four sets of numbers separated by dots. The four octets.
- 5:34Speaker 2: IV six was this dramatic, necessary expansion to one hundred
- 5:39Speaker 2: and twenty eight bits. It's a practically inexhaustible address space.
- 5:43Speaker 1: And this is where it gets really interesting for security professionals. Right,
- 5:45Speaker 1: the underlying difference and security between the two.
- 5:47Speaker 2: It is fundamental. The key security upgrade is that ip SEC,
- 5:51Speaker 2: the Internet Protocol Security Suite, is built directly into IPv six.
- 5:54Speaker 1: It's required, but for IPv four it's just an add on.
- 5:57Speaker 2: It's an optional add on that network adds have to
- 6:00Speaker 2: manually configure, which means most networks, well, they just don't
- 6:04Speaker 2: use it natively. In IPv six, you have native encryption
- 6:07Speaker 2: and authentication capabilities baked right in. It dramatically improves security
- 6:12Speaker 2: at the network layer from the start.
- 6:13Speaker 1: That's a massive shift in trust. Yeah. Now let's briefly
- 6:16Speaker 1: touch on address classification. This still matters when you're looking
- 6:18Speaker 1: at old network logs. I assume it does.
- 6:21Speaker 2: You don't need to memorize every range, but know the
- 6:23Speaker 2: categories class A, B and C define the available address space.
- 6:29Speaker 2: The important security note is that one twenty seven is
- 6:31Speaker 2: reserved for loopbeck testing, basically testing a device's own communication capabilities.
- 6:37Speaker 1: Okay, so we've mentioned the difference be goe a private
- 6:38Speaker 1: IP and a public IP. How does the rest of
- 6:41Speaker 1: the world see me if I'm using a private IP
- 6:43Speaker 1: that isn't ratable across the public Internet.
- 6:45Speaker 2: This is handled by NAT network address translation, and it's
- 6:49Speaker 2: a cornerstone of modern networking. Okay, the best analogy is
- 6:52Speaker 2: a phone system. Your entire office building might share one
- 6:56Speaker 2: public telephone number. That number comes into the central exchange
- 7:00Speaker 2: your router. That exchange then routes the call to your
- 7:03Speaker 2: specific internal extension.
- 7:04Speaker 1: So the router is translating all those internal extension numbers,
- 7:07Speaker 1: the private ips, into that single public IP address when
- 7:11Speaker 1: they talk to the outside world.
- 7:12Speaker 2: Exactly. That allows one public IP to serve as potentially
- 7:16Speaker 2: hundreds of private ips behind a router. It says, precious
- 7:20Speaker 2: IPv four space, and it adds a layer of security
- 7:22Speaker 2: by hiding the internal structure.
- 7:24Speaker 1: Which is why forensically tracing an attack back to an
- 7:28Speaker 1: exact device behind a NAT can be so challenging.
- 7:31Speaker 2: It can be yes without cooperation from the local network owner.
- 7:34Speaker 1: And what about the subnet mask. That's what defines the
- 7:37Speaker 1: boundary of that internal network, right.
- 7:39Speaker 2: It does, but it does so mathematically. The subnet mask
- 7:42Speaker 2: is a thirty two bit value that essentially works like
- 7:46Speaker 2: a dividing line. It separates the IP address into two parts,
- 7:50Speaker 2: the network ID and the host ID, so.
- 7:53Speaker 1: It tells the computer this part of the address defines
- 7:55Speaker 1: our local neighborhood, and this other part is your unique
- 7:58Speaker 1: house number.
- 8:00Speaker 2: It is the boundary definition. If you're communicating with an
- 8:03Speaker 2: IP address that shares the same network ID, the traffic
- 8:06Speaker 2: stays local. If the network idea is different, the data
- 8:09Speaker 2: has to go to the router to be sent out
- 8:11Speaker 2: to the world.
- 8:11Speaker 1: That's the identity sorted. Once we know the source and destination,
- 8:15Speaker 1: the data needs a structured way to travel. Let's move
- 8:17Speaker 1: to the highway system itself.
- 8:19Speaker 2: Ports right, Ports are best thought of not as pipes,
- 8:22Speaker 2: but as lanes on a massive digital highway. And that
- 8:26Speaker 2: highway has sixty five thousan five hundred and thirty five
- 8:29Speaker 2: possible lanes available.
- 8:30Speaker 1: That's an immense number of lanes. Are they all used equally?
- 8:33Speaker 2: No, not at all. Specific traffic types drive and reserve lanes.
- 8:37Speaker 2: For instance, secured web traffic HTTTS always travels in lane
- 8:41Speaker 2: four to forty three. FDP control traffic is reserved for
- 8:44Speaker 2: lane twenty one. These are the well known ports one
- 8:47Speaker 2: through ten.
- 8:48Speaker 1: Twenty four reserved for common core services.
- 8:50Speaker 2: Yes, and if your computer needs to initiate an outbound
- 8:53Speaker 2: connection to a web server. What kind of port does
- 8:56Speaker 2: it use?
- 8:56Speaker 1: Uh? Something else? Right?
- 8:57Speaker 2: It generally uses an ephemeral port, typically anything above ten
- 9:01Speaker 2: twenty four. These are dynamically assigned by the operating system
- 9:04Speaker 2: for temporary connections. In either case, services or demons on
- 9:08Speaker 2: Linux systems actively bind or attached to these ports, waiting
- 9:12Speaker 2: to receive or send data.
- 9:13Speaker 1: When that data travels down the lanes, it's packaged up.
- 9:17Speaker 1: We use the analogy of the trailer carrying the data payload,
- 9:20Speaker 1: So the TCP header is the truck cab pulling it.
- 9:22Speaker 2: A great way to think about it. The cab contains
- 9:24Speaker 2: everything needed for transport and coordination at layer four. This
- 9:28Speaker 2: includes the source and destination ports, which we just defined. Crucially,
- 9:31Speaker 2: it also includes sequence numbers and acknowledgment numbers, which.
- 9:35Speaker 1: Are necessary for guaranteeing delivery and order.
- 9:37Speaker 2: Yes, but notice what is not in that header The
- 9:40Speaker 2: IP addresses, Right, The IPA addresses aren't there. They're handled
- 9:44Speaker 2: at layer three by the IP protocol itself. The header's
- 9:48Speaker 2: job is just to ensure the integrity of the data
- 9:50Speaker 2: stream between the two applications, and.
- 9:52Speaker 1: The most dynamic part of that header are the flags.
- 9:55Speaker 1: These are like the hand signals the truck driver uses
- 9:57Speaker 1: to signal.
- 9:58Speaker 2: Intent exactly they govern the connection. Syn Synchronize is the
- 10:03Speaker 2: signal to start a connection. ACK acknowledge confirms receipt s.
- 10:07Speaker 2: Unfinished is the polite signal to close a connection.
- 10:10Speaker 1: But the security team is usually most interested in the
- 10:13Speaker 1: less polite signals.
- 10:14Speaker 2: Absolutely the RST reset flag is the abrupt ungraceful close.
- 10:18Speaker 2: It's like hanging up the phone without warning. If you
- 10:21Speaker 2: see a flood of RST packets, it can often indicate
- 10:23Speaker 2: an attacker trying to crash a.
- 10:25Speaker 1: Service, or a scanner try to be sneaky right.
- 10:28Speaker 2: And we also have the urgent pointer, which tells the
- 10:30Speaker 2: receiver that a certain number of subsequent packets are priority data.
- 10:34Speaker 1: That distinction between a polite connection and an abrupt close
- 10:38Speaker 1: leads us right to the difference between the two main
- 10:40Speaker 1: highway systems. Yeah TCP versus UDP.
- 10:43Speaker 2: This is really reliability versus speed TCP. The Transmission Control
- 10:47Speaker 2: Protocol is reliable and connection oriented. It requires a formal.
- 10:50Speaker 1: Introduction the three way handshake.
- 10:52Speaker 2: The three way handshake syn to request swyanak to accept,
- 10:56Speaker 2: an acknowledge, and a final ACK to confirm the connection
- 10:59Speaker 2: is established.
- 11:00Speaker 1: This always happens and the close is just as polite,
- 11:03Speaker 1: involving four packets in the four way combo.
- 11:06Speaker 2: Right, the polite shutdown requires both sides to agree. The
- 11:09Speaker 2: sender sends a FINAC, the receiver acknowledges it, Then the
- 11:12Speaker 2: receiver sends its own FINAC, and the center acknowledges that
- 11:15Speaker 2: final close.
- 11:16Speaker 1: Wow. So that entire session just to start and politely
- 11:20Speaker 1: close requires seven packets of overheads.
- 11:23Speaker 2: Seven packets three to start, four to close. That overhead
- 11:26Speaker 2: is the price of guaranteed reliability.
- 11:27Speaker 1: That's a lot of overhead. So what about the unreliable
- 11:30Speaker 1: brother UDP.
- 11:31Speaker 2: UDP or user datagram protocol is connectionless, It has no
- 11:35Speaker 2: handshake whatsoever. It is fire and forget. You send the
- 11:38Speaker 2: packet in well, you hope it gets there.
- 11:40Speaker 1: Why would anyone use an unreliable protocol for anything important?
- 11:45Speaker 2: Because for many modern applications, speed absolutely trump's reliability. Think
- 11:50Speaker 2: about streaming video Netflix live feeds. While your initial login
- 11:55Speaker 2: might happen over a secure PCP connection, the actual video
- 11:59Speaker 2: data is broke get into millions of tiny bursts, often
- 12:02Speaker 2: sent rapidly over UDP.
- 12:03Speaker 1: Ah. So if you drop a packet of video data,
- 12:06Speaker 1: the stream just jitters for a millisecond.
- 12:09Speaker 2: It just jitters slightly. It doesn't interrupt the whole session
- 12:11Speaker 2: to re request that one tiny piece of data, which
- 12:14Speaker 2: would be a far worse experience. So UDP sacrifices perfection
- 12:18Speaker 2: for a continuous, high speed flow.
- 12:20Speaker 1: Which is exactly what streaming needs. And often that data
- 12:22Speaker 1: isn't even coming from Netflix dot Com. It's coming from
- 12:25Speaker 1: some giant cloud provider exactly.
- 12:27Speaker 2: They're utilizing UDP to maximize speed and throughput.
- 12:30Speaker 1: Okay, we need to quickly cover the supporting cast of
- 12:33Speaker 1: protocols that make this entire system legible. First, ICMP.
- 12:37Speaker 2: ICMP, the Internet Control Message Protocol is vital for air
- 12:41Speaker 2: control and diagnostics. Think of the common pin command. It
- 12:44Speaker 2: helps find the best route across the network and reports
- 12:47Speaker 2: back when things go wrong.
- 12:48Speaker 1: And two more pillars DSHP and DNS.
- 12:52Speaker 2: DHP Dynamic Host Configuration Protocol is the service that automatically
- 12:56Speaker 2: assigns and configures your IP address and everything else every
- 12:59Speaker 2: time you connect, and DNS the Domain Name system is
- 13:03Speaker 2: the crucial address book. It translates human friendly names like
- 13:06Speaker 2: website URLs into those logical IP addresses that routers actually need.
- 13:12Speaker 1: Okay, we've mapped the geography define the language, analyze the
- 13:15Speaker 1: traffic flow. Let's bring it all together for the cybersecurity context.
- 13:19Speaker 1: How does knowing this architecture give us the edge when
- 13:22Speaker 1: tracing a thread actor?
- 13:24Speaker 2: It tells us exactly where the evidence resides. When we
- 13:26Speaker 2: visualize that attack on the DMZ from the Internet through
- 13:29Speaker 2: the perimeter, into the buffer and then pivoting inward, we
- 13:32Speaker 2: are looking at a chain of eight distinct points that
- 13:35Speaker 2: generate evidentiary logs.
- 13:37Speaker 1: It's a huge trail of breadcrumbs, but I'm guessing the
- 13:40Speaker 1: quality of those breadcrumbs varies absolutely.
- 13:42Speaker 2: Think about the difference between the perimeter router logs and
- 13:45Speaker 2: the logs on the compromised DMZ server itself. The router
- 13:48Speaker 2: gives us the source IP and connection data, syn packets
- 13:52Speaker 2: ports used, which is valuable.
- 13:54Speaker 1: That's just the start.
- 13:55Speaker 2: But the logs on the compromised DMZ server tell us
- 13:58Speaker 2: what the attacker did after gaining entry, the commands they executed,
- 14:01Speaker 2: the files they access, the evidence of the pivot attempt.
- 14:05Speaker 2: That server side evidence is often far more rich for
- 14:07Speaker 2: forensic attribution.
- 14:09Speaker 1: So understanding those flags, the difference between TCP and UDP,
- 14:13Speaker 1: the public and private EPs, that helps an analyst prioritize
- 14:17Speaker 1: which logs to pull first. That's the power of this
- 14:20Speaker 1: deep dive.
- 14:20Speaker 2: It is every component we discussed. MA addresses, IP addresses
- 14:25Speaker 2: the seven packets of TCP. Overhead is logged somewhere within
- 14:28Speaker 2: those eight points, assuming logging is enabled correctly.
- 14:31Speaker 1: We covered a tremendous amount of grand today defining the zones,
- 14:34Speaker 1: the identity layers, and the rules that govern all data transmission.
- 14:37Speaker 2: So if we accept that the reliable connection of TCP
- 14:40Speaker 2: is modeled on polite human dialogue, you know, three steps
- 14:43Speaker 2: to start, four steps to politely finish. What does the connectionless,
- 14:47Speaker 2: fire and forget nature of UDP tell us about the
- 14:50Speaker 2: priority of modern digital communication. Does the relentless pursuit of
- 14:54Speaker 2: speed and uninterrupted flow imply that instant delivery is now
- 14:57Speaker 2: inherently more valuable than guaranteed perfection.
- 15:01Speaker 1: That's a provocative question to chew on and to reinforce
- 15:04Speaker 1: what we've learned about the anatomy of connection. Here is
- 15:06Speaker 1: a final exercise for you. Think about the three main
- 15:09Speaker 1: physical components of a network, the medium, the nic in
- 15:13Speaker 1: the node. If you are setting up a brand new
- 15:16Speaker 1: network today, why is fiber optic cable a type of medium?
- 15:20Speaker 1: Generally considered a much more secure choice than standard Ethernet
- 15:23Speaker 1: or twisted pair for protecting data transmission inside a building.
- 15:27Speaker 1: Will leave you tom all over the physical interception methods
- 15:30Speaker 1: that would make one medium less secure than the other