Latest / CyberCode Academy / Course 13 - Network Forensics | Episode 3: Network Forensics, Security Tools, and Defensive Architecture
Transcript
- 0:00Speaker 1: Imagine this. It's three in the morning and a red
- 0:03Speaker 1: light starts flashing on your.
- 0:04Speaker 2: Network monitor the worst time.
- 0:06Speaker 1: Always Maybe it's a huge weird spike in outbound traffic
- 0:11Speaker 1: or a server log that just you screams, I'm an intruder.
- 0:16Speaker 1: So once it's been inside your system and right there,
- 0:19Speaker 1: the mission flips. It's not about prevention anymore. It's about triage.
- 0:24Speaker 1: It's about investigation.
- 0:26Speaker 2: It's pure detective work.
- 0:27Speaker 1: So how do you find them, what did they take?
- 0:30Speaker 1: And I think most importantly, how do you make absolutely
- 0:34Speaker 1: sure they can never ever get back in.
- 0:36Speaker 2: That's the moment where yeah, all the theory goes out
- 0:39Speaker 2: the window and it becomes this high stakes digital investigation.
- 0:42Speaker 1: And that's what we're digging into today.
- 0:43Speaker 2: Yep, we're doing a deep dive into that detective process
- 0:46Speaker 2: network forensics, and then we'll look at, you know, the
- 0:49Speaker 2: digital fortresses we build, the tools and the architectures that
- 0:52Speaker 2: are designed to protect our most critical assets.
- 0:55Speaker 1: So we're not just say, pulling the hard drive from
- 0:57Speaker 1: a compromised computer, We're looking at the movement itself.
- 1:00Speaker 2: Exactly.
- 1:00Speaker 1: How is network forensics really different from standard computer forensics.
- 1:05Speaker 2: Well, network forensics is a really specific type of investigation.
- 1:09Speaker 2: It's focused entirely on analyzing network traffic. So we're talking
- 1:13Speaker 2: praffic logs, full packet captures, device records, anything that can
- 1:18Speaker 2: help us trace an attacker's path, figure out their techniques,
- 1:21Speaker 2: and you know, gather real evidence.
- 1:23Speaker 1: And I think we can both agree the absolute, non
- 1:25Speaker 1: negotiable starting point for any of this is understanding what's
- 1:28Speaker 1: not a threat.
- 1:29Speaker 2: Oh one hundred percent. You absolutely cannot spot malicious or
- 1:35Speaker 2: abnormal activity if you don't have a solid, documented baseline
- 1:39Speaker 2: of what's normal for your network.
- 1:40Speaker 1: Without that, it's all.
- 1:41Speaker 2: Just noise, it is. If you don't know the normal
- 1:43Speaker 2: flow of data, every little spike, every unfamiliar port connection,
- 1:48Speaker 2: it means nothing. You have to know normal to find
- 1:50Speaker 2: the abnormal.
- 1:51Speaker 1: Okay, so let's say we found that anomally. Let's talk
- 1:53Speaker 1: about the evidence. People often say that even a really
- 1:56Speaker 1: skilled intruder who's great at covering their tracks on a machine,
- 2:00Speaker 1: they have a much harder time hiding in the network
- 2:03Speaker 1: traffic logs. Why is the network so much less forgiving?
- 2:06Speaker 2: It's really a matter of volume and redundancy. See, when
- 2:11Speaker 2: an attacker is on a single machine, they can use
- 2:14Speaker 2: tools to erase local log files. But the second they
- 2:18Speaker 2: start moving around laterally laterally or pulling data out, they
- 2:22Speaker 2: have to cross multiple points of infrastructure. We're talking firewalls, routers,
- 2:26Speaker 2: proxy servers, intrusion detection systems.
- 2:29Speaker 1: And all of those are logging everything.
- 2:31Speaker 2: Every single one and they're generating their own, often non editable,
- 2:35Speaker 2: time stamped logs. The attacker would have to sanitize every
- 2:39Speaker 2: log on every single device they touched, and doing that
- 2:42Speaker 2: quietly it's almost impossible.
- 2:44Speaker 1: So the network leaves this trail of breadcrumbs across like
- 2:48Speaker 1: everyone's yard.
- 2:49Speaker 2: That's a great way to put it.
- 2:50Speaker 1: So those routers and firewalls, they're like mandatory recording devices.
- 2:54Speaker 1: So when we're gathering evidence, it's not really an either
- 2:56Speaker 1: between network forensics and looking at the compromise PC.
- 3:00Speaker 2: No, not at all. They're completely complementary. They're constantly feeding
- 3:03Speaker 2: each other information.
- 3:04Speaker 1: Well.
- 3:05Speaker 2: For example, a great piece of network analysis might show
- 3:09Speaker 2: you a connection was established to a specific internal IP address.
- 3:14Speaker 2: That immediately tells the investigator, Okay, that's the machine I
- 3:17Speaker 2: need to focus on. Go pull a forensic image from
- 3:20Speaker 2: that exact computer.
- 3:22Speaker 1: So does it I mean, does it work the other
- 3:24Speaker 1: way around too?
- 3:25Speaker 2: Oh? Absolutely, it happens all the.
- 3:27Speaker 1: Time, right from the machine back to the network law.
- 3:29Speaker 2: Exactly, you might pull a memory image, maybe a hard
- 3:32Speaker 2: drive image, from an infected computer, and by reverse engineering
- 3:36Speaker 2: the malware you find on it, you discover the specific
- 3:40Speaker 2: command and control IP addresses it was talking.
- 3:42Speaker 1: To, and that sends you right back to your network log.
- 3:44Speaker 2: It tells you precisely which packets you need to go find, decrypt,
- 3:47Speaker 2: and analyze.
- 3:48Speaker 1: Which brings up the challenge of just getting the data
- 3:51Speaker 1: in the first place. When an incident happens, what's the
- 3:54Speaker 1: first thing an investigator does to preserve that digital crime scene?
- 3:59Speaker 2: The guiding principle pretty simple. Actually, in those first stages,
- 4:03Speaker 2: you don't know what's valuable yet, right, so you have
- 4:05Speaker 2: to acquire everything relevant. That means making what we call
- 4:08Speaker 2: bitstream copies.
- 4:10Speaker 1: What does that mean? Exactly?
- 4:11Speaker 2: It's a sector bisector, perfect duplicate of the storage, not
- 4:15Speaker 2: just the files, the empty space, the deleted space, everything.
- 4:20Speaker 2: It's a perfect forensic copy.
- 4:22Speaker 1: You're grabbing the entire digital haystack before you even start
- 4:25Speaker 1: looking for the needle.
- 4:25Speaker 2: That's it. You store that copy securely and then you
- 4:28Speaker 2: begin the analysis. We sometimes call it carving through it.
- 4:31Speaker 2: You're applying logic. You're filtering through billions of data points
- 4:35Speaker 2: to piece together what happened.
- 4:36Speaker 1: Okay, let's talk about the difficulty of tracing someone with
- 4:39Speaker 1: just an IP address. It sounds simple, but I know
- 4:42Speaker 1: in reality it's a huge task.
- 4:45Speaker 2: It's extremely tedious, and it almost always requires legal help.
- 4:49Speaker 1: Why is that?
- 4:50Speaker 2: Okay, Let's say you have the attacker's IP address that
- 4:53Speaker 2: addresses dynamic right it changes. To link it back to
- 4:56Speaker 2: a real device, you have to subpoena the entity that
- 4:59Speaker 2: assigned it. That's US, an Internet service provider, or more.
- 5:02Speaker 1: Like a coffee shop if it was a public hotspot.
- 5:04Speaker 2: A coffee shop, a library exactly.
- 5:07Speaker 1: And what are you asking them for?
- 5:08Speaker 2: You are asking for their DHCP logs. That's the dynamic
- 5:11Speaker 2: host configuration protocol. Those logs are the key they linked
- 5:16Speaker 2: that specific IP address at that precise date and time
- 5:20Speaker 2: to a unique identifier called a mass address.
- 5:22Speaker 1: Which is the physical address of the network card in
- 5:26Speaker 1: the device.
- 5:26Speaker 2: Right, and only once you have the AXI address can
- 5:29Speaker 2: you maybe trace the vendor, And if you're really lucky
- 5:31Speaker 2: and everyone kept good logs, trace it all the way
- 5:33Speaker 2: back to a system owner. It's a long, long process.
- 5:37Speaker 1: Wow, that really puts it in perspective. So what are
- 5:40Speaker 1: the foundational tools investigators are using when they're actually carving
- 5:43Speaker 1: through all that traffic data.
- 5:45Speaker 2: The main tool for capturing and analyzing traffic is hands
- 5:47Speaker 2: down wire shark, or it's the command line version t shark.
- 5:52Speaker 1: That's the modern standard.
- 5:53Speaker 2: It is though historically a lot of investigators started with
- 5:57Speaker 2: the classic TCP dump. It's still you all the time
- 6:00Speaker 2: for quick captures. These tools let you see everything right
- 6:04Speaker 2: down to the individual package.
- 6:05Speaker 1: Okay, let's shift gears from the detective work to the
- 6:08Speaker 1: architecture to building the fortress. We can use the OSI
- 6:13Speaker 1: model to kind of frame where security focus should be.
- 6:16Speaker 2: The OSI model is a perfect framework for this. If
- 6:19Speaker 2: you look at ATTAX today, you know layers three, four
- 6:21Speaker 2: and five that's network transport session. They're actually pretty robustly
- 6:27Speaker 2: secured by modern protocols.
- 6:28Speaker 1: So where the weak spots.
- 6:30Speaker 2: The weaknesses are, they're almost always at the edges. So
- 6:33Speaker 2: the lowest layers layer one in two physical and data
- 6:36Speaker 2: link and then critically the highest layers layer six and
- 6:39Speaker 2: seven presentation and application.
- 6:41Speaker 1: And why are those top application layers so much harder
- 6:44Speaker 1: to secure?
- 6:45Speaker 2: It's just the traffic is so complex. Securing Layer seven
- 6:48Speaker 2: means you need tools like deep packet inspection firewalls. They
- 6:51Speaker 2: have to understand the language of the application itself, HTTP, FTP,
- 6:55Speaker 2: whatever it is, not just the IP addresses and.
- 6:57Speaker 1: Ports, and getting those rules right is.
- 6:59Speaker 2: Tough, incredibly difficult. You have to block malicious commands without
- 7:02Speaker 2: disrupting legitimate business traffic. It's a constant balancing act.
- 7:06Speaker 1: Let's walk through the evolution of the firewall then, starting
- 7:08Speaker 1: with the basic idea.
- 7:10Speaker 2: At its core, a firewall is just an access control system.
- 7:14Speaker 2: It allows or denies packets based on a set of
- 7:16Speaker 2: rules about the source, IP destination, IP, the protocol, the port.
- 7:20Speaker 2: Pretty simple stuff.
- 7:21Speaker 1: But the first generation, the packet filtering firewall, it had
- 7:26Speaker 1: a huge flaw, a.
- 7:27Speaker 2: Major Achilles heel. Yeah, its critical weakness was its lack
- 7:31Speaker 2: of session state.
- 7:32Speaker 1: It couldn't track a conversation exactly.
- 7:34Speaker 2: It just looked at each packet in isolation. So an
- 7:37Speaker 2: attacker could exploit this by sending a TCP syn ack packet,
- 7:43Speaker 2: basically acknowledging a connection that was never requested, and the
- 7:46Speaker 2: firewall might just blindly let it through because the IP
- 7:49Speaker 2: and port matched a.
- 7:51Speaker 1: Rule, And that's what led to the stateful firewall.
- 7:53Speaker 2: Which completely revolutionized things. The stateful firewall solved that session
- 7:58Speaker 2: state problem. It keeps it dynamic table, a record of
- 8:01Speaker 2: every single initiated TCP.
- 8:03Speaker 1: Session, so it has context.
- 8:05Speaker 2: It has context. If an incoming synack packet shows up,
- 8:08Speaker 2: the stateful firewall checks its table. If there's no record
- 8:12Speaker 2: of an outbound syn from inside, it knows the connection
- 8:15Speaker 2: is fake and just drops it on the floor.
- 8:16Speaker 1: Then we push the technology even higher up to the
- 8:19Speaker 1: application layer.
- 8:20Speaker 2: Right with deep packet inspection, that's when the firewall starts,
- 8:23Speaker 2: you know, reading the mail.
- 8:24Speaker 1: So to speak, not just looking at the envelope.
- 8:26Speaker 2: Perfect analogy. It looks inside the packet's payload. This lets
- 8:30Speaker 2: you do incredibly specific things. For instance, you could set
- 8:33Speaker 2: up a rule to allow an FTP get command for
- 8:37Speaker 2: downloading files, but completely block the ftpput command so no
- 8:41Speaker 2: one can upload malicious code to your server.
- 8:44Speaker 1: Now, in terms of network design, especially for things facing
- 8:47Speaker 1: the Internet, we have to talk about the DMZ.
- 8:50Speaker 2: The DMZ, the demilitarized zone, is fundamental. It's a segregated
- 8:54Speaker 2: network segment. It usually sits between two firewalls, one facing
- 8:58Speaker 2: the untrusted Internet and one facing your trusted internal network, and.
- 9:02Speaker 1: That's where you put all your public services.
- 9:04Speaker 2: Everything, your web servers, your email servers, anything that the
- 9:07Speaker 2: public needs.
- 9:07Speaker 1: To touch, and sitting inside that DMZ is what we
- 9:10Speaker 1: call a bastion host.
- 9:11Speaker 2: Correct. A bastion host is just any machine that lives
- 9:14Speaker 2: in that untrusted DMZ segment, and because it's the most
- 9:17Speaker 2: exposed target, you have to harden it like crazy. It's
- 9:20Speaker 2: a dedicated system built to take continuous fire from the
- 9:23Speaker 2: outside world.
- 9:24Speaker 1: Let's clarify the difference between two really critical tools IDs
- 9:28Speaker 1: and IPS detection versus prevention and IDs.
- 9:32Speaker 2: An intrusion detection system is passive. Think of it like
- 9:36Speaker 2: a really sophisticated burglar alarm. SNORT is a great open
- 9:39Speaker 2: source example.
- 9:40Speaker 1: So it sees something bad in yells exactly.
- 9:43Speaker 2: It analyzes traffic, matches it against known bad signatures, and
- 9:47Speaker 2: if it spots something, it generates an alert for an administrator.
- 9:51Speaker 2: It tells you something bad happened, but it doesn't stop it.
- 9:54Speaker 1: And the IPS is the one that steps in the its.
- 9:57Speaker 2: The intrusion prevention system is active. It doesn't and just alert.
- 10:01Speaker 2: It actively intervenes. It can modify packets, it can drop connections,
- 10:04Speaker 2: It can even shut down a vulnerable port or an
- 10:07Speaker 2: entire network segment.
- 10:08Speaker 1: And this is where we need to be really, really.
- 10:10Speaker 2: Careful, massively careful, because with an IDs, if you get
- 10:13Speaker 2: a false positive, say fake traffic that just looks malicious,
- 10:17Speaker 2: the worst thing that happens is you get a pointless alert.
- 10:20Speaker 1: Annoying but not catastrophic. Right.
- 10:22Speaker 2: But if an IPS gets that same flood of fake
- 10:25Speaker 2: traffic and it's configured too aggressively, it might start shutting
- 10:29Speaker 2: down your own network. You can cause a devastating self
- 10:31Speaker 2: inflicted denial of service attack.
- 10:33Speaker 1: Wow, so you have to tune an IPS with surgical precision.
- 10:36Speaker 1: You do.
- 10:36Speaker 2: You have to remember its power to prevent is also
- 10:39Speaker 2: a power to destroy your own operations.
- 10:42Speaker 1: That is a great cautionary tale. Okay, let's move on
- 10:45Speaker 1: to securing trust in privacy. We have to break down Carberos.
- 10:50Speaker 1: It's named after the three headed dog from mythology because
- 10:54Speaker 1: it enforces a three way trust.
- 10:55Speaker 2: It's a brilliant system. Carberos is designed to stop a
- 10:59Speaker 2: man in the middle attack by making sure that both
- 11:01Speaker 2: the user and the resource they want to access have
- 11:04Speaker 2: been independently validated by a central server.
- 11:07Speaker 1: Okay, let's use an example, Say I'm a client and
- 11:10Speaker 1: I want to print to a network printer.
- 11:12Speaker 2: All right, so you, the client, want to print. The
- 11:14Speaker 2: printer immediately says, prove you are who you say you are,
- 11:17Speaker 2: give me your Carberra's ticket.
- 11:19Speaker 1: Okay, So I give it my ticket.
- 11:20Speaker 2: But here's the key part. The printer doesn't trust you,
- 11:23Speaker 2: and it doesn't trust your ticket directly. It takes that
- 11:26Speaker 2: ticket you gave it and goes back to the Carbrero server,
- 11:28Speaker 2: the central authority, and asks for validation. The server says, yep,
- 11:32Speaker 2: he's legit.
- 11:32Speaker 1: Okay, So that's two heads of the dog. Where's the third?
- 11:36Speaker 2: The third is the reciprocal trust. You the client haven't
- 11:39Speaker 2: validated the printer yet, so you then ask the printer
- 11:42Speaker 2: for its ticket, and you take that ticket back to
- 11:44Speaker 2: the Carbrero server and ask the server to validate the
- 11:47Speaker 2: printer's identity.
- 11:48Speaker 1: So only when we have both validated each other through
- 11:51Speaker 1: that central server can we talk.
- 11:53Speaker 2: That's it. It's a double checked, three way trust. Incredibly robust,
- 11:57Speaker 2: it really is.
- 11:58Speaker 1: Okay, Moving to privacy, let's bust the biggest myth about VPNs.
- 12:03Speaker 1: Everyone seems to think they create some kind of magic
- 12:06Speaker 1: highway that bypasses the public Internet.
- 12:09Speaker 2: That is just it's completely wrong. A VPN, a virtual
- 12:13Speaker 2: private network, does not create a magic tunnel that avoids
- 12:15Speaker 2: the underlying infrastructure. When you use a VPN, your traffic
- 12:19Speaker 2: travels along the exact same physical path through the same
- 12:22Speaker 2: routers as any other traffic.
- 12:24Speaker 1: So what's the difference.
- 12:25Speaker 2: The difference is that the traffic is fully encrypted. It's
- 12:28Speaker 2: scrambled on your end and unscrambled at the destination. Using
- 12:30Speaker 2: protocols like IPsec, the path is the same, the content
- 12:34Speaker 2: is just unreadable to anyone in between.
- 12:37Speaker 1: And for building secure channels, especially for admins, we often
- 12:40Speaker 1: use SSH tunneling.
- 12:42Speaker 2: Secure shell yeah, usually on port twenty two. It's essential
- 12:45Speaker 2: for creating secure, encrypted command shells. We use it for
- 12:49Speaker 2: file transfers, remote admin and creating secure tunnels like.
- 12:53Speaker 1: Wrapping a less secure protocol and a secure one.
- 12:55Speaker 2: Exactly if you have to run something sensitive like remote desktop,
- 12:58Speaker 2: you can establish an SSH tunnel first and then run
- 13:02Speaker 2: the RDP session inside that encrypted tunnel.
- 13:05Speaker 1: Finally, let's clarify the SSLTLS handshake. This is what secures
- 13:09Speaker 1: basically all modern web traffic, but there's always confusion about
- 13:13Speaker 1: who generates the secret key.
- 13:15Speaker 2: It's this beautiful hybrid process. The communication starts with the
- 13:18Speaker 2: slow but very secure asymmetric public key infrastructure or PKI,
- 13:24Speaker 2: then it quickly switches to fast symmetric shared key encryption.
- 13:27Speaker 1: Could you walk us through that exchange?
- 13:28Speaker 2: Sure, your browser requests a secure connection, The web server
- 13:32Speaker 2: responds with its public key. Okay, now here's the critical step.
- 13:35Speaker 2: Your browser then generates the unique, high speed secret session
- 13:39Speaker 2: key right then and there on your machine.
- 13:42Speaker 1: Ah, So the browser makes a key.
- 13:43Speaker 2: The browser makes it. It then encrypts that new secret
- 13:46Speaker 2: key using the server's public key, and sends that little
- 13:50Speaker 2: encrypted package across the network.
- 13:52Speaker 1: And only the web server, which has the matching private key,
- 13:55Speaker 1: can open that package.
- 13:56Speaker 2: Correct. The server uses its private key to decrypt and
- 14:00Speaker 2: extract the secret session key. And now, because the browser
- 14:04Speaker 2: created it and the server successfully decrypted it, both parties
- 14:08Speaker 2: have the same secret and.
- 14:09Speaker 1: They use that shared key for the rest of the conversation.
- 14:12Speaker 2: For the whole session. It makes the communication both secure
- 14:15Speaker 2: at the start and very efficient for the duration.
- 14:17Speaker 1: That really locks down how digital trust gets established. Okay,
- 14:21Speaker 1: before we wrap, let's touch on the tools that help
- 14:23Speaker 1: us monitor the health of our fortress day to day.
- 14:25Speaker 2: A big one is file integrity check tools or FIC,
- 14:29Speaker 2: something like Tripwire. Their whole job is to constantly monitor
- 14:33Speaker 2: critical system files by tracking their cryptographic hashes, their digital fingerprints.
- 14:38Speaker 1: So a file changes, if an.
- 14:40Speaker 2: Intruder modifies a key system file, the hash changes instantly
- 14:44Speaker 2: and the FIC tool shoots off an alert to the administrator.
- 14:47Speaker 2: It's an early warning system.
- 14:49Speaker 1: And when you have hundreds of devices all spitting out
- 14:53Speaker 1: thousands of logs every second, you need a way to
- 14:56Speaker 1: manage that flood of data.
- 14:57Speaker 2: That's where SIME comes in security and from and event
- 15:00Speaker 2: management tools like Splunk or Logarithm. They ingest just massive
- 15:05Speaker 2: amounts of security data from everything.
- 15:07Speaker 1: On the network and they find the patterns.
- 15:09Speaker 2: They aggregate it, normalize it, and analyze it looking for
- 15:13Speaker 2: correlations that a human could never ever spot manually. A
- 15:18Speaker 2: sign is how you get that comprehensive oversight.
- 15:21Speaker 1: So we've really covered the whole life cycle today, from
- 15:23Speaker 1: the painstaking detective work of forensics to the layered defense
- 15:27Speaker 1: of firewalls and DMZs, and then the complex protocols like
- 15:30Speaker 1: cerberos and SSL that build and maintain digital trust.
- 15:34Speaker 2: That ability to switch from slow PISAI to fast symmetric
- 15:38Speaker 2: encryption in the SSL handshake that really underpins the trust
- 15:42Speaker 2: of almost every secure thing you do online. But it's
- 15:45Speaker 2: just as important to remember that all the analysis in
- 15:47Speaker 2: the world is useless if you haven't been logging the
- 15:49Speaker 2: data properly in the first place.
- 15:50Speaker 1: Detection and prevention have to work hand in hand, as
- 15:53Speaker 1: that's a perfect way to put it now, something for
- 15:55Speaker 1: you to think about if you are designing security for
- 15:57Speaker 1: a high speed trading network, a place where down time
- 16:00Speaker 1: is absolutely not an option. What is the most significant
- 16:03Speaker 1: operational risk you'd face by choosing an active intrusion prevention
- 16:07Speaker 1: system an IPS over a passive intrusion detection system, especially
- 16:11Speaker 1: if you're worried about malicious network flooding.