Latest / CyberCode Academy / Course 30 - Practical Malware Development - Beginner Level | Episode 4: Building a Secure Web Control Panel: Database Infrastructure
Transcript
- 0:00Speaker 1: So have you ever wondered how cybersecurity professionals, or even
- 0:05Speaker 1: just system administrators build those massive nerve centers for their operation?
- 0:10Speaker 2: Right? The can you see in movies where it's just
- 0:12Speaker 2: you know, screens flashing with data everywhere?
- 0:15Speaker 1: Exactly? It looks like this high budget movie magic, right Ye,
- 0:18Speaker 1: a control panel managing everything from regular web users to
- 0:23Speaker 1: connected clients, which in ethical hacking we often just call victims.
- 0:29Speaker 2: Yeah, but the funny thing is that commanded control panel
- 0:32Speaker 2: isn't built with some kind of impossible proprietary supercode.
- 0:35Speaker 1: No, it's really not. It's built on the exact same
- 0:38Speaker 1: fundamental web technologies that power like your local bakery's website
- 0:42Speaker 1: or standard blog.
- 0:43Speaker 2: It's all the same building blocks exactly.
- 0:45Speaker 1: So in today's deep dive, that is our mission. We
- 0:48Speaker 1: are going to give you an audio guided masterclass in
- 0:51Speaker 1: building a web based control panel from absolute scratch.
- 0:54Speaker 2: We're going to do it all in your head, no
- 0:56Speaker 2: screens required, right.
- 0:57Speaker 1: We're going to walk you step by step through the
- 0:59Speaker 1: architecture or the logic, the code you'll visualize the whole thing, and.
- 1:02Speaker 2: Our roadmap for this is pretty straightforward. We'll lay the
- 1:05Speaker 2: foundation with a mycole database build a secure bridge using PHP,
- 1:10Speaker 2: and then finally design.
- 1:11Speaker 1: The gatekeeper, the secure login portal, right to keep the
- 1:14Speaker 1: unauthorized folks out.
- 1:16Speaker 2: Exactly. It's a fascinating exercise, really just stripping away the
- 1:20Speaker 2: mystique of complex systems.
- 1:21Speaker 1: Because once you grasp how it's constructed, you immediately understand
- 1:25Speaker 1: where the vulnerabilities are.
- 1:26Speaker 2: Absolutely, you see the cracks in the armor.
- 1:28Speaker 1: So let's start with that foundation. Before we can build
- 1:30Speaker 1: any kind of web interface, we need a secure, organized
- 1:34Speaker 1: place to store data.
- 1:35Speaker 2: Right. You can't just dump incoming telemetry into a random
- 1:39Speaker 2: text file on a server.
- 1:40Speaker 1: That's a mess, a total mess. And that is where
- 1:43Speaker 1: the mysycle service comes in.
- 1:45Speaker 2: Yeah, you have to think of a relational database not
- 1:47Speaker 2: just as a storage bucket, but as a heavily guarded filing.
- 1:50Speaker 1: Room, a filing room with really strict rules, right Exactly.
- 1:53Speaker 2: It enforces strict rules about what kind of data goes
- 1:55Speaker 2: where and how those pieces relate to each other. But
- 2:00Speaker 2: before you can even build shells in that room, you
- 2:02Speaker 2: have to get.
- 2:02Speaker 1: Past the warden the authentication, which, honestly, that initial setup
- 2:07Speaker 1: usually trips people up when they're first designing system all
- 2:09Speaker 1: the time, Like you jump onto your command line to
- 2:11Speaker 1: start the my sqel service, and you have to log
- 2:14Speaker 1: in as the route user. But and this is a
- 2:16Speaker 1: big but, this is the database route user.
- 2:19Speaker 2: Right, which is entirely different from the local system route user.
- 2:22Speaker 1: Yes, could you break down why that distinction is so vital?
- 2:26Speaker 2: Well, it's basic system security. I mean, the local system
- 2:29Speaker 2: route user has absolute control over everything, the operating system,
- 2:33Speaker 2: the memory, the hardware, all of it, the keys to
- 2:36Speaker 2: the kingdom, right. But the mysequl route user, that account
- 2:40Speaker 2: is only the monarch of the database service. Operating systems
- 2:43Speaker 2: intentionally isolate services like this.
- 2:46Speaker 1: So if a hacker finds a vulnerability in the database
- 2:49Speaker 1: and takes over the my school route user, they're still
- 2:51Speaker 1: trapped inside the database's jurisdiction exactly.
- 2:54Speaker 2: They don't automatically get to control the whole server. So
- 2:57Speaker 2: you log into this specific database service using your local
- 3:00Speaker 2: cool host address, because the database and the web server
- 3:03Speaker 2: are living on the same machine.
- 3:05Speaker 1: Okay, so we bypass the warden. We execute a command
- 3:09Speaker 1: to create our new database and we'll just call it
- 3:12Speaker 1: control panel, simple and clean. Right, So we step inside
- 3:16Speaker 1: this empty database, and now we have to construct the
- 3:18Speaker 1: tables where the actual data will live.
- 3:20Speaker 2: The first table being the user's table.
- 3:22Speaker 1: Right, this is just for the administrators who will log
- 3:25Speaker 1: into the web interface. We set up three columns, an ID,
- 3:29Speaker 1: a username, and a password.
- 3:31Speaker 2: And that ID column is so foundational. We set it's
- 3:34Speaker 2: data type to an integer and tell it to auto increment.
- 3:37Speaker 1: You know, I always picture the ID column like taking
- 3:40Speaker 1: a ticket at a busy deli counter.
- 3:41Speaker 2: Oh that's a great analogy.
- 3:43Speaker 1: Right, Like, you walk in, you pull a ticket, and
- 3:45Speaker 1: you're assigned a sequential integer. Even if two customers have
- 3:48Speaker 1: the exact same first and last name, the deli counter
- 3:51Speaker 1: never confuses.
- 3:52Speaker 2: Them because their ticket numbers are distinct exactly.
- 3:55Speaker 1: That integer is our primary key, so no two rows
- 3:58Speaker 1: are ever confused.
- 3:59Speaker 2: Yeah, that's a perfect way to visualize it. But for
- 4:02Speaker 2: the username and password columns we use a different data type.
- 4:05Speaker 2: We use VarChar, specifically VarChar two fifty.
- 4:08Speaker 1: Five, which stands for variable character right, right, And when we.
- 4:11Speaker 2: Talk about building a system from the ground up, picking
- 4:14Speaker 2: the right data types matters immensely. The two fifty to
- 4:17Speaker 2: five just means that's the maximum number of characters allowed.
- 4:20Speaker 1: So wait, if a user picks a really short username,
- 4:24Speaker 1: like say, just five characters, what happens to the other
- 4:27Speaker 1: two hundred and fifty spaces we allocated.
- 4:29Speaker 2: Well, that's the beauty of the variable aspect. In older
- 4:32Speaker 2: database designs, they used fixed link fields. If you allocated
- 4:36Speaker 2: two hundred and fifty five spaces and only use five,
- 4:39Speaker 2: the database literally padded the rest with two hundred and
- 4:42Speaker 2: fifty empty.
- 4:42Speaker 1: Spaces, just totally wasting system memory exactly.
- 4:46Speaker 2: But VarChar dynamically shrinks the storage footprint on the hard
- 4:50Speaker 2: drive to match the exact length of the text you input,
- 4:53Speaker 2: plus like one extra byte to record the length.
- 4:56Speaker 1: Oh wow. So it's highly efficient for standard stuff like credentials,
- 4:59Speaker 1: very efficient. Okay, So that handles the administrators perfectly. But
- 5:02Speaker 1: to make this a real control center, we need a
- 5:04Speaker 1: separate architecture for the incoming data from the remote.
- 5:07Speaker 2: Machines right the connective clients.
- 5:09Speaker 1: So we build table number two, the victim's table, and
- 5:12Speaker 1: this one needs a lot more structure, eight columns in total.
- 5:15Speaker 2: Yeah, we start with our trustee auto incrementing id integery
- 5:18Speaker 2: again yep.
- 5:19Speaker 1: Then we have columns for host name, IP address, and
- 5:22Speaker 1: operating system and for all of those we just rely
- 5:25Speaker 1: on standard VarChar two fifty.
- 5:27Speaker 2: Five, which works perfectly for those.
- 5:29Speaker 1: But here's my question. If varshre is so mathematically efficient,
- 5:32Speaker 1: why don't we just use it for absolutely everything?
- 5:35Speaker 2: I see where you're going.
- 5:36Speaker 1: Like, we need a column called command to log the
- 5:38Speaker 1: remote instructions we send to these systems, right, why not
- 5:41Speaker 1: just use varcher for that?
- 5:42Speaker 2: This is where you really have to anticipate the absolute
- 5:46Speaker 2: chaos of the real world. Right. Varcher two fifty five
- 5:49Speaker 2: is perfect for predictable things. An IP address is never
- 5:52Speaker 2: going to be three hundred characters long, right, But a
- 5:54Speaker 2: remote execution command that could be a massive, multi line
- 5:59Speaker 2: shell script doesig to completely reconfigure a server.
- 6:02Speaker 1: Oh right, so it could be huge, huge.
- 6:04Speaker 2: Yeah. And if you try to shove a five hundred
- 6:06Speaker 2: character script into a two hundred and fifty five character
- 6:08Speaker 2: varchuer limit, the database just truncates the data. It literally
- 6:13Speaker 2: chops the command in half. Oh that's bad. Yeah. When
- 6:16Speaker 2: your system tries to retrieve and execute a chopped up script,
- 6:19Speaker 2: it either fails completely or worse, it executes unpredictably.
- 6:24Speaker 1: Yikes. So we have to step out of the varchart
- 6:27Speaker 1: constraints entirely for that column exactly.
- 6:30Speaker 2: We step up the data hierarchy to the text data
- 6:33Speaker 2: type Text is specifically designed for larger blocks of string data.
- 6:37Speaker 2: It easily handers tens of thousands of characters.
- 6:40Speaker 1: Okay, that covers the command going out, But what about
- 6:43Speaker 1: the data coming back. We need a final column called
- 6:46Speaker 1: command result to catch the output, and.
- 6:48Speaker 2: For this we need something even larger. We use long text.
- 6:51Speaker 1: Wait, really, is text not big enough?
- 6:53Speaker 2: Think about how systems behave when you query them. When
- 6:56Speaker 2: you send a command across the Internet, you're flying blind.
- 7:00Speaker 2: You have no idea how much data it's going to
- 7:02Speaker 2: spit back.
- 7:02Speaker 1: That's true.
- 7:03Speaker 2: If you send a command to say, list every single file,
- 7:06Speaker 2: directory and permission setting on an entire hard drive, the
- 7:09Speaker 2: output stream is going to be overwhelmingly large.
- 7:12Speaker 1: We're talking about gigabytes of raw text just flooding back
- 7:15Speaker 1: into our control panel.
- 7:16Speaker 2: Precisely. If you use standard text for that, your database
- 7:21Speaker 2: would instantly bottleneck and crash the second it hit the limit.
- 7:25Speaker 2: Long text can hold up to four gigabytes of character
- 7:28Speaker 2: data in a single row.
- 7:29Speaker 1: Four gigabytes in one row. That is wild.
- 7:32Speaker 2: It's the ultimate catch all container for massive, unpredictable data streams.
- 7:36Speaker 1: Okay, so we've poured a highly optimized concrete foundation the
- 7:40Speaker 1: user's table is perfectly sized. The victim's table can swallow
- 7:43Speaker 1: a whole hard drive directory tree without blinking. But a
- 7:47Speaker 1: database is just a.
- 7:48Speaker 2: Locked vault exactly. If our web application, the actual interface
- 7:52Speaker 2: we look at, can't talk to that vault, the whole
- 7:54Speaker 2: thing is useless.
- 7:55Speaker 1: So we have to build a secure communication bridge. And
- 7:58Speaker 1: for this architecture, we use Peach as our scripting language
- 8:01Speaker 1: to make that connection.
- 8:02Speaker 2: Right, But before we just write the code, we really
- 8:05Speaker 2: need to understand the environment preparation.
- 8:07Speaker 1: Yeah, because if Apache the web server, and myseql are
- 8:11Speaker 1: running on the same machine as different services, the operating
- 8:14Speaker 1: system doesn't just automatically let them talk.
- 8:17Speaker 2: No, not at all, and that's a fundamental security feature.
- 8:19Speaker 2: In Linux, the operating system uses sandbox permissions.
- 8:23Speaker 1: Right, locking things down.
- 8:24Speaker 2: Yeah, the Apache webserver is restricted to a very specific
- 8:27Speaker 2: directory usually for our WNTML. It's locked in that sandbox.
- 8:32Speaker 2: So if a hacker compromises your web page, they can't
- 8:35Speaker 2: just casually browse the rest of your server's private files.
- 8:38Speaker 1: So to build our PHP bridge, we actually have to
- 8:40Speaker 1: interact with the OS to grant our current user account
- 8:44Speaker 1: let's say developer, the right permissions to write code inside
- 8:48Speaker 1: that Apache sandbox exactly.
- 8:50Speaker 2: And then we also have to address the handshake between
- 8:53Speaker 2: PHP and myseql.
- 8:54Speaker 1: Oh, the authentication method, right, Yes, modern databases have really
- 8:59Speaker 1: complex authentication protocols.
- 9:01Speaker 2: But for our straightforward PHP scrypto log in smoothly, we
- 9:04Speaker 2: actually have to dive into the database settings and change
- 9:07Speaker 2: the root user's authentication method to my second native password.
- 9:11Speaker 1: Oh. I see, we're basically forcing the database to accept
- 9:14Speaker 1: a traditional standard password handshake.
- 9:16Speaker 2: Right, so our PHP connection doesn't get rejected for speaking
- 9:19Speaker 2: the wrong cryptographic dialect.
- 9:21Speaker 1: Okay, so sandbox unlocked. Handshake agreed upon. Now we write
- 9:24Speaker 1: the code. We create a file called con dot php
- 9:28Speaker 1: the connection file, right. Its sole purpose is to pick
- 9:31Speaker 1: up the phone and dial the database. We use a
- 9:33Speaker 1: built in PHP function called my sklick connect.
- 9:36Speaker 2: I love the phone analogy.
- 9:38Speaker 1: Yeah, it's like establishing a dedicated encrypted telephone line where
- 9:42Speaker 1: the operator demands a passcode.
- 9:43Speaker 2: It's highly accurate when PHP picks up that receiver mice
- 9:47Speaker 2: click connect requires four specific keys to satisfy the operator,
- 9:51Speaker 2: which are first the host name which is local host,
- 9:54Speaker 2: second the database user which is route, third the password
- 9:58Speaker 2: for that root user, and fourth the specific destination database
- 10:02Speaker 2: our control panel.
- 10:03Speaker 1: So PHP dials the number, gives the info and weights.
- 10:07Speaker 1: But in networking you can never assume the call connects
- 10:10Speaker 1: perfectly right passwords change database is crash exactly.
- 10:14Speaker 2: This introduces the concept of failing gracefully. If you just
- 10:17Speaker 2: assume the connection works and it silently fails, your web
- 10:20Speaker 2: application is going to keep loading.
- 10:22Speaker 1: Oh, and then it tries to query a database that
- 10:24Speaker 1: isn't even listening.
- 10:25Speaker 2: Right, which results in a cascade of massive, confusing errors,
- 10:29Speaker 2: dumping rawstack traces all over your web interface.
- 10:31Speaker 1: Which is a huge security risk. Those error messages reveal
- 10:35Speaker 1: system paths to anyone looking totally.
- 10:37Speaker 2: So to build a safety net, we use another function
- 10:40Speaker 2: right below our connection attempt called mycecook connector no, so.
- 10:43Speaker 1: Basically checks the line to see if we got a
- 10:45Speaker 1: busy signal exactly.
- 10:47Speaker 2: If it detects a failure, it catches it immediately. It
- 10:50Speaker 2: outputs a clean, controlled error message, appends the real system
- 10:54Speaker 2: error so you know what went wrong. And then this
- 10:57Speaker 2: is the critical part. It immediately exits the program.
- 11:00Speaker 1: It just kills the script dead in its tracks. Do
- 11:03Speaker 1: not load the dashboard, do not pass go, just stop.
- 11:06Speaker 2: It completely halts execution to prevent those catastrophic cascading failures.
- 11:10Speaker 1: You know, it's funny as a programmer, you write this
- 11:13Speaker 1: intricate connection file, handle the error, save it and test
- 11:16Speaker 1: it in a browser, and if it works flawlessly, you
- 11:20Speaker 1: just see a completely blank.
- 11:21Speaker 2: Page, the ultimate sign of a successful connection.
- 11:24Speaker 1: It's counterintuitive, but seeing absolutely nothing is a massive relief the.
- 11:29Speaker 2: Silence of a stable connection. So we have the vault.
- 11:32Speaker 2: We have the secure telephone line. But an invisible line
- 11:35Speaker 2: isn't a user interface.
- 11:36Speaker 1: Right, We need a front door, a gatekeeper. Time to
- 11:39Speaker 1: build log in dot php.
- 11:40Speaker 2: Yeah, we start with standard HTML to build a visual
- 11:43Speaker 2: form username, passwords, submit button, But the underlying mechanics of
- 11:48Speaker 2: how that form transmits data over the Internet is crucial,
- 11:52Speaker 2: the form submission method right. Web forms generally use either
- 11:56Speaker 2: gat or post views. A get request for a log
- 11:59Speaker 2: in portal, you are making a massive architectural.
- 12:02Speaker 1: Error because a jet et request takes the user's input
- 12:05Speaker 1: and just appends it directly into the web browser's URL
- 12:08Speaker 1: bar right exactly.
- 12:10Speaker 2: Which means the administrator's highly sensitive password would be sitting
- 12:13Speaker 2: right there and plain text in the address.
- 12:15Speaker 1: Bar, so it gets saved in the local browser history
- 12:17Speaker 1: logged by proxy servers visible to packet sniffers.
- 12:20Speaker 2: It's an absolute nightmare. So we use a post request instead.
- 12:24Speaker 2: Post packages the data invisibly within the body of the request.
- 12:28Speaker 2: The URL stays clean.
- 12:29Speaker 1: The payload is delivered under the radar, so the form
- 12:32Speaker 1: fires off the post payload and the server catches it.
- 12:35Speaker 1: In our login dot php, we open our PHP logic,
- 12:38Speaker 1: we pull in our con dot php file to open
- 12:41Speaker 1: the phone line, and before we do anything else, we
- 12:43Speaker 1: verify that the request method actually was a post and
- 12:46Speaker 1: that the parameters aren't empty.
- 12:48Speaker 2: Always validate input before you process it. Yeah, always, So
- 12:51Speaker 2: once we confirm the payload is there, we have to
- 12:54Speaker 2: ask the database if these credentials match a record.
- 12:57Speaker 1: And this brings us to the most critical security junction
- 13:00Speaker 1: in the whole project. We have raw input from a user,
- 13:03Speaker 1: and the cardinal sin of web development is taking raw
- 13:06Speaker 1: input and gluing it directly into a database query.
- 13:09Speaker 2: Yes, that vulnerability is seql injection. Imagine a user typing
- 13:14Speaker 2: a snippet of database code as their username like O
- 13:18Speaker 2: R one one oh classic right. If you lazily glue
- 13:21Speaker 2: that into your query string, you alter the fundamental logic
- 13:24Speaker 2: of the command the database reads it and says, let
- 13:27Speaker 2: this person in if their name matches, or r if
- 13:30Speaker 2: one equals.
- 13:31Speaker 1: One, and since one always equals.
- 13:32Speaker 2: One, the database just unlocks the door. It completely bypasses
- 13:35Speaker 2: the password check.
- 13:36Speaker 1: That is terrifying. So to defend against that, we use
- 13:39Speaker 1: an architecture called prepared statements. Yes I always explain prepared
- 13:42Speaker 1: statements like an incredibly strict fill in the blank form
- 13:45Speaker 1: at a government office. Instead of letting the user write
- 13:47Speaker 1: a whole paragraph, you hand the database a rigid template
- 13:50Speaker 1: like select from users where a username, a password to
- 13:52Speaker 1: kids report exactly.
- 13:53Speaker 2: Those question marks are the blanks. You send that template
- 13:56Speaker 2: to the database engine first, completely empty the database parts.
- 14:00Speaker 2: The syntax, locks down the logic and just sits there
- 14:03Speaker 2: waiting for the blanks to be filled.
- 14:04Speaker 1: And to safely pass the user's input into those blanks,
- 14:07Speaker 1: we use a method called bind paam right.
- 14:10Speaker 2: Bind parent acts as an absolute filter. When we use it,
- 14:14Speaker 2: we have to declare the data type of the variables,
- 14:16Speaker 2: so we use s's, which stands for string string ah.
- 14:20Speaker 1: So we force the database to treat the input purely
- 14:22Speaker 1: as literal text exactly.
- 14:25Speaker 2: It neutralizes any executable context, even if an attacker tries
- 14:28Speaker 2: to inject that or are one to one logic. The
- 14:31Speaker 2: database engine has already locked its execution plan. It just
- 14:34Speaker 2: looks at the input and says, wow, what a bizarrely
- 14:36Speaker 2: formatted username, and tries to find a literal match for
- 14:39Speaker 2: that exact string.
- 14:40Speaker 1: It completely separates the logic of the system from the
- 14:43Speaker 1: data of the user. That's brilliant.
- 14:44Speaker 2: It's the gold standard. So the parameters are bound. We
- 14:47Speaker 2: execute the query, and we check the result. The logic
- 14:50Speaker 2: flow here is just simple math.
- 14:52Speaker 1: Right. If the result has more than zero rows, the
- 14:55Speaker 1: user exists, we start secure session, store the username, and
- 14:59Speaker 1: redirect them to the main dashboard, and if it's.
- 15:01Speaker 2: Zero rows, we boot them back to the login screen
- 15:05Speaker 2: with a generic error message like wrong username and deartor password.
- 15:10Speaker 1: Notice we don't specify which one was incorrect.
- 15:12Speaker 2: Right, that's an intentional choice, so attackers can't use process
- 15:16Speaker 2: of elimination to guess usernames. But we really have to
- 15:19Speaker 2: address a massive caveat here regarding the password verification.
- 15:23Speaker 1: The hashing caveat, because if you open up the vault
- 15:26Speaker 1: and look at the user's table, you should never ever
- 15:28Speaker 1: see a plaintext password in that varture column.
- 15:31Speaker 2: Storing plaintext passwords is a catastrophic failure. If the database
- 15:35Speaker 2: is compromised, the attacker instantly has the credentials for every administrator.
- 15:39Speaker 1: So we don't do that. We run the password through
- 15:42Speaker 1: a mathematical hashing function before it ever touches the database. Right,
- 15:45Speaker 1: for our conceptual bill, we use the MD five function.
- 15:48Speaker 1: You feed it a password like admin one twenty three,
- 15:51Speaker 1: and it scrambles it into a fixed length, irreversible string
- 15:54Speaker 1: of gibberish. We store the gibberish.
- 15:56Speaker 2: Then when the user logs in, you hash what they
- 15:58Speaker 2: typed and compare the two hashes. Conceptually, it's the exact
- 16:01Speaker 2: right workflow, but we must be explicit about modern cryptography.
- 16:07Speaker 2: MD five is functionally obsolete.
- 16:09Speaker 1: Wait really why?
- 16:10Speaker 2: Because today hackers have massive GPU farms and rainbow tables.
- 16:14Speaker 1: Oh, rainbow tables. Those are basically enormous dictionaries right where
- 16:18Speaker 1: attackers take every word in the English language, every common
- 16:21Speaker 1: password and pre compute the MD five hashes for all of.
- 16:24Speaker 2: Them exactly, So when they steal a database with they hashes,
- 16:28Speaker 2: they don't even have to mathematically reverse them. They just
- 16:30Speaker 2: look up the stolen hash in their giant dictionary to
- 16:32Speaker 2: instantly reveal the plaintext password. Modern computers can process billions
- 16:37Speaker 2: of MT five hashes per second.
- 16:38Speaker 1: Wow, So the algorithm is dated. But for this exercise,
- 16:42Speaker 1: the architecture itself holds up. It shows how data flows
- 16:45Speaker 1: from the post request through the PHP bridge into the
- 16:48Speaker 1: prepared statement and gets verified against a hash value. So
- 16:52Speaker 1: let's summarize. We architected a relational database tailored the data
- 16:56Speaker 1: types of archar for credentials, long text for massive command ouputz.
- 17:00Speaker 1: We built a secure PHP bridge with robust error handling,
- 17:05Speaker 1: and we constructed a log in form fortified by PST variables,
- 17:08Speaker 1: prepared statements, and hashing.
- 17:10Speaker 2: We reverse engineer the entire nerve center.
- 17:12Speaker 1: We did, but here's the ultimate cliffhanger for you. If
- 17:16Speaker 1: you test this log in form right now, it will
- 17:19Speaker 1: fail every single time.
- 17:21Speaker 2: The query will return exactly zero rows.
- 17:23Speaker 1: Why because our database is completely empty. We built the vault,
- 17:26Speaker 1: lay the secure line reinforce the door, but we haven't
- 17:29Speaker 1: created any users yet.
- 17:30Speaker 2: Creating that first user record, Hashing a password and inserting
- 17:34Speaker 2: it into the table is the logical next step for
- 17:36Speaker 2: you to bring this panel to life. So sure, and
- 17:38Speaker 2: to really reinforce this deep dive, I have a quick
- 17:40Speaker 2: review exercise for you to think about. Thinking back to
- 17:43Speaker 2: our database design. If you were building the victim's table,
- 17:46Speaker 2: why must you specifically choose long text instead of our
- 17:49Speaker 2: chart for the command results? And how exactly do the
- 17:52Speaker 2: question marks in a prepared statement physically protect your log
- 17:55Speaker 2: in form mentally?
- 17:56Speaker 1: Walking through those mechanisms is how you really master system design.
- 18:00Speaker 1: And I'll leave you with one final provocative thought. We
- 18:03Speaker 1: used MT five hashing today for simplicity, but as an
- 18:06Speaker 1: exercise for your own curiosity. In a world of advanced
- 18:09Speaker 1: password cracking and rainbow tables, what are the modern industry
- 18:13Speaker 1: standard hashing algorithms that have left MT five in the dust.
- 18:17Speaker 2: Researching that is your next step to becoming a true
- 18:20Speaker 2: security
- 18:20Speaker 1: Master exactly, So go look into that, and until next time,
- 18:23Speaker 1: keep digging into the systems that run our world.