Latest / CyberCode Academy / Course 30 - Practical Malware Development - Beginner Level | Episode 2: Mastering C# System Control: Navigating, Enumerating, and Executing
Transcript
- 0:00Speaker 1: Imagine dropping a digital agent into the vast, complex labyrinth
- 0:04Speaker 1: of a modern computer system. It just lands in complete darkness.
- 0:08Speaker 1: There is no user interface, no mouse clicking, no dragging
- 0:12Speaker 1: and dropping.
- 0:12Speaker 2: So how does it know where.
- 0:13Speaker 3: It is right? Or how does it figure out who
- 0:16Speaker 3: is logged in? Or how to pull the strings of
- 0:19Speaker 3: the operating system, all without the person sitting right in
- 0:22Speaker 3: front of the keyboard ever noticing a single thing.
- 0:24Speaker 2: Exactly.
- 0:25Speaker 1: Well, today we are mentally unpacking the exact mechanics of
- 0:28Speaker 1: a custom MILT system application. We are diving into the
- 0:31Speaker 1: kind of powerful, invisible architecture used by top tier IT
- 0:35Speaker 1: administrators and sophisticated cybersecurity professionals. Welcome to the deep dive,
- 0:42Speaker 1: by the way, thanks.
- 0:43Speaker 3: It really is a phenomenal space to explore, because when
- 0:45Speaker 3: you strip away the graphics and the desktop icons that
- 0:48Speaker 3: we all rely on every day, you are just left
- 0:50Speaker 3: with pure logic.
- 0:51Speaker 2: Yeah, pure code.
- 0:52Speaker 3: Exactly Yeah. We're going to walk you through the underlying
- 0:55Speaker 3: programming architecture of how software learns to navigate. A machine
- 0:59Speaker 3: is all about how it gathers critical intelligence and executes
- 1:02Speaker 3: commands entirely in the shadows.
- 1:04Speaker 1: Okay, so let's unpack this our agent is sitting in
- 1:07Speaker 1: the dark. Right Before it can gather intelligence or manipulate
- 1:11Speaker 1: the system, it has to be able to move. It
- 1:14Speaker 1: needs eyes and legs, basically.
- 1:16Speaker 3: Yeah, and we start by building its basic navigation inside
- 1:19Speaker 3: what developers call an operations class. Right.
- 1:22Speaker 1: So if we compare this code to say, sending a
- 1:25Speaker 1: scout into a pitch black house, giving the scout the
- 1:28Speaker 1: command CD, which stands for change directory is basically telling
- 1:33Speaker 1: the scout to walk into the kitchen.
- 1:35Speaker 3: I like that analogy. To pull that off, the program
- 1:38Speaker 3: relies on a command parser that triggers a specific method
- 1:40Speaker 3: called set current directory. This method is just part of
- 1:43Speaker 3: the system's core directory library.
- 1:45Speaker 1: So it's basically tapping right into the foundation of the system.
- 1:48Speaker 3: Yeah, exactly. When you pass a destination path into that method,
- 1:52Speaker 3: you are doing something very specific at the operating system level.
- 1:55Speaker 3: You aren't just moving a visual folder.
- 1:57Speaker 2: Wait, so what are you actually moving?
- 1:59Speaker 3: Then? Altering the underlying context of the program's running thread
- 2:04Speaker 3: the operating system literally shifts the software's active working environment
- 2:08Speaker 3: to that new location. It is the legs of the operation.
- 2:11Speaker 1: Like you said, Okay, but legs only get you so far.
- 2:14Speaker 1: The scout is in the kitchen now, but they still
- 2:16Speaker 1: need to see what is in the pantry.
- 2:18Speaker 3: Right, which requires a new command.
- 2:20Speaker 1: Usually Elser's fur list Right. The parser reads L's and
- 2:24Speaker 1: it triggers two methods, enumerate directories and enumerate files.
- 2:28Speaker 3: Yep, it has to gather the data.
- 2:30Speaker 1: I get that it's grabbing data. But if this agent
- 2:32Speaker 1: is operating purely in code, how does it actually record
- 2:36Speaker 1: all of this information to hand back to you.
- 2:38Speaker 3: Well, it has to build a list, and the tool
- 2:41Speaker 3: it uses to build that list is called a string builder.
- 2:44Speaker 3: String builder. Okay, So when you ask a computer to
- 2:46Speaker 3: enumerate files and directories, you are asking it to process
- 2:50Speaker 3: a collection of data. The program uses a select clause
- 2:54Speaker 3: to actively grab every single item in that director like
- 2:56Speaker 3: a query, exactly like an SQL query, and then it
- 2:59Speaker 3: loops through them, depending each directory name line by line,
- 3:03Speaker 3: adding a new line separator after every entry.
- 3:05Speaker 2: Wait, let me pause you there.
- 3:07Speaker 1: Why does it need a special tool called a string builder?
- 3:10Speaker 1: That is a great question, because I mean, if I
- 3:13Speaker 1: am writing code, why can't I just create a normal
- 3:16Speaker 1: text string and keep adding the file names to the
- 3:18Speaker 1: end of it.
- 3:19Speaker 3: It really gets to the heart of how computer memory
- 3:21Speaker 3: actually works. In most programming languages, standard strings of text
- 3:26Speaker 3: are immutable.
- 3:27Speaker 2: Meaning they cannot be changed.
- 3:29Speaker 3: Right once you create a string in the computer's memory,
- 3:32Speaker 3: it is locked. If you want to add a single
- 3:35Speaker 3: word to the end of it, the computer has to
- 3:37Speaker 3: find a brand new, larger block of memory. Oh wow, Yeah,
- 3:40Speaker 3: it has to copy the old string over, add the
- 3:43Speaker 3: new word, and then delete the old block entirely.
- 3:46Speaker 1: So if I have a folder with ten thousand files
- 3:48Speaker 1: in it, what happens.
- 3:49Speaker 3: You are forcing the computer to copy and destroy memory
- 3:52Speaker 3: blocks ten thousand times in a fraction of a second.
- 3:55Speaker 1: That sounds incredibly inefficient.
- 3:57Speaker 3: It is. It is like building a tower of blocks,
- 4:00Speaker 3: but every time you want to add a single block
- 4:02Speaker 3: to the top, you are forced to rebuild the entire
- 4:04Speaker 3: tower from scratch on a completely different table.
- 4:07Speaker 2: Oh I see.
- 4:08Speaker 3: It is incredibly resource heavy, and for a program trying
- 4:12Speaker 3: to operate silently, that massive spike in memory usage is
- 4:15Speaker 3: a giant red flag. It could even crash the system.
- 4:19Speaker 2: Okay, that makes sense.
- 4:20Speaker 1: So how does stringbuilder solve the tower problem?
- 4:23Speaker 3: Well, instead of destroying and recreating memory, stringbuilder pre allocates
- 4:27Speaker 3: a chunk of memory space. It is basically a buffer.
- 4:30Speaker 1: Look a flexible notepad exactly.
- 4:32Speaker 3: It allows the program to modify the text in place.
- 4:35Speaker 3: It just writes the next file name on the next
- 4:37Speaker 3: line without having to rebuild the entire document.
- 4:39Speaker 1: That is brilliant. It is just writing sequentially. First, it
- 4:43Speaker 1: lists the folders using a generic dynamic variable often called
- 4:46Speaker 1: a var type and a forg loop.
- 4:48Speaker 3: What is fascinating here is how the logic works. By
- 4:52Speaker 3: assigning the incoming collection to a generic var type, the
- 4:56Speaker 3: program dynamically adapts to its environment, so.
- 4:58Speaker 2: It doesn't matter how big the folder is.
- 5:00Speaker 3: Precisely, it doesn't matter if there are two folders in
- 5:03Speaker 3: the directory or two thousand files. The loop simply scales
- 5:06Speaker 3: to fit the exact size of the collection without breaking
- 5:09Speaker 3: a sweat.
- 5:09Speaker 2: Wow, that is efficient.
- 5:11Speaker 3: Yeah. It processes each item, appends it to that single
- 5:14Speaker 3: stringbuilder instance, and separates them with a new line. Once
- 5:18Speaker 3: it finishes the folders, it instantly moves to the innumered
- 5:21Speaker 3: files method, grabbing.
- 5:23Speaker 1: The files and appending them right onto the end of
- 5:25Speaker 1: that exact same notepad.
- 5:26Speaker 3: You got it, and crucially uses the exact same stringbuilder
- 5:30Speaker 3: instance for both folders and files. They're just back to back.
- 5:34Speaker 1: Only when it has perfectly formatted this massive list. Does
- 5:38Speaker 1: it convert that stringbuilder instance into one solid string of
- 5:41Speaker 1: texts to return to the parser exactly? Okay, so our
- 5:44Speaker 1: scout has mapped the room. But here's the obstacle. A
- 5:48Speaker 1: map is essentially useless if you don't know who owns
- 5:51Speaker 1: the house.
- 5:51Speaker 3: This is very true.
- 5:52Speaker 1: The agent can walk the halls, but it needs context
- 5:55Speaker 1: and needs to know exactly who and what it is
- 5:57Speaker 1: dealing with.
- 5:58Speaker 3: And that transition from navigation to intelligence gathering is where
- 6:01Speaker 3: the reconnaissance functions come in. We map specific keyword triggers
- 6:06Speaker 3: in the command parser to dedicated functions.
- 6:08Speaker 1: And these functions pull from a central general infoclass.
- 6:11Speaker 3: Right. Yes. Think of this class as a blueprint that
- 6:14Speaker 3: the program brings to life or instantiates the moment it
- 6:17Speaker 3: starts running.
- 6:18Speaker 1: Okay, let's look at those triggers. If the parser reads
- 6:21Speaker 1: a keyword like host name, it fires a function called
- 6:24Speaker 1: get host's name. If it reads username, it triggers get username.
- 6:29Speaker 3: It is simple cause and effect.
- 6:30Speaker 2: Yeah.
- 6:31Speaker 1: If it receives PWD, which is print working directory, it
- 6:35Speaker 1: uses get working directory to confirm its absolute location on
- 6:39Speaker 1: the hard drive.
- 6:40Speaker 3: The modularity of that design is what makes it so robust,
- 6:44Speaker 3: and it goes much deeper than just asking the computer
- 6:46Speaker 3: for its name. We can program it to pull the
- 6:48Speaker 3: system's IV four address. Oh interesting, We can even have
- 6:51Speaker 3: it grab its own executable path using a function like getex.
- 6:55Speaker 1: Path, meaning the program can import back to you exactly
- 6:58Speaker 1: where its own file is physically and within the target
- 7:01Speaker 1: system exactly.
- 7:02Speaker 3: It tells you its own coordinates.
- 7:03Speaker 1: Here's where it gets really interesting to me. We aren't
- 7:06Speaker 1: just passively asking the computer for a static IP address.
- 7:10Speaker 1: We are actively interrogating its current live state.
- 7:14Speaker 3: Right you are looking at what it is doing right now?
- 7:16Speaker 1: Take process information for example, when the parser asks for
- 7:20Speaker 1: process info, the program doesn't just return a name.
- 7:23Speaker 3: No, it needs more than that.
- 7:24Speaker 1: It is coded to pull both the process name and
- 7:27Speaker 1: the numerical process ID, and it combines them with a
- 7:30Speaker 1: space into one readable string. But why go through the
- 7:34Speaker 1: trouble of pulling the process id? Isn't knowing the name
- 7:37Speaker 1: of the application enough?
- 7:38Speaker 3: Not if you actually want to control the machine. The
- 7:41Speaker 3: operating system uses process IDs or PIDs to manage scheduling
- 7:46Speaker 3: in memory.
- 7:47Speaker 1: Okay, so how does that work in practice?
- 7:49Speaker 3: Well, imagine a bustling restaurant kitchen. The process name is
- 7:53Speaker 3: just a job title like chef, but you might have
- 7:56Speaker 3: fifty separate tabs of Google Chrome open.
- 7:58Speaker 2: Right, it happens to me all the time.
- 8:00Speaker 3: To the computer, those are fifty different chefs. The process
- 8:03Speaker 3: ID is their specific employee badge number. Oh. I see,
- 8:06Speaker 3: if you tell the system to terminate a process by name,
- 8:09Speaker 3: it might fail or close the wrong thing entirely. You
- 8:13Speaker 3: need that exact numerical process ID to definitively interact with
- 8:16Speaker 3: the specific task.
- 8:18Speaker 2: That distinction is crucial. You need the badge number.
- 8:22Speaker 1: And this interrogation goes even further into security clearances, doesn't it.
- 8:26Speaker 3: It does. When the parser receives the command for privileges,
- 8:30Speaker 3: it triggers a function that checks if the current user
- 8:32Speaker 3: profile running the program is an administrator.
- 8:35Speaker 1: And at the system architecture level, that check returns a
- 8:39Speaker 1: boolean value.
- 8:40Speaker 3: Right, a boolean meaning a simple binary true or false.
- 8:44Speaker 1: But our code intercepts that raw true or false data
- 8:48Speaker 1: and converts it into a readable string to send back.
- 8:51Speaker 1: We are literally putting the system under a spotlight and
- 8:54Speaker 1: asking are you an admin?
- 8:55Speaker 3: If we connect this to the bigger picture of network operations,
- 8:59Speaker 3: this is the definitive crossroads of any deployment. How so well.
- 9:04Speaker 3: Legitimate remote IT management software uses this exact logic to
- 9:08Speaker 3: audit company laptops and push software updates, and malicious cyber
- 9:12Speaker 3: attacks use this identical reconnaissance phase to map out a target.
- 9:16Speaker 1: It is the exact same blueprint exactly.
- 9:18Speaker 3: Knowing whether or not you have administrative privileges dictates your
- 9:21Speaker 3: entire operational playbook. If you are an admin, you have
- 9:23Speaker 3: the keys to the kingdom.
- 9:24Speaker 1: You can alter the registry, create new users, disable firewalls.
- 9:28Speaker 3: Right, and if you aren't, your agent has to pivot
- 9:31Speaker 3: immediately and look for ways to elevate its privileges.
- 9:33Speaker 1: It really highlights how these programming tools are entirely neutral.
- 9:38Speaker 1: It is the intent of the person deploying them that
- 9:40Speaker 1: changes the equation.
- 9:42Speaker 3: That's absolutely right.
- 9:43Speaker 1: So our digital agent is incredibly capable. Now it can
- 9:47Speaker 1: walk through directories efficiently using stringbuilder. It can map the network,
- 9:51Speaker 1: pull specific process IDs, and verify security clearances.
- 9:56Speaker 3: But reconnaissance is inherently passive.
- 9:58Speaker 1: Right. Eventually, the this program needs to manipulate its environment.
- 10:02Speaker 1: It has to step beyond those pre programmed keywords we
- 10:05Speaker 1: give it.
- 10:06Speaker 3: It needs to tap directly into the computer's central nervous system.
- 10:09Speaker 3: In a Windows environment. That nervous system is the command
- 10:12Speaker 3: line prompt or CMD, So.
- 10:14Speaker 1: We build a fallback mechanism into our parser for that.
- 10:17Speaker 3: We do if the program receives a command that doesn't
- 10:20Speaker 3: match any of our pre defined keywords like host name
- 10:22Speaker 3: or username, it assumes you want to send that instruction
- 10:25Speaker 3: directly to the operating system itself.
- 10:27Speaker 1: So it routes that unrecognized command straight into a custom
- 10:31Speaker 1: execute MD function.
- 10:32Speaker 3: Exactly, and to interact with the system at this root level,
- 10:36Speaker 3: the code relies on something called the process class.
- 10:38Speaker 1: You mentioned earlier that the process class lives inside the
- 10:42Speaker 1: system diagnostics name space. For someone trying to visualize that,
- 10:47Speaker 1: what exactly is a name space and what is a
- 10:49Speaker 1: process class?
- 10:50Speaker 3: Think of the system diagnostics name space as a massive,
- 10:55Speaker 3: highly organized warehouse of tools provided by the operating system.
- 11:00Speaker 3: We don't just ask the computer for a generic tool.
- 11:02Speaker 2: You have to be specific, right.
- 11:03Speaker 3: You tell it to go to a specific aisle, which
- 11:05Speaker 3: is the name space, to find the exact tool you need.
- 11:09Speaker 3: The process class is a specialized tool in that aisle.
- 11:12Speaker 2: Okay, And what does it do?
- 11:13Speaker 3: It allows one running program to spawn, control, and monitor
- 11:17Speaker 3: an entirely separate program.
- 11:18Speaker 2: So we pull the process class tool off the shelf.
- 11:21Speaker 2: But we have to tell it what file to run.
- 11:23Speaker 3: Yes, in this architecture, we set the file name property
- 11:26Speaker 3: to cmd dot ex. But opening a blank command prompt is.
- 11:30Speaker 1: Useless, right, We need it to run our arbitrary command.
- 11:33Speaker 3: So we passed arguments to it. The code passes a
- 11:35Speaker 3: slash she argument followed by whatever command the parser couldn't recognize.
- 11:40Speaker 2: What does the slash she actually do Under the hood,
- 11:42Speaker 2: It is.
- 11:42Speaker 3: An essential instruction for the Windows command processor. The slash
- 11:46Speaker 3: C stands for a carry out the command and then terminate.
- 11:49Speaker 1: Oh, so it tells the command prompt to wake up,
- 11:52Speaker 1: execute the exact string of instructions we feed it, and
- 11:55Speaker 1: then instantly close itself. Exactly why the rush to close
- 11:58Speaker 1: it though.
- 11:59Speaker 3: Memory management and stealth. If you don't explicitly tell the
- 12:02Speaker 3: process to terminate, you create what are called zombie processes.
- 12:06Speaker 1: Zombie processes that sounds bad.
- 12:08Speaker 3: They are. These are hidden command prompts, just hanging around
- 12:12Speaker 3: in the background, consuming memory and system resources.
- 12:14Speaker 2: So anyone looking would spot them.
- 12:16Speaker 3: Right, A good system administrator will spot a dozen orphan
- 12:19Speaker 3: command prompts in their task manager and immediately know something
- 12:23Speaker 3: is wrong. The slash c ensures the process is surgical,
- 12:27Speaker 3: wake up, execute vanish.
- 12:30Speaker 1: Okay, that makes sense, but I see a glaring physical
- 12:32Speaker 1: problem here. What is that if we just run cmd
- 12:35Speaker 1: dot ex, even if it closes immediately, a black command
- 12:39Speaker 1: prompt window is going to physically pop up on the
- 12:41Speaker 1: user's screen. Normally it would it will run the code
- 12:44Speaker 1: and flash out of existence. But if a user is
- 12:47Speaker 1: staring right at their monitor, they are going to see
- 12:50Speaker 1: a black box flash across their desktop. That completely ruins
- 12:54Speaker 1: the illusion of an invisible background agent.
- 12:57Speaker 3: That is the exact problem developers face. And this is
- 13:00Speaker 3: where the true stealth mechanics are applied.
- 13:03Speaker 2: Ah.
- 13:03Speaker 3: Here we go to make this execution completely invisible. We
- 13:07Speaker 3: can figure two vital properties within that process class we
- 13:10Speaker 3: pulled from the warehouse. First, we set a property called
- 13:13Speaker 3: use shell execute to false.
- 13:16Speaker 2: So what does that mean in practical terms?
- 13:18Speaker 3: Well, by default, the operating system wants to use its
- 13:21Speaker 3: shell to launch programs. The shell is the graphical intertace environment.
- 13:25Speaker 1: The thing that draws the windows and renders the.
- 13:27Speaker 3: Fund exactly it interacts with the desktop. By setting use
- 13:31Speaker 3: shell execute to false, we are explicitly telling the OS
- 13:34Speaker 3: to bypass the graphical shell entirely.
- 13:37Speaker 2: So how would you visualize that?
- 13:38Speaker 3: Imagine the graphical interface is a fancy restaurant's front of
- 13:41Speaker 3: house waiter. Normally you asked the waiter to bring your food.
- 13:45Speaker 3: Setting this to false is bypassing the waiter, walking directly
- 13:49Speaker 3: into the kitchen and handing the underlying executable your order
- 13:53Speaker 3: ticket yourself.
- 13:53Speaker 1: Okay, so we bypassed the visual launcher. But bypassing the
- 13:57Speaker 1: shell doesn't guarantee the program won't try to draw its
- 14:00Speaker 1: own window.
- 14:01Speaker 3: Does it. No, it doesn't. So there's a second property
- 14:04Speaker 3: we need to change, which is create no window. And
- 14:07Speaker 3: the code sets create no window to true.
- 14:09Speaker 2: And that finishes the job.
- 14:11Speaker 3: That is the absolute silencer on the weapon. Setting create
- 14:14Speaker 3: no window to true is an absolute directive to the
- 14:17Speaker 3: operating system. Do not allocate visual desktop space for this process,
- 14:21Speaker 3: regardless of what the program is doing.
- 14:24Speaker 2: So what does this.
- 14:24Speaker 1: All mean When we put it together? Our program is
- 14:27Speaker 1: basically acting like a digital poltergeist.
- 14:29Speaker 3: I love that, a digital poltergeist.
- 14:31Speaker 1: Yeah, it receives an instruction, silently opens a command prompt
- 14:35Speaker 1: behind the scenes, types out a complex command, hits enter
- 14:38Speaker 1: and terminates it.
- 14:39Speaker 3: And because you shall execute as false and create no
- 14:42Speaker 3: window is true, the person staring right at the screen
- 14:46Speaker 3: won't see a single flicker, no taskbar, icon, no pop up,
- 14:49Speaker 3: absolutely nothing.
- 14:51Speaker 1: But wait, if there is no window and no graphical shell,
- 14:55Speaker 1: how do we see the results of the command? I mean,
- 14:57Speaker 1: if we run a command to list the network figuration,
- 15:01Speaker 1: the computer is generating that text, but it is essentially
- 15:04Speaker 1: shouting the answer into a void.
- 15:06Speaker 3: Right. The agent has to capture the echo, and the
- 15:08Speaker 3: architecture handles this by explicitly redirecting the input and output streams.
- 15:13Speaker 2: How does it do that?
- 15:14Speaker 3: The developer sets a property called redirect standard output to true.
- 15:18Speaker 3: This tells the hidden command prompt, do not print your
- 15:21Speaker 3: results to a screen that doesn't exist. Route all of
- 15:24Speaker 3: your texts directly back into my program's memory. Oh sneaky
- 15:28Speaker 3: very They use a specific method called redtone to quietly
- 15:32Speaker 3: capture every single line of that incoming output and store
- 15:35Speaker 3: it in a hidden stream variable.
- 15:36Speaker 2: And it has to handle failures too, I imagine.
- 15:39Speaker 3: Yes, it sets redirect standard error to true. If the
- 15:42Speaker 3: command fails, or if the system throws an access denied
- 15:45Speaker 3: error because we lack admin privileges, the program captures that
- 15:48Speaker 3: error message silently using red tone as well.
- 15:51Speaker 1: So the user never sees a Windows ERR pop up either.
- 15:53Speaker 1: The invisible agent just pockets the error code to analyze later.
- 15:57Speaker 3: This raises an important question about operating system architecture. The
- 16:01Speaker 3: operating system is intentionally designed to allow background processes to
- 16:05Speaker 3: interact with the core command line entirely in the shadows.
- 16:08Speaker 2: Wait, really, it's designed to do this.
- 16:10Speaker 3: Yes, we are utilizing built in system diagnostics libraries. This
- 16:15Speaker 3: isn't a hack, it is a feature.
- 16:17Speaker 2: Wow.
- 16:18Speaker 3: It is an incredibly powerful feature for legitimate developers building
- 16:22Speaker 3: background services that need to run without interrupting the user.
- 16:26Speaker 3: But it perfectly illustrates why monitoring hidden processes is a
- 16:30Speaker 3: cornerstone of cybersecurity.
- 16:31Speaker 1: Because the tools for silent execution are built right into
- 16:34Speaker 1: the framework of the machine exactly, it is wild to
- 16:37Speaker 1: think about to prove this whole phantom system works. The
- 16:40Speaker 1: ultimate test case a developer would run through this invisible
- 16:43Speaker 1: parser is the command ipcomefig slash all.
- 16:46Speaker 3: It is the perfect stress test. It generates a massive
- 16:49Speaker 3: amount of incredibly sensitive data.
- 16:50Speaker 2: Right, let's trace it.
- 16:51Speaker 1: The programmers use ipconfig slash all, the parser realizes it
- 16:55Speaker 1: isn't a predefined keyword like username, so it forwards it
- 16:58Speaker 1: to the execute XMD function, and.
- 17:00Speaker 3: The process class silently spins up cmd dot ex.
- 17:04Speaker 1: With the slash C switch to ensure it closes afterward.
- 17:08Speaker 1: You shall execute is set to false to bypass the
- 17:11Speaker 1: graphical waiter, and create no window is set to true
- 17:14Speaker 1: to ensure total invisibility.
- 17:16Speaker 3: The command prompt executes the instruction gathering the machines, ams, addresses,
- 17:21Speaker 3: IP addresses, DNS, servers, every deeply held network secret the
- 17:25Speaker 3: computer possesses, and it.
- 17:26Speaker 1: Routes all that text back through standard output, captures it
- 17:30Speaker 1: with weed toe end, and neatly stores it in our
- 17:32Speaker 1: result variable, all.
- 17:34Speaker 3: In a fraction of a second, without a single pixel
- 17:36Speaker 3: changing on the user's monitor.
- 17:38Speaker 1: It is just a masterclass in system architecture. Let's take
- 17:41Speaker 1: a moment to recap the incredible journey we have been
- 17:44Speaker 1: on today. We started by teaching our digital agent how
- 17:46Speaker 1: to walk and see.
- 17:47Speaker 3: We use the directory class to alter the program's working environment,
- 17:51Speaker 3: and we brought in the string builder to solve the
- 17:53Speaker 3: massive memory allocation problem, efficiently looping through and recording every
- 17:57Speaker 3: single folder and file in place.
- 17:59Speaker 1: Then we move into intelligence gathering. We mapped out triggers
- 18:02Speaker 1: to our general infoclass, allowing the agent to ask the
- 18:05Speaker 1: computer for its username.
- 18:07Speaker 3: We also pulled those crucial numerical process IDs to interact
- 18:10Speaker 3: with other programs, and checked its security clearance by converting
- 18:13Speaker 3: the system's boolean admin check into a readable true or
- 18:17Speaker 3: false string.
- 18:18Speaker 1: Finally, we became the puppeteer. We use the process class
- 18:22Speaker 1: from the system diagnostics name space to pipe unrecognized commands
- 18:25Speaker 1: directly into the Windows command processor using cmd, dot, exe,
- 18:30Speaker 1: slash C.
- 18:31Speaker 3: And we redirected standard output and errors back to our
- 18:34Speaker 3: program to capture the results. It is a profound look
- 18:38Speaker 3: at how software interacts with an operating system at the
- 18:41Speaker 3: foundational level.
- 18:42Speaker 1: It really is bypassing all those visual illusions we interface
- 18:45Speaker 1: with daily. Now, since you have been on this entire
- 18:48Speaker 1: architecture journey with us, a quick test of your new
- 18:51Speaker 1: knowledge to lock this in here. If you were building
- 18:53Speaker 1: this program and you needed to run a system command
- 18:56Speaker 1: without alerting the user, what two specific properties of the
- 19:00Speaker 1: process class must you configure to ensure no visual footprint
- 19:03Speaker 1: is left behind. Take a second to think about it.
- 19:06Speaker 3: It is the key to the whole phantom setup, all right.
- 19:08Speaker 1: If you recalled that you must set you shall execute
- 19:11Speaker 1: to false and create no window to true. You absolutely
- 19:14Speaker 1: nailed it. You are officially ready to conceptualize hidden background processes.
- 19:19Speaker 3: Those two simple boolean values fundamentally alter the relationship between
- 19:23Speaker 3: the executing code and the user environment.
- 19:26Speaker 1: They really do, and that leaves us with one final lingering.
- 19:30Speaker 2: Question to ponder.
- 19:32Speaker 1: What's that if creating a completely hidden, silent command execution
- 19:37Speaker 1: process is this straightforward, using nothing but the system's own
- 19:41Speaker 1: built in diagnostics libraries and memory management tools, How many
- 19:45Speaker 1: invisible programs might be running on your machine right now,
- 19:49Speaker 1: politely asking for your IP address.
- 19:51Speaker 3: Yeah, that is definitely something to think about the next
- 19:53Speaker 3: time you leave your computer running in the dark.
- 19:55Speaker 2: Absolutely, thank you so much for joining us for this
- 19:57Speaker 2: deep dive. We will catch you next time.