Latest / CyberCode Academy / Course 13 - Network Forensics | Episode 1: Fundamentals, Attack Vectors, and Digital Tracing
Transcript
- 0:00Speaker 1: Welcome to the deep dive. Today. We're on a pretty
- 0:03Speaker 1: critical mission, really diving deep into network forensics. We're going
- 0:08Speaker 1: to travel through the whole stat I mean, from the
- 0:10Speaker 1: physical cable all the way up to encrypted data. Because
- 0:14Speaker 1: when data moves, it leaves clues. The question is how
- 0:17Speaker 1: deep do those clues go and how easy is it
- 0:20Speaker 1: to steal or impersonate that traffic.
- 0:23Speaker 2: That is the core challenge, isn't it. If you want
- 0:25Speaker 2: to track an attacker, you first have to be fluent
- 0:28Speaker 2: in how systems talk to each other. You need to
- 0:30Speaker 2: understand the media, the devices, the protocols, and maybe more importantly,
- 0:35Speaker 2: know exactly where the weakest links are.
- 0:37Speaker 1: Absolutely so, our goal today is to give you that
- 0:39Speaker 1: clear understanding of the common attack vectors and then the
- 0:42Speaker 1: forensic methods used to track them down. We're basically creating
- 0:46Speaker 1: a shortcut to understanding the entire communication pipeline, where.
- 0:49Speaker 2: The holes are, and how to spot when something's wrong.
- 0:51Speaker 1: Okay, let's unpack this. We should probably start at well,
- 0:55Speaker 1: literally the ground floor layer one, the physical hardware.
- 0:58Speaker 2: Yeah, we get so focused on fancy encryption algorithms that
- 1:02Speaker 2: we forget security starts with stuff you can actually.
- 1:04Speaker 1: Touch and these aren't just theoretical threats, right, not at all. Yeah.
- 1:08Speaker 2: I mean with modern ethernet, you can get basic hardware taps,
- 1:11Speaker 2: things like the Throwing Star Land Tap Throwing Star, it's
- 1:15Speaker 2: just a name, but for forty or fifty bucks, you
- 1:18Speaker 2: can get a device that just sits on the cable
- 1:20Speaker 2: and duplicates everything it has ports for the original conversation,
- 1:24Speaker 2: and then read only ports that just siphon off a
- 1:27Speaker 2: copy of all the traffic. The original systems have no.
- 1:30Speaker 1: Idea, And that leads us to probably the biggest physical
- 1:33Speaker 1: risk of all the data closet. Yeah, wiring closet.
- 1:37Speaker 2: Oh absolutely. If an attacker gets physical access to that room,
- 1:41Speaker 2: to the punchdown blocks, it's game over.
- 1:45Speaker 1: They're just on the network instantly bypassing everything exactly.
- 1:49Speaker 2: The most famous case that shows this is Aaron.
- 1:52Speaker 1: Schwartz right at MIT.
- 1:53Speaker 2: Yeah, he didn't hack a firewall. He just broke into
- 1:56Speaker 2: a wiring closet, plugged a server directly into the network
- 1:59Speaker 2: and to downloading.
- 2:00Speaker 1: And they only caught him because of a security camera
- 2:03Speaker 1: in the closet, not because of a digital trace.
- 2:05Speaker 2: It's a huge lesson. Sometimes the lowest tech attack is
- 2:08Speaker 2: the most effective one.
- 2:09Speaker 1: So when physical security fails, the next jump is usually
- 2:13Speaker 1: to the airwaves wireless, which is a forensic nightmare because
- 2:17Speaker 1: it's basically a hub, right, it's just broadcasting everything into
- 2:20Speaker 1: the open.
- 2:20Speaker 2: Precisely, you're just shouting your data into the public domain.
- 2:24Speaker 2: Anyone in range can hear anything that's not encrypted, and.
- 2:27Speaker 1: We tend to trust the numbers on the box. Like
- 2:29Speaker 1: Bluetooth has a range of what ten meters maybe sixty feet.
- 2:33Speaker 2: That's the advertised range. But you know, way back in
- 2:36Speaker 2: two thousand and five, there's a demo of something called
- 2:38Speaker 2: the Bluetooth Sniper Gun. A sniper gun, yeah, and it
- 2:41Speaker 2: got a reliable connection from three quarters of a mile away.
- 2:44Speaker 1: WHOA so much for that thirty foot security bubble.
- 2:47Speaker 2: Relying on distance for wireless security is a huge mistake.
- 2:51Speaker 1: It's interesting, though, you can make some small tweaks for security,
- 2:54Speaker 1: like with Wi Fi channels. In the US we use
- 2:56Speaker 1: channels one through eleven, right.
- 2:57Speaker 2: But you could theoretically force your devices to use a
- 3:01Speaker 2: country code for say Japan, and use their channel fourteen.
- 3:06Speaker 1: Which most standard US equipment won't even scan for.
- 3:08Speaker 2: It's not real security, but it's a little bump, a
- 3:11Speaker 2: minor deterrent for a casual sniff.
- 3:13Speaker 1: But the real weakness of wireless is how easy it
- 3:16Speaker 1: is to launch a denial of service attack.
- 3:18Speaker 2: Oh, it's trivial. You don't need a botnet. You can
- 3:20Speaker 2: do it with a twenty dollars micro controller like an
- 3:23Speaker 2: ESP eighty two sixty six board.
- 3:25Speaker 1: And what does it do.
- 3:26Speaker 2: It just sends out forged packets that trick everyone's devices
- 3:29Speaker 2: into thinking the access point kick them off. They can't reconnect.
- 3:33Speaker 2: It's a localized DAS attack that's incredibly effective and cheap
- 3:36Speaker 2: to pull off.
- 3:37Speaker 1: So once we move past the physical layer, we get
- 3:40Speaker 1: into the digital world where everything is about identity, and
- 3:44Speaker 1: that usually means the MC address and the IP address exactly.
- 3:47Speaker 2: The MC is your hardware fingerprint layer two, the ip's
- 3:51Speaker 2: your system fingerprint layer three.
- 3:53Speaker 1: But here's the problem for an investigator. The MC address
- 3:56Speaker 1: can be changed.
- 3:57Speaker 2: Right, trivial to change. There are tools like mac changer
- 4:01Speaker 2: that can spoof it in seconds.
- 4:03Speaker 1: So if it's that easy to fake, how do you
- 4:04Speaker 1: ever track anyone?
- 4:06Speaker 2: You look for the pattern, not the address, the pattern. Yeah,
- 4:08Speaker 2: So say you see some malicious activity from MAC address
- 4:11Speaker 2: A and IP address X for two hours, then it stops.
- 4:17Speaker 2: Five minutes later, the exact same activity starts up from
- 4:20Speaker 2: maac be an ipy ah.
- 4:22Speaker 1: So it's the behavior that links them. It's the same
- 4:25Speaker 1: person just changing masks.
- 4:26Speaker 2: That's a massive red flag, and it leads us to
- 4:29Speaker 2: the identifier that often cracks the case wide open the
- 4:33Speaker 2: host name.
- 4:34Speaker 1: The host name.
- 4:34Speaker 2: Why that because unlike the MAC or IP, changing the
- 4:38Speaker 2: host name properly system wide often requires a full reboot.
- 4:42Speaker 1: But wouldn't a smart attacker just reboot?
- 4:45Speaker 2: You'd think so, But forensics is usually about capitalizing on
- 4:48Speaker 2: human error. An attacker's under pressure. They change the MAC,
- 4:51Speaker 2: they change the IP, they see the traffic flowing again,
- 4:53Speaker 2: and they think they're safe.
- 4:54Speaker 1: They don't want to risk a reboot, which is slow
- 4:56Speaker 1: and might trigger some other alert.
- 4:58Speaker 2: Exactly, so they forget that they're The static host name
- 5:01Speaker 2: is being logged by every single server they touch. It
- 5:03Speaker 2: becomes this persistent, crucial link back to their machine that
- 5:06Speaker 2: is fascinating.
- 5:07Speaker 1: The investigation hinges on and attackers impatients. Okay, so, speaking
- 5:11Speaker 1: of layers, let's quickly nail down the devices.
- 5:13Speaker 2: Right At layer one, you have the hub, just a
- 5:16Speaker 2: dumb repeater.
- 5:17Speaker 1: Layer two is the switch, which cares about those MSc
- 5:20Speaker 1: addresses we just talked about.
- 5:21Speaker 2: Then layer three is the router moving traffic between networks
- 5:25Speaker 2: using IP addresses, and then generally the firewall works up
- 5:28Speaker 2: to layer four filtering based on port numbers.
- 5:30Speaker 1: T thirt or UDP ports right, and.
- 5:33Speaker 2: Those two protocols are fundamentally different. PCP is connection oriented.
- 5:37Speaker 2: It's all about guarantee delivery.
- 5:39Speaker 1: It does the whole three way handshake, sends sequence numbers.
- 5:43Speaker 1: If a packet drops, TCP knows and resends.
- 5:46Speaker 2: It yep, whereas UDP is the opposite. It's connectionless, fire and.
- 5:50Speaker 1: Forget, which is why gamers love it.
- 5:52Speaker 2: Right, less lag exactly faster, lower overhead. But if a
- 5:55Speaker 2: packet drops, you just see a glitch in the game.
- 5:58Speaker 2: For forensics, that's a problem, and an attacker using UDP
- 6:01Speaker 2: leaves a much messier, harder to follow a trail because
- 6:04Speaker 2: you lose all that sequence and flow information.
- 6:06Speaker 1: Okay, let's talk deception. One of the biggest defenses most
- 6:09Speaker 1: networks have is GNAT network address translation.
- 6:12Speaker 2: The poor man's proxy, that's a great way to put it.
- 6:15Speaker 1: It takes a whole building full of internal IP addresses
- 6:18Speaker 1: and hides them behind one single public IPS.
- 6:22Speaker 2: Which is a huge security benefit because if an attacker
- 6:24Speaker 2: on the outside tries to connect to a specific computer
- 6:27Speaker 2: on the inside, the NAT device gets the request and
- 6:30Speaker 2: just drops it. It has no map for that unsolicited traffic.
- 6:34Speaker 1: So this is why almost all successful attacks are an
- 6:37Speaker 1: inside job. They're not breaking in from the outside exactly.
- 6:40Speaker 2: The strategy has to be to trick an internal user
- 6:43Speaker 2: through a phishing email or a bad website to download
- 6:47Speaker 2: and run.
- 6:47Speaker 1: Some code, and that code then calls home. It creates
- 6:51Speaker 1: an outbound tunnel.
- 6:52Speaker 2: And that's the key. Outbound traffic is usually allowed, so
- 6:55Speaker 2: its sales right past the NAT device completely bypassing its protection.
- 6:59Speaker 1: So when an attacker is doing reconnaissance, one of the
- 7:01Speaker 1: first steps is port scanning.
- 7:03Speaker 2: Right, you have sixty five, five hundred and thirty six
- 7:06Speaker 2: ports for TCP and the same for UDP, A huge number.
- 7:09Speaker 1: But most scanning tools only check what the top two thousand.
- 7:12Speaker 2: Or so, and for good reason. Doing a full scan
- 7:14Speaker 2: of all sixty five thousand ports takes forever, and it
- 7:17Speaker 2: can actually knock a network over. It's a risk for
- 7:19Speaker 2: a self inflicted denial of service attack.
- 7:21Speaker 1: I can actually vouch for that. I've seen a pen
- 7:24Speaker 1: tester run a full scan, not the default, and the
- 7:27Speaker 1: sheer volume of connection requests just crashed the client's firewall.
- 7:32Speaker 2: It happens the legacy hardware just can't handle the traffic storm.
- 7:36Speaker 2: It proves that sometimes volume is a bigger threat than
- 7:39Speaker 2: some complex exploit.
- 7:41Speaker 1: Now, if the attacker is already inside the network, we
- 7:43Speaker 1: have to talk about ARP.
- 7:45Speaker 2: Poisoning, the classic internal attack. It's purely local. The attacker
- 7:49Speaker 2: basically lies to the network.
- 7:52Speaker 1: They tell the gateway, hey, I'm the client computer, and
- 7:54Speaker 1: they tell the client computer, hey, I'm the gateway, and just.
- 7:57Speaker 2: Like that, they've inserted themselves in the middle of the conversation.
- 8:00Speaker 2: All traffic now flows through the attacker's machine.
- 8:03Speaker 1: Man in the middle. They can see everything.
- 8:05Speaker 2: And what's wild is how easy it is to stop.
- 8:08Speaker 2: You just enable port security on the switch, which locks
- 8:11Speaker 2: a physical port to a single MC address, But so
- 8:15Speaker 2: many organizations just don't do it.
- 8:17Speaker 1: We should probably also talk about that classic TV hacking trope,
- 8:20Speaker 1: the idea that someone can remotely spoof their IP and
- 8:23Speaker 1: have a perfect interactive session with a server.
- 8:26Speaker 2: Yeah, that's almost impossible in the real world.
- 8:29Speaker 1: Because of the reset packet.
- 8:30Speaker 2: Right exactly, if an attacker spoofs their IP to talk
- 8:33Speaker 2: to a server. The server send its reply back to
- 8:36Speaker 2: the real IP.
- 8:37Speaker 1: Address, and that real, innocent machine gets a packet it
- 8:40Speaker 1: wasn't expecting.
- 8:41Speaker 2: And it immediately sends back a reset packet an RST,
- 8:45Speaker 2: which just kills the connection instantly.
- 8:47Speaker 1: So any remote attack has to be blind. The attacker's
- 8:50Speaker 1: just guessing.
- 8:51Speaker 2: Right, So spoofing is mostly used in big doss attacks,
- 8:54Speaker 2: not for control, but just to create chaos in the logs,
- 8:57Speaker 2: a fog of war to slow down the investigation.
- 9:00Speaker 1: Okay, let's talk about hardening. What are the big ports
- 9:02Speaker 1: people need to lock down?
- 9:04Speaker 2: Number one Telnet on port twenty three. It should just
- 9:07Speaker 2: be gone. It sends usernames and passwords and plaintext.
- 9:10Speaker 1: Unbelievable that it's still around. The replacement is SSH on
- 9:14Speaker 1: port twenty two, which is encrypted right.
- 9:16Speaker 2: And another huge one is SNMP ports one sixty one
- 9:20Speaker 2: and one sixty two Simple Network Management Protocol.
- 9:23Speaker 1: And this should never ever be accessible from the Internet.
- 9:26Speaker 2: Never because it often uses a default community string, which
- 9:30Speaker 2: is basically a plain text password. If an attacker guesses public,
- 9:34Speaker 2: they can get a full dump of your servers, configuration,
- 9:37Speaker 2: running processes, user accounts, everything.
- 9:40Speaker 1: It's like handing them a blueprint of your entire network.
- 9:43Speaker 2: Yeah, and speaking of ports, it's also good to know
- 9:46Speaker 2: that malware often uses memorable non standard ports.
- 9:49Speaker 1: You mean like sixty sixty six or one three three seven.
- 9:53Speaker 2: Exactly, or three one three three seven for leat one
- 9:55Speaker 2: two three four five five four three two one. If
- 9:58Speaker 2: you see traffic on those, it's an immediate red flag.
- 10:01Speaker 1: So when a breach happens, the forensic team has to
- 10:03Speaker 1: find the trail. If it's an external attack, you're looking
- 10:06Speaker 1: at the router and firewall logs, and.
- 10:08Speaker 2: If it's internal, you're looking at switches, servers, and points. Yeah,
- 10:11Speaker 2: the problem is the sheer volume.
- 10:13Speaker 1: Of data, which is where SIMS tools come in. Security
- 10:15Speaker 1: information and event management indispensable.
- 10:18Speaker 2: A SIMS tool pulls in logs from hundreds of different devices, routers, firewalls,
- 10:22Speaker 2: servers and puts them all into one single, standardized database.
- 10:25Speaker 1: And that standardization is the magic, right, It's.
- 10:28Speaker 2: Everything, because now you can search for patterns across your
- 10:32Speaker 2: whole network. You can say, show me where this malicious
- 10:35Speaker 2: IP appeared, and you'll see it hit the firewall. Then
- 10:38Speaker 2: two minutes later an internal server tried to connect to it.
- 10:41Speaker 1: You can see the whole narrative of the attack.
- 10:43Speaker 2: A story you could never piece together by looking at
- 10:46Speaker 2: hundreds of separate log.
- 10:47Speaker 1: Files and for looking at the conversations themselves. You've got
- 10:51Speaker 1: protocol analyzers like wireshark.
- 10:53Speaker 2: Right, which works at layer two. If the traffic isn't encrypted,
- 10:56Speaker 2: you can literally just read the data, carve out passwords, commands.
- 11:00Speaker 1: And even if it is encrypted, you still get the
- 11:02Speaker 1: metadata who is talking to who, when and how much
- 11:05Speaker 1: data was sent.
- 11:06Speaker 2: Another critical tool is netstap. He shows you all the
- 11:09Speaker 2: active connections on a system and which process is using
- 11:12Speaker 2: which port.
- 11:13Speaker 1: But there's a massive warning that comes.
- 11:15Speaker 2: With netstack, oh, a huge one. You never read it
- 11:17Speaker 2: on the original evidence. Never the act of running the
- 11:20Speaker 2: command changes the system. It's contamination. You only read it
- 11:23Speaker 2: on a memory dump or on a virtual machine copy
- 11:26Speaker 2: of the system.
- 11:27Speaker 1: And when you're looking at the output, you have to
- 11:29Speaker 1: check what the process is bound to.
- 11:32Speaker 2: That is such a critical point. If you see a
- 11:35Speaker 2: service like a database bound to one twenty seven points
- 11:39Speaker 2: zero point h one.
- 11:39Speaker 1: One, that's local host it can only be accessed from
- 11:42Speaker 1: the machine itself safe.
- 11:44Speaker 2: But if you see it bound to point zero and
- 11:46Speaker 2: points zero.
- 11:47Speaker 1: That means it's listening on all network interfaces. It's exposed
- 11:50Speaker 1: to the.
- 11:51Speaker 2: World, and that's often an accidental, massive security hole.
- 11:54Speaker 1: You know, through all of this, from physical taps to
- 11:56Speaker 1: software tools, the one piece of data that seems most
- 11:59Speaker 1: import orton is the timestamp.
- 12:02Speaker 2: It is the most relevant piece of forensic data, period
- 12:05Speaker 2: and we tend to trust the time stamps on network
- 12:08Speaker 2: devices more than on a compromised computer.
- 12:10Speaker 1: Because they're harder for an attacker to change across the board, right, And.
- 12:13Speaker 2: This is why having an NTPE server network time Protocol
- 12:16Speaker 2: server is non negotiable for any serious organization.
- 12:19Speaker 1: It synchronizes the clocks on all your devices.
- 12:22Speaker 2: If all your logs are synced to within a few seconds,
- 12:25Speaker 2: the investigation is smooth. If they're not, your team will
- 12:28Speaker 2: waste days, even weeks just trying to figure out the
- 12:31Speaker 2: time offsets between devices. It's a nightmare.
- 12:34Speaker 1: What a journey, I mean, from a forty dollars wire
- 12:36Speaker 1: tap all the way to why the host name can
- 12:39Speaker 1: be an attacker's fatal mistake and how SIMS tools stitch
- 12:44Speaker 1: that whole story together. Network forensics really is just about
- 12:48Speaker 1: understanding the path data is supposed to take and then
- 12:50Speaker 1: spotting when it deviates.
- 12:52Speaker 2: And that concept of the path is always the key,
- 12:55Speaker 2: even with something super advanced like towort onion routing.
- 12:58Speaker 1: Right with its three layers of incl ryption.
- 13:00Speaker 2: Yeah, but at the end of that path is an
- 13:01Speaker 2: exit relay, and that relay has to decrypt the traffic
- 13:05Speaker 2: to send it to the final destination. If the final
- 13:07Speaker 2: connection isn't encrypted, or if an adversary controls.
- 13:10Speaker 1: That exit relay, the traffic is exposed. It always comes
- 13:12Speaker 1: back to the path.
- 13:13Speaker 2: It always comes back to the path.
- 13:14Speaker 1: That is a perfect way to bring it all together.
- 13:16Speaker 1: So here's a final thought for you to take away
- 13:18Speaker 1: from this deep dive. We talked about how NAT forces
- 13:22Speaker 1: an attacker to use a call home technique to tunnel
- 13:25Speaker 1: out of a network. So thinking about that, Describe a
- 13:27Speaker 1: scenario where an attacker might choose to use a UDP
- 13:30Speaker 1: protocol for that call home tunnel instead of TCP, and
- 13:33Speaker 1: what immediate forensic challenge would that choice present to an investigator.
- 13:37Speaker 1: Think about that. It connects the purpose of GNAT, the
- 13:39Speaker 1: core differences between TCP and UDP, and the very real
- 13:42Speaker 1: limits of forensic analysis