Latest / CyberCode Academy / Course 43 - Practical Malware Development | Episode 2: Building Your Dual-OS Dev Labs
Transcript
- 0:00Speaker 1: So if you want to catch a hacker, you don't
- 0:01Speaker 1: just set a trap. You kind of have to build
- 0:04Speaker 1: the exact hands they're going to break into.
- 0:05Speaker 2: Right, yeah. And you have to literally forge the tools
- 0:08Speaker 2: to pick your own locks.
- 0:09Speaker 1: Exactly. I mean, you have to understand the metology of
- 0:11Speaker 1: the lock, the tension of the springs, all the vulnerabilities
- 0:15Speaker 1: of the architecture before you can ever really hope to
- 0:17Speaker 1: secure it.
- 0:18Speaker 2: Oh, absolutely.
- 0:19Speaker 1: So today, we are analyzing a set of foundational technical blueprints.
- 0:24Speaker 1: And our mission for you, the listener... is to explore
- 0:27Speaker 1: how to actually construct both the locks and the lockpicks
- 0:31Speaker 1: from scratch. We're doing a deep dive into building a
- 0:34Speaker 1: dual environment development laboratory.
- 0:37Speaker 2: Which is such a critical exercise for anyone who's, you know,
- 0:39Speaker 2: serious about technology.
- 0:41Speaker 1: Yeah. So first, we'll construct a specialized Windows environment for
- 0:45Speaker 1: writing compiled software. And then we're going to pivot entirely
- 0:49Speaker 1: and configure a Linux Ubuntu system designed specifically to host
- 0:53Speaker 1: dynamic web services.
- 0:55Speaker 2: Because, I mean, the environments we are about to break down,
- 0:58Speaker 2: they're not just simulations. These are the exact frameworks enterprise
- 1:01Speaker 2: developers use to build applications. And simultaneously, they're the exact
- 1:05Speaker 2: staging grounds cybersecurity professionals use to tear those same applications apart.
- 1:10Speaker 1: Wow. So by building these two distinct nodes, you're essentially
- 1:14Speaker 1: creating a localized microcosm of the Internet itself.
- 1:18Speaker 2: You really are, yeah.
- 1:19Speaker 1: Okay, let's unpack this. Let's step into the first part
- 1:21Speaker 1: of this laboratory, the Windows Workspace. This is essentially our
- 1:25Speaker 1: application workbench.
- 1:26Speaker 2: Right. The foundation.
- 1:27Speaker 1: Yeah. So the blueprints initiate the process by having us
- 1:31Speaker 1: navigate to google.com, search for. NET Core, and head straight
- 1:35Speaker 1: to the official net.microsoft.com domain. But there's the detail here
- 1:40Speaker 1: that immediately jumped out at me.
- 1:42Speaker 2: Oh, the 32-bit thing?
- 1:43Speaker 1: Yes. The instructions explicitly specify downloading the 32-bit installer for.
- 1:48Speaker 1: NET Core and running that executable. I'll admit, that just
- 1:51Speaker 1: stopped me in my tracks.
- 1:52Speaker 2: I mean, I completely get why.
- 1:53Speaker 1: Right. Because in a modern computing environment, almost everything we
- 1:57Speaker 1: touch is 64-bit architecture. So why are these blueprints pointing
- 2:02Speaker 1: us backward to a 32-bit runtime? Like, is there a
- 2:05Speaker 1: strategic reason for that, especially if we were setting this
- 2:08Speaker 1: up for security testing down the line?
- 2:10Speaker 2: That is an incredibly sharp observation. And yeah, there's a
- 2:13Speaker 2: huge strategic reason. When you are building a lab for
- 2:17Speaker 2: offensive security, backwards compatibility is just paramount.
- 2:20Speaker 1: Because of older systems.
- 2:22Speaker 2: Exactly. A lot of legacy enterprise systems, the ones that
- 2:26Speaker 2: often harbor the most critical vulnerabilities, they still rely on
- 2:29Speaker 2: 32-bit architectures.
- 2:31Speaker 1: Oh, wow. Okay, that makes sense. Yeah.
- 2:33Speaker 2: And furthermore, when you're first learning how memory works, you know,
- 2:38Speaker 2: how to manipulate pointers or execute a buffer overflow... A
- 2:41Speaker 2: 32-bit memory address space is just significantly easier to map
- 2:45Speaker 2: out and understand than a 64-bit space.
- 2:49Speaker 1: Oh, so it's practically a learning tool in itself.
- 2:51Speaker 2: It really is. By forcing the environment into a 32-bit architecture,
- 2:55Speaker 2: the blueprints ensure that the payloads and tools you eventually
- 2:58Speaker 2: build will actually execute effectively against older, vulnerable targets without
- 3:03Speaker 2: some sort of architectural mismatch.
- 3:05Speaker 1: I hadn't even considered the legacy aspect. You're essentially making
- 3:08Speaker 1: sure your digital lockpick gets into the older rusted locks
- 3:12Speaker 1: that organizations just forget to replace.
- 3:14Speaker 2: That's a perfect way to put it.
- 3:15Speaker 1: So, okay, we run the executable, the framework installs, and
- 3:19Speaker 1: the underlying concrete is poured. But a runtime environment doesn't
- 3:23Speaker 1: really help you write the code itself.
- 3:24Speaker 2: No, not at all. You need a workbench. Right.
- 3:28Speaker 1: The next progression in the blueprint is downloading Visual Studio Code.
- 3:32Speaker 1: And they make a specific point to mention that VS
- 3:34Speaker 1: Code is completely free, which is great. But as a
- 3:37Speaker 1: raw download, I mean, it's just a text editor.
- 3:41Speaker 2: Yeah, it's essentially a blank slate at first. VS Code
- 3:44Speaker 2: is built on an extensible architecture. So out of the box,
- 3:48Speaker 2: it lacks the compilers, debuggers, the language-specific intelligence for heavy-duty development.
- 3:53Speaker 2: You have to mold it.
- 3:54Speaker 1: And that molding process brings us to the next step.
- 3:56Speaker 2: Yeah.
- 3:57Speaker 1: So you open the app, navigate to the extensions menu.
- 4:00Speaker 1: And search for C Sharp. That's the letter C followed
- 4:03Speaker 1: by the pound sign. You install the very first extension
- 4:05Speaker 1: that pops up. But I do want to push back
- 4:07Speaker 1: on the language choice here. Okay.
- 4:08Speaker 2: What are you thinking?
- 4:09Speaker 1: Well, when I think of offensive security or, you know,
- 4:11Speaker 1: rapid application development, I usually think of Python for scripting
- 4:15Speaker 1: or maybe C + + for low-level memory access. Why
- 4:18Speaker 1: are the blueprints steering us towards C Sharp on a
- 4:21Speaker 1: Windows machine?
- 4:22Speaker 2: I get that. But C Sharp actually provides a unique
- 4:25Speaker 2: tactical advantage in a Windows environment. Because Microsoft developed it,
- 4:29Speaker 2: C Sharp hooks natively and seamlessly right into the Windows API.
- 4:34Speaker 1: Oh, the application programming interface.
- 4:36Speaker 2: Right. So this allows developers or security testers to interact
- 4:39Speaker 2: directly with the operating system's core functions.
- 4:42Speaker 1: Whereas Python wouldn't do that as easily.
- 4:44Speaker 2: Well, if you write a tool in Python, it often
- 4:46Speaker 2: requires a heavy interpreter. and modern endpoint detection systems, they
- 4:51Speaker 2: can flag malicious Python scripts almost immediately. C Sharp, on
- 4:55Speaker 2: the other hand, it compiles into an intermediate language that
- 4:59Speaker 2: runs within the. NET framework. It just blends in. To
- 5:02Speaker 2: a security system, a well-written C Sharp executable often just
- 5:06Speaker 2: looks like normal enterprise software going about its day.
- 5:09Speaker 1: Wow, so it's camouflage. You are building tools that speak
- 5:12Speaker 1: the native dialect of the target operating system.
- 5:16Speaker 2: That's fascinating. And I guess that leads perfectly into the
- 5:19Speaker 2: naming convention the blueprints require next.
- 5:21Speaker 1: Ah, yes, the folder name. Right.
- 5:24Speaker 2: We are instructed to go to the desktop and create
- 5:26Speaker 2: a new project folder. But the instructions are really rigid here.
- 5:31Speaker 2: You must name this folder Red Team Develop.
- 5:34Speaker 1: Yeah, they don't leave any room for interpretation there.
- 5:36Speaker 2: They don't. They emphasize this folder will be the nucleus
- 5:40Speaker 2: for the rest of the curriculum. And I want to
- 5:42Speaker 2: unpack this term for the listener because Red Team... carries
- 5:45Speaker 2: a ton of weight in the industry.
- 5:47Speaker 1: It really does. In cybersecurity, you basically have the blue team,
- 5:51Speaker 1: which defends the network, and the red team, which attacks it.
- 5:55Speaker 2: Right.
- 5:55Speaker 1: But red teaming isn't just, you know, randomly throwing exploits
- 5:58Speaker 1: at a firewall. It's a highly structured adversarial simulation. Red
- 6:03Speaker 1: teamers act as advanced persistent threats. They conduct reconnaissance, weaponize payloads,
- 6:08Speaker 1: and attempt to exploit vulnerabilities to achieve a specific objective.
- 6:12Speaker 2: All without being detected. Right.
- 6:14Speaker 1: All under the radar. So by naming this foundational workspace
- 6:17Speaker 1: Red Team Develop, the blueprints are really planting a flag
- 6:21Speaker 1: in the ground. We aren't setting up this C-sharp environment
- 6:24Speaker 1: to build some generic payroll app.
- 6:26Speaker 2: No, not at all.
- 6:28Speaker 1: We are staging the workbench to forge offensive capabilities.
- 6:32Speaker 2: Precisely. You are building the armory.
- 6:35Speaker 1: I love that. But an armory is pretty useless if
- 6:38Speaker 1: the forge doesn't actually fire up.
- 6:40Speaker 2: Right.
- 6:40Speaker 1: We have to verify that the. NET framework, VS Code,
- 6:45Speaker 1: and the C-sharp extension are actually talking to each other.
- 6:47Speaker 2: Yeah, you need that validation.
- 6:49Speaker 1: And the blueprints detail a very specific step for that.
- 6:52Speaker 1: You open up the terminal directly inside VS Code, and
- 6:55Speaker 1: you type the command. NET new console.
- 6:58Speaker 2: Right, and that command initiates the scaffolding process. The. NET
- 7:01Speaker 2: framework interprets that instruction and just automatically generates the boilerplate
- 7:05Speaker 2: directory structure, the config files, and a basic C-sharp file.
- 7:09Speaker 2: With the classic Hello World application.
- 7:11Speaker 1: Yeah, you hit enter and you can literally see the
- 7:14Speaker 1: files populate right there in the sidebar. It's so satisfying.
- 7:16Speaker 2: It is.
- 7:17Speaker 1: And then to prove the compilation pipeline is intact, you
- 7:20Speaker 1: follow up by typing. NET run. The framework compiles the
- 7:23Speaker 1: code on the fly and the words Hello World print
- 7:26Speaker 1: out in the terminal.
- 7:27Speaker 2: Which seems trivial, I know.
- 7:29Speaker 1: It does, but mechanically it proves our C Sharp toolchain
- 7:32Speaker 1: is fully operational.
- 7:34Speaker 2: Exactly. It proves the intermediate language compiler is functioning, the
- 7:38Speaker 2: runtime environment is executing, and the standard output is routing
- 7:41Speaker 2: correctly back to your interface. The Windows red team environment
- 7:45Speaker 2: is officially established.
- 7:47Speaker 1: Okay, so now that we have a workbench to forge
- 7:49Speaker 1: our tools, we obviously need an environment to test them against.
- 7:53Speaker 2: Time for the target.
- 7:54Speaker 1: Yes. The blueprints pivot us away from the familiar graphical
- 7:58Speaker 1: world of Windows, and they drop us directly into a
- 8:01Speaker 1: Linux Ubuntu system. We are transitioning from building local software
- 8:05Speaker 1: to constructing an internet-facing web server.
- 8:07Speaker 2: Which requires an entirely different architectural mindset.
- 8:10Speaker 1: Totally.
- 8:11Speaker 2: Windows, in the context we just used it, is a
- 8:13Speaker 2: client-side environment. But Ubuntu, in this context, is going to
- 8:16Speaker 2: act as a host. It listens for external requests, processes data,
- 8:20Speaker 2: and serves content back across a network.
- 8:23Speaker 1: And to build this hosting environment, the blueprints introduce a
- 8:26Speaker 1: classic trio, Apache, MySeal, and PHP.
- 8:30Speaker 2: The legendary LMP stack.
- 8:32Speaker 1: Exactly. Exactly. If you're listening to this and you've spent
- 8:35Speaker 1: any time around web infrastructure, you recognize this. Linux, Apache, MySQL, PHP.
- 8:40Speaker 2: It's the backbone of so much of the web.
- 8:42Speaker 1: It really is. We're setting up Apache to act as
- 8:45Speaker 1: the web demon, listening for HTTP requests. We're deploying MySQL
- 8:49Speaker 1: to establish a relational data mapping structure to hold persistent information.
- 8:53Speaker 1: And we're using PHP as the server-side scripting language to
- 8:56Speaker 1: process logic.
- 8:57Speaker 2: Right. You're building a dynamic, stateful application infrastructure. And historically,
- 9:02Speaker 2: that is a prime target for red team exploitation.
- 9:04Speaker 1: Because it's so common.
- 9:05Speaker 2: Yeah. The LMP stack powers a massive percentage of the
- 9:08Speaker 2: dynamic web. If you want to understand how SQL injection
- 9:11Speaker 2: works or how cross-site scripting is executed, you have to
- 9:14Speaker 2: understand how these three specific technologies parse and pass data
- 9:18Speaker 2: between one another.
- 9:19Speaker 1: But, you know, the method of installation here is a
- 9:20Speaker 1: stark contrast to what we just did on Windows. On Windows,
- 9:23Speaker 1: we downloaded a neat little executable and watched a graphical
- 9:26Speaker 1: progress bar.
- 9:27Speaker 2: Nice and friendly.
- 9:28Speaker 1: Very friendly. But here on the Ubuntu side, the blueprints
- 9:32Speaker 1: have us open a raw blank terminal screen. To get Apache,
- 9:36Speaker 1: we were typing sudo apt-get install apache2. Yep. We hit enter,
- 9:42Speaker 1: watch a wall of text fly by, and then type
- 9:44Speaker 1: sudo apt-get install my squalus server. I have to admit.
- 9:48Speaker 1: The first time you look at a blank Linux terminal,
- 9:51Speaker 1: it feels incredibly unforgiving.
- 9:53Speaker 2: Oh, it's terrifying for beginners.
- 9:54Speaker 1: Right. It feels like one typo and the computer is
- 9:57Speaker 1: just daring you to break it. Why this reliance on
- 9:59Speaker 1: the command line? line interface? Why the sudden shift?
- 10:03Speaker 2: Well, it comes down to how production servers actually operate
- 10:06Speaker 2: in the real world. Most enterprise web servers are headless.
- 10:08Speaker 1: Meaning no screen.
- 10:10Speaker 2: Basically, yeah. They don't have a graphical user interface because
- 10:13Speaker 2: a GUI consumes valuable system resources, RAM and CPU cycles.
- 10:18Speaker 2: That should be strictly dedicated to serving web traffic. So
- 10:21Speaker 2: system administrators have to interact with these machines remotely via
- 10:24Speaker 2: secure shells.
- 10:25Speaker 1: So you really just have to learn to speak to
- 10:27Speaker 1: the operating system without a mouse.
- 10:28Speaker 2: Exactly. And honestly, the command line, specifically using a package
- 10:32Speaker 2: manager like AppGet, is infinitely more efficient.
- 10:35Speaker 1: How so?
- 10:36Speaker 2: The package manager automatically calculates dependency trees. When you tell
- 10:40Speaker 2: it to install Apache, it checks to see what other
- 10:43Speaker 2: underlying software libraries Apache needs to function. reaches out to
- 10:47Speaker 2: the Debian repositories, downloads them all, and installs them in
- 10:51Speaker 2: the correct order. Wow, okay. You're achieving in one line
- 10:54Speaker 2: of text what would take a dozen manual downloads in
- 10:57Speaker 2: a graphical environment.
- 10:59Speaker 1: That automation becomes very apparent when the blueprints guide us
- 11:02Speaker 1: through installing PHP. It actually feels almost interactive.
- 11:06Speaker 2: It's a great feature.
- 11:07Speaker 1: Yeah. The instructions tell you to type sudo apt-get install php,
- 11:11Speaker 1: but before you hit enter, you press the tab key twice.
- 11:15Speaker 2: Ah, tab completion. It's a lifesaver.
- 11:17Speaker 1: It's brilliant. You double-tab, and the terminal basically pauses, queries
- 11:22Speaker 1: its repositories, and spits out a list of every available
- 11:25Speaker 1: PHP version you can install.
- 11:26Speaker 2: Yeah, it shows you exactly what your options are.
- 11:28Speaker 1: The blueprints note that version 7.2 is available, so we
- 11:31Speaker 1: just finish the command with PHP 7.2. The terminal isn't
- 11:35Speaker 1: just a blank slate anymore. It's actively helping you construct
- 11:38Speaker 1: the syntax.
- 11:39Speaker 2: Which demonstrates that the command line shell is a dynamic environment.
- 11:43Speaker 2: It's constantly aware of the file system and the available
- 11:46Speaker 2: software indexes.
- 11:47Speaker 1: Right. But we don't just install the base PHP package.
- 11:51Speaker 1: The blueprints are incredibly specific about the extensions we need
- 11:55Speaker 1: to add to that terminal command. We type in php-mysql.
- 11:59Speaker 2: Which makes logical sense. PHP needs a specific driver to
- 12:03Speaker 2: communicate with the relational database.
- 12:05Speaker 1: Exactly. Then we add PHP as main string to handle
- 12:09Speaker 1: multi-byte character encodings for complex data formats later on. But
- 12:13Speaker 1: then we hit the final extension, live Apache 2 mod THP.
- 12:16Speaker 2: That is the crucial one.
- 12:17Speaker 1: The blueprints refer to this as a crucial link, yeah.
- 12:19Speaker 1: But I really want to get under the hood here. Mechanically,
- 12:22Speaker 1: what is actually happening in the system memory when we
- 12:24Speaker 1: install this specific module?
- 12:26Speaker 2: This is where the architecture of the web becomes super fascinating.
- 12:29Speaker 2: By default, Apache is a remarkably simple piece of software.
- 12:32Speaker 2: Its entire job is to receive an HTTP request, look
- 12:36Speaker 2: on the hard drive for a file matching that request,
- 12:38Speaker 2: and just send it back.
- 12:39Speaker 1: Simple enough.
- 12:40Speaker 2: Right. If you ask for an image, it sends the image.
- 12:43Speaker 2: But if you ask it for a PHP script, Apache
- 12:46Speaker 2: doesn't actually know how to execute code.
- 12:48Speaker 1: Wait, so what would it do?
- 12:49Speaker 2: It would just send you the raw, unexecuted text of
- 12:51Speaker 2: the script.
- 12:52Speaker 1: Oh, which is a massive security risk if that script contains, say,
- 12:57Speaker 1: database passwords.
- 12:58Speaker 2: Precisely. So Live Apache 2 Mod PHP acts as an
- 13:02Speaker 2: embedded translator. It installs a PHP interpreter directly inside Apache's
- 13:07Speaker 2: worker processes in the system memory.
- 13:08Speaker 1: Okay.
- 13:09Speaker 2: So when a request comes in for a PHP file,
- 13:11Speaker 2: Apache no longer tries to read it as a static document.
- 13:14Speaker 2: It hands the file off to this internal module. The
- 13:17Speaker 2: module compiles the script on the fly, executes the logic,
- 13:20Speaker 2: queries the database if necessary, and then generates standard HTML.
- 13:25Speaker 1: Oh, wow.
- 13:25Speaker 2: Yeah. And then it hands that HTML back to Apache,
- 13:28Speaker 2: which finally sends it to the user. The user never
- 13:29Speaker 2: sees the code. They only see the result.
- 13:31Speaker 1: That is such an elegant piece of engineering. You are
- 13:34Speaker 1: physically bridging the gap. between a static web server and
- 13:38Speaker 1: a dynamic programming language. So we run that command. The
- 13:41Speaker 1: terminal cascades with text as it unpacks all those binaries.
- 13:45Speaker 1: The heavy machinery is installed. But if you are listening
- 13:49Speaker 1: to this and you've ever stared at a 500 internal
- 13:52Speaker 1: server error trying to load a local test page, you
- 13:54Speaker 1: know that downloading a package isn't the same as actually
- 13:57Speaker 1: running a service.
- 13:59Speaker 2: Oh, yeah. That's a very common pitfall for beginners. The
- 14:02Speaker 2: package manager places the binaries on the hard drive, but
- 14:05Speaker 2: it doesn't always instantiate the runtime processes.
- 14:08Speaker 1: Right. To solve this, the blueprints introduce a new syntax
- 14:12Speaker 1: for managing services, or daemons as they are called in Linux.
- 14:16Speaker 1: We type sudo service apache2 start. But we don't just
- 14:20Speaker 1: assume it worked. Immediately after, the blueprints require us to
- 14:23Speaker 1: type sudo service apache2 status.
- 14:26Speaker 2: That status check is basically your diagnostic window. Demons run
- 14:29Speaker 2: in the background, detached from your terminal session. If Apache
- 14:32Speaker 2: fails to start, maybe another application is already occupying port 80,
- 14:35Speaker 2: or there's a typo in a configuration file, it will
- 14:38Speaker 2: crash silently in the background.
- 14:39Speaker 1: And you would have absolutely no idea until you try
- 14:42Speaker 1: to load a web page and just got a connection timeout.
- 14:45Speaker 2: Exactly. By running the status command, you force the operating
- 14:48Speaker 2: system to print out the active state of the demon
- 14:50Speaker 2: and the last few lines of its system log. If
- 14:53Speaker 2: it says active and running, your web server is alive.
- 14:56Speaker 2: If it says failed, the log will tell you exactly
- 14:59Speaker 2: which line in the config file caused the panic.
- 15:02Speaker 1: It's like checking the heartbeat of a patient. You need
- 15:04Speaker 1: to know the server's alive before you try to use it.
- 15:07Speaker 2: Right.
- 15:07Speaker 1: So we follow the exact same procedure for the database,
- 15:10Speaker 1: running the start command for the MySQL service and checking
- 15:13Speaker 1: its status. Both demons are humming in the background. Our
- 15:17Speaker 1: Ubuntu engine room is officially online. Awesome. But the blueprints
- 15:20Speaker 1: introduce one final, crucial modification to our Linux environment. Once
- 15:25Speaker 1: the demons are running, we have a bit of a
- 15:27Speaker 1: workflow problem. Writing complex PHP logic in a raw terminal
- 15:32Speaker 1: editor like Nano or Vim can be, well, a formatting
- 15:36Speaker 1: and debugging nightmare for a lot of people.
- 15:37Speaker 2: Yeah, I mean, while terminal editors are incredibly powerful, they
- 15:41Speaker 2: lack the visual affordances that speed up complex development cycles.
- 15:45Speaker 2: When you're writing hundreds of lines of code that dictate
- 15:47Speaker 2: how a web server interacts with a database, syntax highlighting
- 15:51Speaker 2: and visual directory mapping become pretty essential.
- 15:54Speaker 1: Yeah, I can imagine. So to optimize the workflow, the
- 15:57Speaker 1: blueprints recommend installing the Atom coding editor. Now, they are
- 16:02Speaker 1: careful to note that Atom isn't strictly required for the
- 16:05Speaker 1: web server to function, but it drastically improves your coding capability,
- 16:10Speaker 1: like upgrading from a manual hand crank to a power drill.
- 16:13Speaker 1: That's a good analogy. To get it, we transition back
- 16:16Speaker 1: to a graphical browser on the Ubuntu desktop, navigate to Atom.io,
- 16:20Speaker 1: and download the Debian package file. We then use our
- 16:24Speaker 1: terminal to navigate to the downloads folder and install that
- 16:27Speaker 1: package directly into the operating system.
- 16:29Speaker 2: And what you're doing here is bridging the gap between
- 16:31Speaker 2: server administration and software development. By installing a dedicated integrated
- 16:35Speaker 2: development environment, or IDE, on the Linux machine, you're creating
- 16:40Speaker 2: a space where you can rapidly prototype PHP code visually.
- 16:43Speaker 2: You save it and instantly have the Apache Daemon, which
- 16:47Speaker 2: is already running in the background process, and serve that code.
- 16:50Speaker 1: And you launch it by simply typing Atom into the terminal.
- 16:53Speaker 1: The graphical editor opens up and you now have a
- 16:56Speaker 1: highly efficient visual workspace layered right on top of a
- 16:59Speaker 1: robust command line driven server infrastructure.
- 17:03Speaker 2: It really is the best of both worlds. You have
- 17:05Speaker 2: the precision of the terminal for managing the daemons and
- 17:08Speaker 2: the efficiency of the IDE for writing the actual logic.
- 17:12Speaker 1: So let's take a step back and survey the laboratory
- 17:15Speaker 1: we have just constructed through these blueprints. It is quite
- 17:18Speaker 1: an architectural feat.
- 17:19Speaker 2: It really is a lot of ground covered.
- 17:21Speaker 1: On one side of the network, we meticulously built a
- 17:23Speaker 1: Windows workbench. We installed a 32-bit. NET Core runtime to
- 17:28Speaker 1: ensure backwards compatibility for legacy exploits. We customized Visual Studio
- 17:32Speaker 1: Code with C-sharp intelligence to allow us to write tools
- 17:35Speaker 1: that interface natively with the Windows API. We named our
- 17:39Speaker 1: staging ground Red Team Develop, signaling its offensive purpose, and
- 17:42Speaker 1: we validated the entire compilation pipeline.
- 17:45Speaker 2: Yeah, and on the other side, we utilized the speed
- 17:47Speaker 2: and automation of the Linux command line to deploy an
- 17:50Speaker 2: active target. We installed Apache to handle HTTP requests, MyCFL
- 17:55Speaker 2: to map relational data, and PHP to execute server-side logic.
- 18:00Speaker 1: And we bridged that gap, too.
- 18:01Speaker 2: Right. We fundamentally altered how Apache processes data by embedding
- 18:05Speaker 2: the LibApache2 mod PAP interpreter into its memory. Plus, we
- 18:10Speaker 2: verified that our background daemons were actively listening for connections.
- 18:14Speaker 1: You now understand the blueprints to build the exact infrastructure
- 18:17Speaker 1: that professionals use to both build the web and break it.
- 18:21Speaker 1: But before we wrap up, I want to do a
- 18:22Speaker 1: quick mental exercise for you, the listener, to reinforce the
- 18:26Speaker 1: technical syntax we explored today.
- 18:27Speaker 2: Oh, this is a good idea.
- 18:28Speaker 1: Think back to our Windows setup right after we configured
- 18:31Speaker 1: our red team folder. Imagine you are staring at your
- 18:34Speaker 1: terminal and you need to generate the boilerplate scaffold for
- 18:38Speaker 1: a brand new C-sharp application. What two exact words do
- 18:41Speaker 1: you type immediately following the word. NET to execute that command?
- 18:44Speaker 1: I'll give you a second. Yeah, right. If you remember
- 18:47Speaker 1: new console, your foundational syntax is locked in. You are
- 18:50Speaker 1: well on your way.
- 18:51Speaker 2: Today, we systematically built two separate islands of technology, a
- 18:56Speaker 2: Windows space configured for application development and a Linux environment
- 19:00Speaker 2: hosting a live web server. But consider this for your
- 19:03Speaker 2: own exploration as you move forward.
- 19:05Speaker 1: Okay, what's that?
- 19:06Speaker 2: In the real world of networks and security, these environments
- 19:10Speaker 2: are never really isolated. They exist on the same subnet.
- 19:13Speaker 2: They can see each other. So what do you think
- 19:15Speaker 2: happens when the specialized native C-sharp applications you compile on
- 19:19Speaker 2: that Windows Red Team machine Start actively probing the Apache
- 19:23Speaker 2: daemon across the network.
- 19:25Speaker 1: Oh, wow.
- 19:25Speaker 2: What happens when a tool you built tries to pass
- 19:27Speaker 2: a malicious multibyte string to the PHP interpreter on that
- 19:31Speaker 2: Ubuntu server? That intersection, the moment the lockpick meets the lock,
- 19:35Speaker 2: that is where the real security engineering begins.
- 19:37Speaker 1: I love that. The workbench is set. The target server
- 19:41Speaker 1: is humming. The lab is officially open.