Latest / CyberCode Academy / Course 10 - Network Security Fundamentals | Episode 1: Models, Security, Protocols, and IP Addressing
Transcript
- 0:00Speaker 1: Welcome to the deep dive. Today, we're cracking open the
- 0:04Speaker 1: dense technical blueprints of modern technology and really distilling them
- 0:08Speaker 1: into something you can.
- 0:09Speaker 2: Use right into actionable knowledge.
- 0:11Speaker 1: Exactly if you're coding, if you're building infrastructure, or focus
- 0:15Speaker 1: on cybersecurity, you know that understanding how data communicates isn't optional. Yes,
- 0:22Speaker 1: it's the absolute foundation, it really is.
- 0:24Speaker 2: And people ask this all the time, Right, why do
- 0:26Speaker 2: I need to know the OSIME model? I just need
- 0:28Speaker 2: to build an API And the answer is always about complexity,
- 0:31Speaker 2: It's about scale. These models, OSI, Triple A IP, they
- 0:36Speaker 2: aren't just academic, they're the map. They give you the
- 0:40Speaker 2: vocabulary you need to actually solve problems.
- 0:42Speaker 1: You're kind of debugging blind without them, totally blind.
- 0:44Speaker 2: If you don't know layer three from layer four, you're
- 0:46Speaker 2: just guessing.
- 0:47Speaker 1: So our mission today is to create a shortcut for you.
- 0:49Speaker 1: We're going to unpack how data travels, how access is controlled,
- 0:53Speaker 1: and honestly, which old insecure protocols you need to get
- 0:57Speaker 1: rid of right now?
- 0:58Speaker 2: Okay, so where we start the map itself.
- 1:00Speaker 1: Let's start with the map, the OSI model.
- 1:02Speaker 2: The Open System's Interconnection Model Standardize way back in what
- 1:06Speaker 2: nineteen eighty four.
- 1:07Speaker 1: Yeah, And it's basically this conceptual framework that breaks down
- 1:10Speaker 1: network communication into seven distinct layers.
- 1:13Speaker 2: It's how everyone in it gets on the same page.
- 1:16Speaker 2: Whether you're talking about a bad cable or a piece
- 1:18Speaker 2: of malware, you can point to a layer.
- 1:21Speaker 1: And to really master this, you do need to know
- 1:23Speaker 1: the seven layers in order, from the physical wire all
- 1:26Speaker 1: the way up.
- 1:26Speaker 2: And for that we have the classic mnemonic.
- 1:30Speaker 3: Please do not throw sausage pizza away, a classic for
- 1:33Speaker 3: a reason, and that gives you physical data, link, network transport, session, presentation,
- 1:40Speaker 3: and finally application at the top.
- 1:42Speaker 1: And we use those numbers constantly L one, L two,
- 1:44Speaker 1: L three. It's shorthand absolutely. Now a really core concept
- 1:48Speaker 1: here is something called peer based communication.
- 1:50Speaker 2: Right. This is so important. A layer only talks to
- 1:53Speaker 2: the layer directly above it or directly below it.
- 1:56Speaker 1: So layer three, the network layer, can't just jump up
- 1:58Speaker 1: and talk to the application layer at layer seven.
- 2:00Speaker 2: Nope, it has to go up or down one step
- 2:03Speaker 2: at a time through the whole stack.
- 2:05Speaker 1: And as the data moves through that stack, it actually
- 2:07Speaker 1: gets transformed, doesn't it.
- 2:09Speaker 2: It does. The generic name for the data any layer
- 2:12Speaker 2: is a protocol data unit or PDU.
- 2:15Speaker 1: But it changes names.
- 2:16Speaker 2: Yeah, and knowing the names is a good way to
- 2:18Speaker 2: show you really get it. At layer four, the transport layer,
- 2:21Speaker 2: it's called a segment, and.
- 2:23Speaker 1: Then at layer three it becomes a packet.
- 2:25Speaker 2: Right, and then finally at layer two, the data link layer,
- 2:28Speaker 2: we call it a frame.
- 2:29Speaker 1: So that leads us to how data gets packaged in
- 2:32Speaker 1: the first place, encapsulation encapsulation.
- 2:35Speaker 2: So you're sending an email that starts at the top
- 2:38Speaker 2: layer seven. As your data travels down the stack toward
- 2:40Speaker 2: the wire.
- 2:41Speaker 1: It picks up extra information at each layer exactly.
- 2:44Speaker 2: Each layer wraps the data in a header. Think of
- 2:47Speaker 2: it like putting a letter into an envelope, then putting
- 2:50Speaker 2: that envelope into a slightly bigger one, and.
- 2:52Speaker 1: That header has all the instructions precisely.
- 2:55Speaker 2: It tells the corresponding pere layer on the other machine
- 2:58Speaker 2: what to do with the data. Then when it's received,
- 3:01Speaker 2: the reverse happens. The encapsulation yep, starts at the bottom
- 3:04Speaker 2: layer one. As the data goes up the stack, each
- 3:07Speaker 2: layer just strips off the header that it's peer put
- 3:10Speaker 2: on until you're left with the original application data at
- 3:13Speaker 2: layer seven.
- 3:14Speaker 1: Okay, so let's dig into a few of these layers.
- 3:16Speaker 1: Layer one, the physical layer. Pretty simple, but you can't
- 3:19Speaker 1: do anything without.
- 3:20Speaker 2: It, No, you can't. This is the realm of bits,
- 3:22Speaker 2: the actual zeros and ones flowing as electrical signals, lightover
- 3:27Speaker 2: fiber or radio waves.
- 3:28Speaker 1: Your cables, your network interface card, your.
- 3:31Speaker 2: NIC and some older devices you should be wary of,
- 3:35Speaker 2: like hubs or repeaters. Remember a hub is well, it's
- 3:39Speaker 2: pretty dumb. It just blasts every bit of traffic it
- 3:42Speaker 2: receives to every single device connected to it.
- 3:44Speaker 1: Which is a security and performance nightmare.
- 3:47Speaker 2: Huge one.
- 3:48Speaker 1: So we've got the physical bits flowing. Now let's talk
- 3:50Speaker 1: about how we control who has access to this data flow.
- 3:53Speaker 2: Okay, that brings us to identity and access management or
- 3:58Speaker 2: triple A services.
- 3:59Speaker 1: Triple A authentication, authorization, and accounting exactly.
- 4:02Speaker 2: Authentication is you proving who you are.
- 4:04Speaker 1: Yeah.
- 4:05Speaker 2: Authorization is what you're allowed to do once you've proven.
- 4:07Speaker 1: It, and accounting is the log of everything you did.
- 4:10Speaker 2: Yep, the audit trail.
- 4:11Speaker 1: Let's focus on authentication for a second. That Windows login
- 4:14Speaker 1: screen everyone sees when you type in your password, something
- 4:17Speaker 1: very specific happens.
- 4:19Speaker 2: Right. This system does not just compare your plain text
- 4:22Speaker 2: password to a stored one. That would be incredibly insecure.
- 4:26Speaker 1: So what does it do.
- 4:27Speaker 2: It uses a one way cryptographic function called hashing. It
- 4:31Speaker 2: takes your password, runs it through an algorithm like SAHA
- 4:34Speaker 2: two five six, and produces a unique string a hash value, and.
- 4:39Speaker 1: It compares that generated hash to the hash it has
- 4:42Speaker 1: on file.
- 4:42Speaker 2: For you exactly, and just to be crystal clear for
- 4:46Speaker 2: anyone listening, this is fundamentally different from encryption. How so, Well,
- 4:51Speaker 2: encryption is a two way process. You can encrypt something
- 4:54Speaker 2: and then you can decrypt it back to the original.
- 4:56Speaker 2: Hashing is a one way street. You cannot reverse it
- 4:58Speaker 2: to get the original password.
- 5:00Speaker 1: Which is why even if a password database gets stolen,
- 5:03Speaker 1: the passwords themselves are still protected in theory.
- 5:06Speaker 2: Yes, that's the whole point.
- 5:08Speaker 1: Okay, so you're authenticated. Now comes authorization. This is about permissions,
- 5:12Speaker 1: right Are.
- 5:13Speaker 2: You an ADVIN a standard user? This determines what files,
- 5:18Speaker 2: what systems, what resources you're allowed to touch.
- 5:21Speaker 1: And there are different models for this, aren't there?
- 5:23Speaker 2: There are? The most common one you'll see in a
- 5:25Speaker 2: corporate setting is probably discretionary access control or DAC.
- 5:30Speaker 1: Discretionary meaning the owner of the resource gets to decide.
- 5:33Speaker 2: Exactly you create a file, you get to decide who
- 5:36Speaker 2: can read it or edit it.
- 5:37Speaker 1: It's flexible, but the opposite of that would be mandatory
- 5:41Speaker 1: access control MA.
- 5:43Speaker 2: MA is the complete opposite. It's rigid, top down. A
- 5:47Speaker 2: central authority sets the rules and classifications and the user
- 5:50Speaker 2: can't change anything. Think government classifications top secret. Right, the
- 5:54Speaker 2: data is labeled top secret and you have top secret clearance.
- 5:58Speaker 2: The system enforces it.
- 5:59Speaker 1: It'satory, and the final a accounting or auditing.
- 6:03Speaker 2: This is all about the logs. Every log in, every
- 6:06Speaker 2: failed attempt, every file access, it all gets written to
- 6:08Speaker 2: a log like the Windows event viewer.
- 6:10Speaker 1: So if something bad happens, you have a trail.
- 6:13Speaker 2: You have a trail. It's all about accountability.
- 6:15Speaker 1: Okay, let's jump back to the OSI model, to layer three,
- 6:18Speaker 1: the network laire. This is where we find the Internet's
- 6:21Speaker 1: address book.
- 6:21Speaker 2: Ip IPv four, specifically our original standard from nineteen eighty three.
- 6:26Speaker 2: It uses a thirty two bit address.
- 6:28Speaker 1: Which gives us about four billion addresses.
- 6:30Speaker 2: Seemed like a lot at the time.
- 6:32Speaker 1: Yeah, we burn through those a lot faster than anyone expected,
- 6:35Speaker 1: which led to the problem of address exhaustion.
- 6:37Speaker 2: And the solution was IPv six.
- 6:39Speaker 1: IPv six, with its massive one hundred and twenty eight
- 6:42Speaker 1: bit address space. It gives us well an effectively unlimited
- 6:47Speaker 1: number of addresses, something like three hundred and forty one dacillient.
- 6:50Speaker 2: So why aren't we all using it? The adoption has
- 6:52Speaker 2: been so.
- 6:52Speaker 1: Slow, it's been painfully slow. A big part of it
- 6:55Speaker 1: is the notation. IPv four is that familiar dotted decimal
- 6:58Speaker 1: one ninety two point one ZI eight point one point one,
- 7:01Speaker 1: easy to remember right. IPv six uses longer hexodesimal characters
- 7:05Speaker 1: right in the mix of numbers and letters from eight f.
- 7:07Speaker 1: It just it looks more complex than people have been
- 7:09Speaker 1: reluctant to switch.
- 7:10Speaker 2: So if IPv four addresses are all gone, how's the
- 7:13Speaker 2: Internet still running predominantly on it?
- 7:15Speaker 1: One beautiful beautiful hack Network Address translation or NAT.
- 7:19Speaker 2: Paired with private IP addressing exactly RC nineteen eighteen set
- 7:23Speaker 2: aside specific ranges of IPS that anyone can use inside
- 7:26Speaker 2: their private.
- 7:27Speaker 1: Network, the ones everyone recognizes. The Class C range starts
- 7:30Speaker 1: at one ninety two point one six eight point zero
- 7:33Speaker 1: point zero.
- 7:34Speaker 2: Or the Class A range, which starts at ten point
- 7:36Speaker 2: zero point zero. Your home or office network uses these
- 7:41Speaker 2: private IPS for all your devices.
- 7:43Speaker 1: And then the router uses NAT to translate all of
- 7:46Speaker 1: those private addresses into one single public IP address to talk.
- 7:50Speaker 2: To the Internet, and just like that, thousands of devices
- 7:52Speaker 2: can share one address.
- 7:53Speaker 1: It bought us decades an incredible fix. So we have
- 7:56Speaker 1: the map, we have the security gate, and we have
- 7:57Speaker 1: the address book. Let's finish up with the actionable security checklist.
- 8:01Speaker 2: Yeah, this is critical as a defender. Your job is
- 8:04Speaker 2: so hard. An attacker just needs to find one week.
- 8:07Speaker 1: Link one insecure protocol, just.
- 8:09Speaker 2: One, and there's still so many out there. So let's
- 8:11Speaker 2: just make a list of things you must retire.
- 8:13Speaker 1: Okay, Web traffic HTTPP plaintext.
- 8:16Speaker 2: Absolutely not. The mandatory replacement is HTTPS, and the.
- 8:19Speaker 1: S NHTTPS relies on a protocol it.
- 8:22Speaker 2: Does and that protocol must be TLS Transport Layer Security,
- 8:26Speaker 2: specifically version one point two or higher.
- 8:28Speaker 1: Not SSL.
- 8:29Speaker 2: No, if you see anything anywhere still using SSL, that
- 8:34Speaker 2: is a five alarm fire. All versions of SSL are broken,
- 8:38Speaker 2: vulnerable to attacks like poodlely it's deprecated.
- 8:40Speaker 1: Okay, what about remote administration logging into a router or
- 8:44Speaker 1: a switch tel Net?
- 8:46Speaker 2: Never Telnet sends your username and your password in plaintext
- 8:49Speaker 2: for anyone on the network to see. It is trivial
- 8:53Speaker 2: to sniff those credentials.
- 8:54Speaker 1: The replacement is non negotiable.
- 8:56Speaker 2: You must use SSH secure shell specifically as SH version.
- 9:00Speaker 1: Two, and the same goes for transferring files with FDP right.
- 9:03Speaker 2: Same exact problem. Plaintext credentials you have to use SFTP,
- 9:07Speaker 2: which is secure FTP because it runs over an SSH tunnel.
- 9:10Speaker 1: It extends to everything email.
- 9:12Speaker 2: Use the secure versions POP three, s IPS Network Monitoring
- 9:16Speaker 2: SNMP version three, Versions one and two have major security flaws.
- 9:20Speaker 2: Avoid them completely.
- 9:21Speaker 1: That was a pretty complete journey. We covered the seven
- 9:24Speaker 1: layer osimapp, the triple A security gate, the IP address book,
- 9:28Speaker 1: and the essential protocols to lock it all down.
- 9:31Speaker 2: It's a lot, but it's all connected.
- 9:33Speaker 1: So to help lock this in, let's pose a scenario
- 9:35Speaker 1: for you listening.
- 9:36Speaker 2: Okay, Imagine you are asked to remotely configure a brand
- 9:39Speaker 2: new network router, but the only access tool they give
- 9:42Speaker 2: you is telnet. What foundational security flawed does that immediately expose?
- 9:47Speaker 2: And what is the mandatory secure alternative you have to
- 9:50Speaker 2: insist on using.
- 9:51Speaker 1: That plaintext credential exposure is the giveaway? Of course, the
- 9:54Speaker 1: only right answer is SSH version two. Now, for one
- 9:57Speaker 1: final thought to leave you with, we talked about a
- 9:59Speaker 1: layer four, that transport layer, and that critical choice between
- 10:02Speaker 1: TCP and UDP.
- 10:04Speaker 2: Right reliability versus speed.
- 10:06Speaker 1: So here's the question. Given that TCP has to complete
- 10:09Speaker 1: its handshakes and reliability checks, how am I choosing UDP
- 10:12Speaker 1: for a critical system, even with the risk of dropping
- 10:14Speaker 1: packets actually be a calculated trade off that improves security
- 10:18Speaker 1: by mitigating certain kinds of denial of service attacks.
- 10:21Speaker 2: Something to think about as you design your next system.