Latest / CyberSecurity Summary / Linux: Linux Security and Administration
Transcript
- 0:00Speaker 1: Welcome back to the deep dive. We sort through well
- 0:03Speaker 1: all the noise to bring you insights that really help
- 0:05Speaker 1: you get properly informed. Today we're taking a journey into
- 0:09Speaker 1: the world of Linux. Maybe you've heard about it, seen
- 0:11Speaker 1: it around, maybe even you know tinkered a bit yourself.
- 0:14Speaker 1: But have you ever thought about how to not just
- 0:17Speaker 1: use it, but how to really secure it, like build
- 0:20Speaker 1: an ironclad digital fortress. That's what we're diving into today.
- 0:24Speaker 2: It's a really vital question actually, and it unlocks I think,
- 0:28Speaker 2: the true potential of Linux. I mean, it's incredibly adaptable,
- 0:31Speaker 2: very powerful, but because it's so open, you have to
- 0:34Speaker 2: understand its security. It's not optional. Really. The source material
- 0:38Speaker 2: we're looking at is pretty comprehensive, a great guide. It
- 0:42Speaker 2: takes us right from the first boot up through to
- 0:44Speaker 2: some quiet advanced stuff.
- 0:45Speaker 1: It's a good roadmap for us absolutely. So the plan
- 0:48Speaker 1: for you, the learner listening in, it's kind of three stages. First,
- 0:52Speaker 1: we'll look at the safest way to even get started
- 0:54Speaker 1: with Linux, no risks. Then we'll dig into the basic
- 0:58Speaker 1: security stuff you absolutely need to know keep thinks safe.
- 1:01Speaker 1: And finally we'll get a little peak behind the curtain.
- 1:03Speaker 1: See how the pros, the security experts actually test these systems,
- 1:07Speaker 1: look for weaknesses, goals for you to leave with some clear,
- 1:11Speaker 1: actionable ideas. Feel confident you know, ready for your Linux adventure. Okay,
- 1:16Speaker 1: let's unpack this first bit. Then imagine your Linux curious, right,
- 1:21Speaker 1: you want to try it, maybe a specific version or
- 1:23Speaker 1: just experiment, but you definitely don't want to mess up
- 1:26Speaker 1: your Windows machine or your Mac, your daily driver. Understandable.
- 1:30Speaker 1: This is exactly where virtual machines vms they become your
- 1:33Speaker 1: best friend. Think of a VM as like a whole
- 1:36Speaker 1: separate computer, but it runs inside your actual computer like
- 1:39Speaker 1: a digital sandbox, exactly a sandbox. You can play, experiment,
- 1:43Speaker 1: break things even, and your main system is totally untouched.
- 1:46Speaker 1: The only real limit as well your actual hardware. You
- 1:48Speaker 1: can't give the VM more memory than your PC physically has.
- 1:51Speaker 2: Right, Right, And that's the beauty of using vms for
- 1:54Speaker 2: trying Linux. It's safe, it's easy. You totally avoid dealing
- 1:57Speaker 2: with dual booting, which, let's be honest, can be a
- 2:00Speaker 2: real pain, especially for newcomers. Sometimes it can even mess
- 2:03Speaker 2: things up. There are tools like VMware workstation Player. It's
- 2:07Speaker 2: free for personal use, really accessible, pretty much. The only
- 2:11Speaker 2: thing you need is a CPU, a processor that supports virtualization.
- 2:14Speaker 2: Most modern ones do. Usually it's on by default.
- 2:17Speaker 1: Okay, so you've got your virtual sandbox all set up,
- 2:20Speaker 1: easy enough, but then you hit this wall of choice
- 2:24Speaker 1: Linux distributions or distribus. It feels like there are hundreds,
- 2:28Speaker 1: not just one Linux.
- 2:29Speaker 2: No, there are many hundreds.
- 2:30Speaker 1: Yeah, and for someone new, it's like looking at this
- 2:33Speaker 1: huge menu. Right, everything looks interesting, but you've no idea
- 2:36Speaker 1: what to order. So how do you choose, especially if
- 2:40Speaker 1: you're just starting out. What's the secret?
- 2:42Speaker 2: That's a great question, and it really just comes down
- 2:44Speaker 2: to what do you want to do. Think of distros
- 2:46Speaker 2: as different flavors, maybe different car models. Each one's tuned
- 2:50Speaker 2: for something specific. You've got Ubuntu, which is kind of
- 2:53Speaker 2: the reliable all rounder, good for general use, pretty easy
- 2:56Speaker 2: to get started.
- 2:56Speaker 1: With, Okay, like in Toyota Cari of Linux.
- 2:59Speaker 2: Oh yeah that. Then if you're a gamer, maybe steam
- 3:02Speaker 2: Os makes sense. It's built for that. Got the laptop
- 3:05Speaker 2: you want to revive? Linux Light is super lightweight. Then
- 3:08Speaker 2: you get into the specialists Qubes, I mean that's for
- 3:11Speaker 2: extreme security. Nuts creates totally separate boxes for everything you do.
- 3:15Speaker 1: Right.
- 3:15Speaker 2: And for folks interested in security itself, like testing and whatnot,
- 3:20Speaker 2: there's Collie Linux. It's like a digital Swiss Army knife
- 3:23Speaker 2: packed with security tools.
- 3:24Speaker 1: There hundreds of them apparently, yeah, over.
- 3:26Speaker 2: Four hundred last I checked. So the key is figure
- 3:29Speaker 2: out your goal, is it gaming, battery life, learning, security?
- 3:33Speaker 2: And pick a distro that fits just a one small note.
- 3:38Speaker 2: Some distros, like the ones for tiny computers like the
- 3:40Speaker 2: Raspberry Pie, they use different processor types arm Usually those
- 3:44Speaker 2: won't run easily on your typical laptop.
- 3:46Speaker 1: VM, gotcha, pick the right tool for the job. Yeah,
- 3:49Speaker 1: makes sense. Okay, so you've picked your distro, it's running
- 3:51Speaker 1: in the VM. Now we hit like the first real
- 3:54Speaker 1: security thing. Yeah, user accounts for building this digital fortress.
- 3:58Speaker 1: Who gets the master key? Right? Who's in charge?
- 4:00Speaker 2: Precisely? And this brings us straight to probably the single
- 4:04Speaker 2: most important rule in Linux security. Never ever log in
- 4:08Speaker 2: as the root user for your normal day to day stuff.
- 4:11Speaker 1: Just don't. Okay, why is it so bad? I mean
- 4:13Speaker 1: Windows has administrator.
- 4:14Speaker 2: Accounts, it's different. The root user in Linux is well,
- 4:18Speaker 2: it's god mode absolute power. Windows has that User account
- 4:21Speaker 2: control UAC, that little pop up asking are you sure
- 4:24Speaker 2: before big changes, annoying, pop up annoying maybe, but it's
- 4:27Speaker 2: a safety net. Root in Linux by default doesn't have that.
- 4:31Speaker 2: If you're logged in as root and you make one
- 4:33Speaker 2: typo or run some dodgy script by accident, it can
- 4:35Speaker 2: wipe your entire system, no questions asked. It has complete
- 4:39Speaker 2: total control.
- 4:39Speaker 1: Hikes. Okay, that is a big difference, a potential disaster.
- 4:42Speaker 1: Like you said, so if root is this like loaded weapon,
- 4:46Speaker 1: what's the safe way? How do we actually do admin
- 4:48Speaker 1: things without risking blowing everything up.
- 4:50Speaker 2: The safe way, and honestly, the standard way is using
- 4:53Speaker 2: pseudo accounts. Think of pseudo it stands for super rousers
- 4:56Speaker 2: do think of it as a very controlled loan of
- 4:59Speaker 2: the master key in lots of distress. Now, like Abuntu,
- 5:03Speaker 2: the actual root account is locked by default. You can't
- 5:06Speaker 2: even log into it directly.
- 5:07Speaker 1: Oh really okay?
- 5:08Speaker 2: Yeah. Instead you have your normal user account, and when
- 5:11Speaker 2: you need to do something administrative like install software or
- 5:14Speaker 2: change a setting, you just type pseudo before the command
- 5:17Speaker 2: pseudo app get update or whatever. It asks for your
- 5:21Speaker 2: user password, not the root password. If you get it right,
- 5:25Speaker 2: it grants you root powers, but only for that one
- 5:28Speaker 2: single command. Then it takes the power away again.
- 5:31Speaker 1: Ah okay, so it's like you borrow the master key
- 5:33Speaker 1: for one specific lock, use it, and immediately end it.
- 5:36Speaker 2: Back exactly that. It's temporary specific elevation of privileges.
- 5:40Speaker 1: Which means if I accidentally run something nasty or make
- 5:44Speaker 1: that typo.
- 5:44Speaker 2: The damage is limited. It can only mess with things
- 5:47Speaker 2: your normal user account has access to, like your own
- 5:50Speaker 2: files and your home folder.
- 5:51Speaker 1: It couldn't say, delete the entire operating.
- 5:53Speaker 2: System, not unless you specifically told it to. With Pseudo,
- 5:57Speaker 2: but yeah, a random malicious script running as your user
- 6:00Speaker 2: such less dangerous than if it ran as root and
- 6:03Speaker 2: modern Linux it takes us even further. There are systems
- 6:06Speaker 2: like policy Kit. If Pseudo is borrowing the master key
- 6:09Speaker 2: for a command, policy Kit is even more specific. It's
- 6:12Speaker 2: like giving a mechanic a key that only starts the
- 6:14Speaker 2: engine diagnostics, not the whole car.
- 6:18Speaker 1: Okay, more fine grained.
- 6:19Speaker 2: Very fine grained. It lets specific applications, or even just
- 6:22Speaker 2: parts of applications get the permissions they need only when
- 6:25Speaker 2: they need them, minimizes the risk even more so. Building
- 6:30Speaker 2: on that, there are a few key user management things
- 6:32Speaker 2: you absolutely should do first. Adding users is simple. It's
- 6:35Speaker 2: usually a doucer username, then password username to set their password.
- 6:39Speaker 1: Basic stuff. Okay, but here's.
- 6:41Speaker 2: Where the security really kicks in remote access. If you're
- 6:45Speaker 2: allowing people to log in over the network using SSH,
- 6:48Speaker 2: you must disable root log in via SSH. Absolutely critical.
- 6:52Speaker 1: Why is that so critical?
- 6:53Speaker 2: Think about it. Every attacker on the planet knows a
- 6:56Speaker 2: user named root exists on Linux systems.
- 6:58Speaker 1: It's a default. Ah, right, Half the puzzle already solved
- 7:01Speaker 1: for them.
- 7:01Speaker 2: Exactly. They only need to guess the password. But if
- 7:04Speaker 2: you disable root log in, they have to guess a
- 7:06Speaker 2: valid user name A and D the password much much harder.
- 7:10Speaker 2: You do this in the SSH canfig file usually etceter
- 7:13Speaker 2: shyest config. Just find the line permit root log in
- 7:16Speaker 2: and set it to now.
- 7:18Speaker 1: Simple change, big impact. Okay, what about the passwords themselves?
- 7:22Speaker 1: People are terrible.
- 7:23Speaker 2: At passwords, terribly predictable. Yeah, which is why you need
- 7:26Speaker 2: strong password policies. Linux uses something called PAM pluggable authentication modules.
- 7:31Speaker 2: Think of PAM as the rulebook for logging in. And
- 7:35Speaker 2: there's a module pam cracklib that lets you enforce password.
- 7:38Speaker 1: Rules like length and complexity Exactly.
- 7:40Speaker 2: You can force a minimum length, say eight characters, are
- 7:43Speaker 2: more require uppercase, lowercase numbers, symbols. You can even stop
- 7:47Speaker 2: people reusing their last few passwords. That's good. Yeah, you
- 7:49Speaker 2: can figure it, and the system just won't accept weak
- 7:51Speaker 2: passwords anymore. It forces users to be more secure. And
- 7:55Speaker 2: one more SSH s trick. You can restrict SSH access
- 7:59Speaker 2: to specific groups. So instead of letting any user on
- 8:01Speaker 2: the system try to SSH in, you create a group,
- 8:04Speaker 2: say schuizers, add only the people who need remote access.
- 8:07Speaker 1: To that group, and tell SSH to only allow logins
- 8:10Speaker 1: from that group precisely.
- 8:12Speaker 2: Yeah, in the shotcunfig file again, you add a line
- 8:14Speaker 2: like allow groups, Soelzers boom. Anyone else trying to log
- 8:17Speaker 2: in remotely gets rejected instantly cuts down massively on brute
- 8:21Speaker 2: force attempts.
- 8:22Speaker 1: Wow. Okay, So taking all this together, what does it
- 8:25Speaker 1: really mean for someone managing the Linux box, whether it's
- 8:27Speaker 1: just their laptop or.
- 8:28Speaker 2: A whole server means These aren't just you know, technical tweaks.
- 8:32Speaker 2: They're fundamental. It's about accountability, knowing who did what. It's
- 8:37Speaker 2: about limiting the blast radius if something goes wrong accidentally
- 8:41Speaker 2: or maliciously. It makes the whole system way more robust,
- 8:44Speaker 2: much harder to compromise. It's like building that fortress with
- 8:47Speaker 2: a trusted crew and making sure everyone only has the
- 8:50Speaker 2: keys they absolutely need, right, A.
- 8:51Speaker 1: Trusted crew, limited keys. I like that. Okay, so we've
- 8:55Speaker 1: got our crew sorted, keys managed. But even the best
- 8:58Speaker 1: crew needs like a strong outer wall.
- 9:00Speaker 3: Right.
- 9:00Speaker 1: Let's talk firewalls. Server. Firewalls the gatekeeper for network traffic
- 9:05Speaker 1: crucial air. So I think of it like the security
- 9:09Speaker 1: checkpoint at a border crossing. It checks everything coming in
- 9:12Speaker 1: that's ingress traffic and everything going out egress. Good analogy,
- 9:17Speaker 1: And when we talk firewalls, we always hear about ports.
- 9:20Speaker 1: These aren't physical things like USB ports, right, They're more
- 9:22Speaker 1: like numbered lanes.
- 9:24Speaker 2: Or docks exactly. They're virtual pathways in the operating system,
- 9:28Speaker 2: different lanes for different types of traffic, like web traffic.
- 9:31Speaker 2: Standard HTTP usually expects to arrive on port eighty. Secure
- 9:36Speaker 2: web traffic HGTPS uses port four four to.
- 9:39Speaker 1: Three, and SSH you mentioned is port twenty two.
- 9:41Speaker 2: Right, So if you try to send, say, web traffic
- 9:44Speaker 2: to port seventy nine, the system's just like, nope, nothing
- 9:46Speaker 2: here for that. There's no service listening on that port number.
- 9:49Speaker 1: Okay, So the firewall manages which of these lanes are
- 9:52Speaker 1: open or closed.
- 9:53Speaker 2: Precisely, and on many modern Linux systems, firewall cmd is
- 9:57Speaker 2: the tool you use to talk to the firewall. The
- 9:59Speaker 2: absolute core principle, the Golden rule is block everything by default.
- 10:03Speaker 2: Start with all lanes closed, everything incoming.
- 10:06Speaker 1: Yeah.
- 10:07Speaker 2: Then you very deliberately open only the specific lanes the
- 10:10Speaker 2: ports that you absolutely need for your services to work.
- 10:14Speaker 1: Okay, So you minimize the attack surface right from the
- 10:16Speaker 1: start exactly.
- 10:17Speaker 2: Less open doors, less chance for unwanted guests. Firewalls also
- 10:21Speaker 2: often use zones. Think of them as preset rule collections,
- 10:25Speaker 2: like public, work, Home. Each zone has different default rules.
- 10:30Speaker 2: Public is usually very restrictive. Home might be more trusting.
- 10:34Speaker 2: You apply a zone to your network connection so you can.
- 10:36Speaker 1: Quickly switch between security levels depending.
- 10:38Speaker 2: On where you are kind of yeah, or just apply
- 10:41Speaker 2: the right level of strictness from the start, and practically speaking,
- 10:44Speaker 2: adding rules is straightforward. You might do ad service HTTP
- 10:47Speaker 2: permanent to allow web traffic through. The permanent makes the
- 10:50Speaker 2: change stick after a reboot.
- 10:52Speaker 1: Or if you have a custom application, you can open.
- 10:54Speaker 2: A specific port number like adport once into two to
- 10:57Speaker 2: two TCP permanent if your app uses TCP ports. In
- 11:00Speaker 2: teen twenty two. The power is in being explicit about
- 11:02Speaker 2: what you allow in. You make conscious choices.
- 11:04Speaker 1: And it sounds like firewall CND gives you a lot
- 11:07Speaker 1: of control. You mentioned zones, services, specific ports. Can you
- 11:11Speaker 1: get even more granular?
- 11:12Speaker 2: Oh? Yeah, you can get really specific. You can block
- 11:15Speaker 2: things like ICMP echo requests. That's the PIN command uses
- 11:19Speaker 2: if you want.
- 11:20Speaker 1: To be stuff, make the server invisible to basic scams.
- 11:23Speaker 2: Sort of yeah. Or you can set up rules to
- 11:26Speaker 2: only allow traffic from specific trusted IP addresses, like saying,
- 11:30Speaker 2: only allow SSH connections from this specific office network.
- 11:33Speaker 1: Okay, that's powerful. It's like having a security guard who
- 11:36Speaker 1: not only checks IDs, but has a very specific guest
- 11:39Speaker 1: list and knows who's definitely not allowed in exactly.
- 11:42Speaker 2: It's about layers of control. Okay, So moving beyond that
- 11:45Speaker 2: immediate network gate the firewall, we need to think about
- 11:49Speaker 2: hardening the server itself and also protecting the data with encryption.
- 11:53Speaker 2: These are the deeper foundations, maybe the internal vaults in
- 11:56Speaker 2: our fortress analogy.
- 11:57Speaker 1: Right, This stuff inside the walls first.
- 11:59Speaker 2: And this sounds basic, but it's so important. Regular updates
- 12:02Speaker 2: keep your system patched. That simple app get update and
- 12:05Speaker 2: an app get upgrade command or whatever your district uses.
- 12:08Speaker 1: The an F update on fedor sent to S.
- 12:10Speaker 2: Right, it's not just about new features. It's mainly about
- 12:13Speaker 2: fixing security holes that attackers are actively looking for. You
- 12:17Speaker 2: have to keep it updated, non negotiable.
- 12:19Speaker 1: Okay, what else you mentioned SSH earlier?
- 12:22Speaker 2: Yes, for logins, SSH keys are way more secure than passwords.
- 12:27Speaker 2: Instead of typing a password that could be guessed or cracked,
- 12:30Speaker 2: you use a pair of cryptographic keys, one private kept
- 12:34Speaker 2: secret on your machine, one public copied to the server.
- 12:37Speaker 1: How do you set that up?
- 12:38Speaker 2: Usually have stitsch again to create the keys, then stretch
- 12:41Speaker 2: copy aid to securely copy the public key over. Once
- 12:44Speaker 2: it's set up, you can log in without a password,
- 12:46Speaker 2: but it's based on proving you possess the private key.
- 12:49Speaker 1: Much stronger, nice, passwordless, but more secure. I like it?
- 12:53Speaker 1: And what about adding another layer?
- 12:55Speaker 2: Two factor authentication to FA Absolutely Even if someone somehow
- 12:59Speaker 2: steals you your sshkey or your password, they still need
- 13:02Speaker 2: that second factor, usually a code from an app on
- 13:04Speaker 2: your phone, like Google Authenticator or offee. There are PAM
- 13:07Speaker 2: modules for this too, like limpam Google Authenticator that make
- 13:10Speaker 2: it relatively easy to add two FA to SSH logins
- 13:14Speaker 2: on Linux.
- 13:14Speaker 1: Extra hoop for attackers to jump through. Good.
- 13:17Speaker 2: Then there's something called Sylinic Security Enhanced Linux or a PARMER,
- 13:21Speaker 2: which is similar. This is well, it's a powerful deeper layer.
- 13:25Speaker 2: It uses Mandatory Access Control MC.
- 13:28Speaker 1: Mandatory access control.
- 13:29Speaker 2: So standard Linux security is discretionary access control DAC user's
- 13:34Speaker 2: own files and can decide who gets access MC is different.
- 13:38Speaker 2: Sylinics applies system wide security policies that even the root
- 13:42Speaker 2: user can't easily override. It watches every process and file
- 13:46Speaker 2: access and enforces strict rules about what's allowed to interact
- 13:49Speaker 2: with what like an.
- 13:50Speaker 1: Internal affairs division for the operating system huh yeah, kind of.
- 13:54Speaker 2: It has modes like permissive where it just logs violations
- 13:57Speaker 2: and enforcing, where it actively blocks things that the rules.
- 14:00Speaker 2: It can be complex to manage, but it adds a
- 14:02Speaker 2: huge amount of security if configured properly.
- 14:05Speaker 1: Okay, sounds heavy duty.
- 14:06Speaker 2: It is then something a bit more practical for dealing
- 14:10Speaker 2: with those log in attempts we talked about fail to ban.
- 14:12Speaker 2: This is a great little tool. It watches system logs
- 14:15Speaker 2: like your SSH log in attempts. If it sees the
- 14:18Speaker 2: same IP address failing to log in multiple times within
- 14:21Speaker 2: a short period.
- 14:21Speaker 1: It assumes it's a brute force attack.
- 14:23Speaker 2: Exactly, and it automatically updates your firewall rules to just
- 14:26Speaker 2: block that IP address entirely for set amount.
- 14:29Speaker 1: Of time, so it slams the door shut on them automatically.
- 14:31Speaker 2: Pretty much. You can configure how many tries they get
- 14:34Speaker 2: max retree and how long they get banned ban time.
- 14:36Speaker 2: Very effective against noisy, persistent attackers.
- 14:39Speaker 1: Okay, wow, updates keys two fa Sylenix failed to ban.
- 14:45Speaker 1: That's quite a list for hardening. What about the absolute
- 14:48Speaker 1: last resort? If everything fails?
- 14:50Speaker 2: Backups? You absolutely must have a solid backup strategy. The
- 14:54Speaker 2: gold standard is the three to two to one backup rule.
- 14:56Speaker 1: Three two to one.
- 14:57Speaker 2: What's that Three copies of your important data on at
- 15:00Speaker 2: least two different types of storage media, and critically, at
- 15:03Speaker 2: least one of those copies must be off site, off.
- 15:06Speaker 1: Site like physically somewhere else or in the cloud.
- 15:09Speaker 2: Either physically separate is best against things like fire or theft.
- 15:12Speaker 2: Cloud works too. The point is, if your main location
- 15:15Speaker 2: is compromised or destroyed, you still have a recoverable copy elsewhere.
- 15:19Speaker 2: It's your ultimate safety net.
- 15:21Speaker 1: Makes total sense. Okay, so that covers hardening the server
- 15:24Speaker 1: but what about the actual data sitting on the hard
- 15:27Speaker 1: drives inside those vaults. How do we protect that if someone, say,
- 15:31Speaker 1: steals the server or pulls the drive.
- 15:33Speaker 2: Yeah, good question. That's where encryption comes in, specifically encryption
- 15:37Speaker 2: at rest. Linux supports various ways to encrypt things. Passwords
- 15:41Speaker 2: stored by the system are hashed using strong algorithms. Communications
- 15:45Speaker 2: can be secured with things like pgp SSLTLS for websites,
- 15:48Speaker 2: and SSH itself encrypts the connection right data in transit exactly.
- 15:54Speaker 2: But for data at rest, the files sitting on the disc,
- 15:56Speaker 2: you need tools like gm MPG for encrypting individual files
- 16:00Speaker 2: or very crypt for creating encrypted containers or drives. But
- 16:04Speaker 2: the real standard for Linux disc encryption is crypt setup,
- 16:07Speaker 2: usually using the LAKS standard Linux Unified.
- 16:10Speaker 1: Key Setup LUKS. Okay, what does that do?
- 16:12Speaker 2: LUKS lets you encrypt entire hard drive partitions or even
- 16:15Speaker 2: the swap space where temporary data might be stored. When
- 16:18Speaker 2: the system boots, you have to enter a passphrase to
- 16:20Speaker 2: unlock the encrypted volume. Without that passphrase, the data on
- 16:23Speaker 2: the drive is just complete gibberish, unreadable.
- 16:26Speaker 1: So even if someone physically steals the.
- 16:28Speaker 2: Hard drive, the data is useless. To them without the key.
- 16:31Speaker 2: It's a critical layer for protecting sensitive information. If the
- 16:35Speaker 2: physical hardware is compromised, it turns your data into an
- 16:39Speaker 2: indecipherable block.
- 16:40Speaker 1: Wow. Okay, that's incredibly important. Encryption at rest with luks.
- 16:47Speaker 2: Got it all? Right? So we've spent a lot of
- 16:50Speaker 2: time talking about building this really impressive digital fortress, right
- 16:55Speaker 2: user accounts, firewalls, hardening the server itself, encrypting the data.
- 16:59Speaker 2: But how do you know? How do you know if
- 17:01Speaker 2: all that work actually holds up against someone trying to
- 17:03Speaker 2: get in? Ah?
- 17:04Speaker 1: The million dollar question.
- 17:05Speaker 2: This brings us to the flip side, the world of
- 17:08Speaker 2: penetration testing or pen.
- 17:10Speaker 1: Testing offensive security, and the go to tool for this.
- 17:13Speaker 2: The district you mentioned earlier is Collie Linux. This specialized toolkit.
- 17:17Speaker 1: That's the one it comes pre loaded with. Yeah, hundreds
- 17:19Speaker 1: of tools designed specifically for testing security, finding vulnerabilities.
- 17:23Speaker 2: So how do the pros actually use this stuff? Is
- 17:25Speaker 2: it just randomly trying tools? Oh? No, not at all.
- 17:27Speaker 2: There's a methodology, a structure. It's often called the penetration
- 17:32Speaker 2: testing life cycle, usually described in five stages. You can
- 17:35Speaker 2: think of it like a military operation, almost scouting and
- 17:39Speaker 2: then engaging a target.
- 17:41Speaker 1: Okay, lay it out for us. Stage one.
- 17:43Speaker 2: Stage one is reconnaissance. Recon just like scouting enemy territory.
- 17:47Speaker 2: You're gathering information about your target anything you can find publicly, websites,
- 17:52Speaker 2: employee names, technologies they use, maybe even some non public
- 17:56Speaker 2: info if you can get it ethically. It's about understanding
- 17:59Speaker 2: the landscape, building intel.
- 18:01Speaker 1: Okay. Stage two.
- 18:03Speaker 2: Stage two is scanning. Now you start actively probing the target,
- 18:07Speaker 2: using tools to find out which computers are actually online,
- 18:10Speaker 2: what ports are open on those machines, what services are
- 18:13Speaker 2: running on those ports, maybe even what operating system they're using.
- 18:16Speaker 1: Like that scout reporting back with a detailed map of
- 18:19Speaker 1: the enemy camp. There's a guard tower here, barracks there.
- 18:22Speaker 2: Exactly like that. You're building a technical blueprint.
- 18:24Speaker 1: Of their defenses. Got it? Stage three.
- 18:27Speaker 2: Stage three is exploitation or gaining access. This is where
- 18:31Speaker 2: you take the information from scanning and try to actually
- 18:35Speaker 2: use a vulnerability to get inside. Maybe there's an old
- 18:38Speaker 2: unpatched service running, or a week password you discovered. You
- 18:42Speaker 2: try to leverage that weakness to gain unauthorized access.
- 18:46Speaker 1: Finding the open door, climbing the weak wall right.
- 18:49Speaker 2: Stage four is maintaining access once you're in You often
- 18:52Speaker 2: want to make sure you can get back in later,
- 18:53Speaker 2: so you might install some kind of persistent backdoor or
- 18:56Speaker 2: create another user account.
- 18:58Speaker 1: The goals to maintain your foothold, and the final stage.
- 19:02Speaker 2: Stage five reporting. This is absolutely critical, especially for professional
- 19:06Speaker 2: pent testers. You have to document everything you did, how
- 19:09Speaker 2: you got in, what vulnerabilities you used, what data you
- 19:11Speaker 2: could access, the potential impact, and crucially you provide recommendations
- 19:15Speaker 2: on how to fix the weaknesses you found. It's the
- 19:17Speaker 2: debriefing after the mission, telling the defenders how to strengthen
- 19:20Speaker 2: their walls.
- 19:21Speaker 1: That makes perfect sense, a structured approach. And just to
- 19:24Speaker 1: give people a taste that scanning stage stage two where
- 19:27Speaker 1: you're building the blueprint. What were some common tools used
- 19:31Speaker 1: there besides Collie itself?
- 19:33Speaker 2: Sure, well, the simplest is probably PA just sends a
- 19:36Speaker 2: little packet to see if a machine replies, is it
- 19:38Speaker 2: even online? Basic check?
- 19:40Speaker 1: Okay, simple but useful. Then there's trace route or tracert
- 19:43Speaker 1: on Windows. This maps out the network path between you
- 19:47Speaker 1: and the target. It shows you all the routers, the
- 19:49Speaker 1: hops your data goes through to get there, gives you
- 19:52Speaker 1: an idea of the network layout.
- 19:54Speaker 2: Like following the roads on a map.
- 19:56Speaker 1: Exactly. But the real powerhouse, the king of network scanner
- 20:00Speaker 1: is NMP Network.
- 20:02Speaker 2: Mapper ah n MAP heard of that one.
- 20:05Speaker 1: It's incredibly versatile. It can do way more than just
- 20:07Speaker 1: PA and D. It can scan a whole range of
- 20:08Speaker 1: IP addresses, find all the open ports on each live host,
- 20:12Speaker 1: tell you what service it thinks is running on each port,
- 20:14Speaker 1: like web server, SSH database, and it can even make
- 20:18Speaker 1: a pretty good guess at the operating system the target
- 20:21Speaker 1: is running. It uses various techniques to figure this out.
- 20:24Speaker 2: Wow, So it's like x ray vision for the network
- 20:26Speaker 2: pretty much.
- 20:27Speaker 1: Yeah.
- 20:27Speaker 2: It can even adjust how noisy or sneaky it is.
- 20:30Speaker 2: There are timing options like Mattish T zero for paranoid,
- 20:33Speaker 2: which is super slow and stealthy, up to natash T
- 20:36Speaker 2: five for insane, which is really fast but very obvious.
- 20:40Speaker 1: So knowing these tools isn't just for attackers, right. Defenders
- 20:43Speaker 1: need to know what they look like from the outside.
- 20:45Speaker 2: Absolutely. You run these scans against your own systems to
- 20:48Speaker 2: see what an attacker would see. It's part of validating
- 20:51Speaker 2: your defenses. So you see, we've kind of covered the
- 20:53Speaker 2: whole spectrum today, haven't. We started with just safely getting
- 20:57Speaker 2: Linux running in a VM, then move through locking down users,
- 21:01Speaker 2: building firewalls, hardening the server, encrypting data, and then finally
- 21:05Speaker 2: looking at how those defenses are actually tested using these
- 21:08Speaker 2: pen testing techniques. The real power here, I think, is
- 21:11Speaker 2: that Lenux gives you this incredible adaptability and all these
- 21:14Speaker 2: tools to build and manage really secure systems yourself.
- 21:17Speaker 1: Yeah.
- 21:18Speaker 3: Absolutely, it's clear. It's not just one thing. Is that,
- 21:19Speaker 3: it's layers understanding who can log in, what traffic gets
- 21:23Speaker 3: through the firewall, how the data itself is protected, and
- 21:26Speaker 3: then crucially knowing how to text all that it all
- 21:28Speaker 3: works together as a strategy. It's definitely not just about
- 21:31Speaker 3: having one strong lock on the front door. It's the
- 21:33Speaker 3: whole system. So here's maybe a thought to leave you
- 21:37Speaker 3: with today as you go about your digital life in
- 21:40Speaker 3: this world is getting more complex online all the time.
- 21:42Speaker 3: Knowing how to build security and how to test it
- 21:45Speaker 3: isn't really just for the IT pros anymore, is it.
- 21:48Speaker 3: So think about this, What vulnerability might you know unknowingly
- 21:52Speaker 3: be exposing right now? Could be something simple like a
- 21:55Speaker 3: week password on an important account, or maybe an open
- 21:58Speaker 3: port on your home router you didn't know, And based
- 22:01Speaker 3: on what we've talked about today. What's maybe the simplest,
- 22:03Speaker 3: most impactful first step you could take to start shoring
- 22:06Speaker 3: that up. Just one thing to make yourself a little
- 22:08Speaker 3: bit safer we're thinking about anyway. Thank you for joining
- 22:11Speaker 3: us on this deep dive into Linux security. Hope you
- 22:13Speaker 3: found it useful and we invite you to keep learning