Latest / CyberCode Academy / Course 16 - Red Team Ethical Hacking Beginner Course | Episode 1: Introduction to Red Teaming: Concepts, Tools, and Tactics
Transcript
- 0:00Speaker 1: Okay, let's unpack this. Today we are putting on the
- 0:03Speaker 1: gloves and diving deep into the world of offensive cybersecurity.
- 0:09Speaker 1: Our mission is pretty critical. To truly understand network security,
- 0:16Speaker 1: you have to well, you have to become the adversary,
- 0:19Speaker 1: that's right. So we're exploring the tactics, the powerful tools,
- 0:22Speaker 1: and the highly focused mindset needed to effectively mimic a
- 0:26Speaker 1: threat actor what the industry calls red teaming.
- 0:29Speaker 2: That's it exactly. And for you, the listener, I mean,
- 0:31Speaker 2: whether you're building applications or managing a network, building a
- 0:34Speaker 2: profile of the adversary is the single most effective thing
- 0:37Speaker 2: you can do, right. You just can't defend against the
- 0:39Speaker 2: strategy you don't understand.
- 0:41Speaker 1: And the foundational concept here is really that classic distinction
- 0:44Speaker 1: between red and blue. We all sort of know the
- 0:46Speaker 1: blue teams. They're the tireless network defenders.
- 0:48Speaker 2: Yeah, they're the ones in the trenches every day.
- 0:50Speaker 1: They're the security pros focused on defense, reviewing data logs
- 0:54Speaker 1: from firewalls, intrusion detection systems, analyzing network traffic captures with
- 1:00Speaker 1: tools like wireshark, and just.
- 1:01Speaker 2: Trying to patch every single vulnerability they can find.
- 1:04Speaker 1: The red teams on the other hand, they're the expert
- 1:07Speaker 1: aggressors completely.
- 1:09Speaker 2: They adopt a purely adversarial approach, mimicking the exact techniques
- 1:13Speaker 2: used by sophisticated real world thread actors.
- 1:16Speaker 1: So their goal isn't just to find a vulnerability, no.
- 1:19Speaker 2: Not at all. It's to bypass every layer of security
- 1:23Speaker 2: the blue team has put in place, and to do
- 1:25Speaker 2: it without being seen.
- 1:27Speaker 1: So their role is really twofold, exposing those organizational blind
- 1:31Speaker 1: spots that a normal scan might miss, and then actively
- 1:35Speaker 1: stress testing and training those Blue teams to elevate their
- 1:39Speaker 1: game under realistic pressure.
- 1:41Speaker 2: Exactly, and that dual role it requires a pretty rare
- 1:44Speaker 2: combination of skills. The Red team mindset isn't about following
- 1:47Speaker 2: a checklist. It's more about master level creative problem solving.
- 1:52Speaker 2: A top Red teamer thinks like a chess master twenty
- 1:55Speaker 2: moves ahead, always learning, always researching constantly, and they have
- 1:59Speaker 2: to have this deep cross disciplinary understanding of tech, programming, hardware,
- 2:03Speaker 2: obscure network protocols. It's a commitment to relentless outside the
- 2:08Speaker 2: box thinking.
- 2:09Speaker 1: What's fascinating here, though, is that even the most creative
- 2:12Speaker 1: attack needs some kind of structure. An adversary doesn't just
- 2:16Speaker 1: randomly click around.
- 2:17Speaker 2: No, they operate with a highly organized plan, and that
- 2:20Speaker 2: brings us to maybe the most universally recognized structure for
- 2:24Speaker 2: organizing that knowledge.
- 2:25Speaker 1: Yeah, the MI or EATT and CK framework.
- 2:28Speaker 2: It's really the cornerstone of modern thread intelligence. You can
- 2:32Speaker 2: think of it as the ultimate global knowledge base for
- 2:35Speaker 2: thread actors. It documents adversary tactics, techniques and procedures TTPs
- 2:41Speaker 2: based entirely on real world observations of successful attacks. It's
- 2:45Speaker 2: the common language for offense.
- 2:47Speaker 1: And defense TDPs tactics, techniques and procedures. That structure is
- 2:52Speaker 1: what gives it its power. Can you break down how
- 2:54Speaker 1: those three elements work together?
- 2:56Speaker 2: Sure? TTPs are the established way we analyze and adversaries operation.
- 3:00Speaker 2: When you look at the miter matrix, you see about
- 3:03Speaker 2: a dozen columns across the top right. Those are the tactics.
- 3:05Speaker 2: They represent the attacker's high level goal, the reason they're
- 3:08Speaker 2: doing something like initial access or persistence.
- 3:11Speaker 1: So that's the strategic goal, the why correct.
- 3:14Speaker 2: Then below those tactics you have the techniques. These are
- 3:18Speaker 2: the specific methods the adversary uses to achieve that tactic.
- 3:22Speaker 1: So if the tactic is initial access, a technique might
- 3:25Speaker 1: be what phishing.
- 3:27Speaker 2: Exactly, spearfishing link or maybe exploiting a public facing application.
- 3:32Speaker 1: And then that deepest layer, the procedures, that's where the
- 3:35Speaker 1: rubber meets the road.
- 3:36Speaker 2: Yeah, the procedures are the specific actionable details. These are
- 3:39Speaker 2: descriptions of past attacks by real world groups. They tell
- 3:43Speaker 2: you how a technique was executed, the exact software, the scripts,
- 3:47Speaker 2: the configuration, all to meet that tactical goal.
- 3:50Speaker 1: The genius of this system seems to be that it
- 3:53Speaker 1: lets red teams plan these sophisticated, multi stage attacks. But
- 3:57Speaker 1: for the blue team listener, how does this help them prioritize?
- 4:00Speaker 2: Oh, it's a complete game changer for that. Instead of
- 4:02Speaker 2: panicking about every minor vulnerability, a defender can look at
- 4:06Speaker 2: the tactics and ask, where are we weakest on, say,
- 4:09Speaker 2: initial access or where's our defense against lateral movement non existent?
- 4:13Speaker 2: It aligns your spending and your effort with the TTPs
- 4:16Speaker 2: that represent the highest real world risk. You're anticipating the
- 4:19Speaker 2: attack before it happens.
- 4:21Speaker 1: Okay, here's where we move from that strategic planning to
- 4:24Speaker 1: the technical execution. And what's often overlooked is that red
- 4:28Speaker 1: teams don't always need to bring in their own custom malware.
- 4:31Speaker 2: No, not at all. They love to leverage tools that
- 4:34Speaker 2: are already on the target system. It's a philosophy called
- 4:37Speaker 2: living off the.
- 4:38Speaker 1: Land because it's stealthy.
- 4:40Speaker 2: It's the cornerstone of stealth. You're not triggering alarms designed
- 4:44Speaker 2: to spot new unauthorized executables. And if we look at
- 4:48Speaker 2: the command line, we quickly move past the classic command
- 4:51Speaker 2: prompt or CMD into a much more well dangerous tool.
- 4:55Speaker 1: PowerShell powershow clearly offers massive administrative power. What's the single
- 5:00Speaker 1: biggest risk here for a security team.
- 5:02Speaker 2: Well, the risk is in its inherent scripting power and
- 5:05Speaker 2: crucially its capacity for remote execution. PowerShell uses these things
- 5:09Speaker 2: called command lits, which are built for robust system administration
- 5:13Speaker 2: and automation.
- 5:13Speaker 1: So a red teamer can just script complex tasks and.
- 5:16Speaker 2: Run them in memory, which is much harder to detect
- 5:18Speaker 2: than something written to disc. They can even execute commands
- 5:21Speaker 2: on remote systems seamlessly. It turns a management tool into
- 5:24Speaker 2: a post exploitation powerhouse.
- 5:27Speaker 1: And it gets even more specialized when we get into
- 5:29Speaker 1: deep system control.
- 5:31Speaker 2: That brings us to w MIIC, the Windows Management Instrumentation
- 5:35Speaker 2: command line. This utility lets you run WMI operations right
- 5:39Speaker 2: from the command line, giving you powerful control over local
- 5:42Speaker 2: and remote systems.
- 5:43Speaker 1: Which an attacker would absolutely weaponize.
- 5:45Speaker 2: Of course, they can start and stop processes, run scripts,
- 5:48Speaker 2: query detailed system info, and critically configure settings remotely. It's
- 5:52Speaker 2: a key tool for moving laterally across the network.
- 5:55Speaker 1: And then you have system functions designed for automation, like
- 5:58Speaker 1: scheduled tasks, which an attacker can just hijack.
- 6:00Speaker 2: The shask's utility. Yeah, an adversary uses this to ensure persistence.
- 6:05Speaker 2: They can set a script to run every morning at
- 6:07Speaker 2: three am, so even if the machine reboots, their access
- 6:10Speaker 2: reactivates automatically.
- 6:12Speaker 1: I get the persistence angle. But the Service Control Manager
- 6:15Speaker 1: or SEM access via SE dot ex that seems less
- 6:19Speaker 1: obvious as an attack vector. Why is that considered such
- 6:22Speaker 1: a high value action?
- 6:24Speaker 2: Ah? That is one of the most critical insights for
- 6:26Speaker 2: a defender. When an attacker uses SCM to run a
- 6:29Speaker 2: malicious payload as a service. Those services often execute with
- 6:33Speaker 2: system level privileges.
- 6:34Speaker 1: Okay, and that's a huge step up from just user
- 6:37Speaker 1: level access.
- 6:38Speaker 2: A profound distinction. System level privilege means you can bypass
- 6:42Speaker 2: standard OS security controls, access sensitive registry keys. You can
- 6:47Speaker 2: read and write to pretty much any part of the machine.
- 6:50Speaker 2: It's often the ultimate goal for an attacker on a host.
- 6:53Speaker 1: So if we connect this to the bigger picture. Once
- 6:56Speaker 1: that initial access is gained and some local control is established,
- 7:00Speaker 1: the adversary needs a remote operations center right. This is
- 7:04Speaker 1: command and control or C two.
- 7:06Speaker 2: C two is the lifeline. It's the capability that ensures
- 7:09Speaker 2: the attacker can reliably execute TTPs whenever they need to.
- 7:13Speaker 2: It's how they tell the compromise machine to start harvesting
- 7:16Speaker 2: credentials or exfiltrating data. It has to be stable, and.
- 7:20Speaker 1: This is where the C two frameworks come in. These
- 7:21Speaker 1: are the heavy hitters designed for post exploitation.
- 7:24Speaker 2: Precisely, these frameworks automate complexity. They come pre loaded with
- 7:28Speaker 2: custom commands for automating difficult things like lateral movement or
- 7:31Speaker 2: data harvesting. It lets one red teamer manage multiple compromises at.
- 7:35Speaker 1: Once, but the blue teams have to know these frameworks exist.
- 7:39Speaker 1: Aren't the standard commands easily detected?
- 7:41Speaker 2: And that is the constant cat and mouse game. Basic
- 7:45Speaker 2: automated commands are often flagged immediately by a good IDs
- 7:49Speaker 2: or IPS, so.
- 7:50Speaker 1: The red teamer has to get creative.
- 7:51Speaker 2: They have to innovate. They either develop their own custom
- 7:54Speaker 2: tools or more often, they meticulously modify the commands and
- 7:59Speaker 2: traffic profile within the C two framework to evade detection,
- 8:02Speaker 2: making their traffic look like normal web requests.
- 8:05Speaker 1: What are some of the big names here the frameworks
- 8:07Speaker 1: people might have heard of.
- 8:08Speaker 2: Well, on the commercial side, the leader is Cobalt Strike.
- 8:11Speaker 2: It's extremely popular and capable, used by corporations for legitimate
- 8:16Speaker 2: red teaming, but also you know, used illegally by threat.
- 8:19Speaker 1: Groups and for free options.
- 8:21Speaker 2: You've got frameworks like Covenant, which is focused on dot net,
- 8:24Speaker 2: and historically Empire was a huge one. It was all
- 8:26Speaker 2: about PowerShell, but it hasn't been supported since twenty nineteen
- 8:30Speaker 2: and blue teams are much better now at spotting PowerShell
- 8:33Speaker 2: based C two traffic.
- 8:34Speaker 1: So, once the C two is established, an adversary needs
- 8:37Speaker 1: precision tools to gather intel and escalate privileges. This brings
- 8:41Speaker 1: us to their specialized toolbox. Let's start with powersploy.
- 8:45Speaker 2: Powersploit is an incredibly useful open source collection of PowerShell modules.
- 8:50Speaker 2: It covers almost every phase of a pen test. Within it,
- 8:54Speaker 2: you'll find specialized tools.
- 8:55Speaker 1: Like powerview and what does powerview do.
- 8:58Speaker 2: It's for situational awareness and deep Windows domain enumeration. It
- 9:02Speaker 2: gives them a complete map of the domain hierarchy, so things.
- 9:05Speaker 1: Like finding which high value users are logged into which.
- 9:08Speaker 2: Machines exactly, or listing all domain trust information finding files
- 9:13Speaker 2: across the network. It lets the red team go from
- 9:16Speaker 2: access on one machine to understanding the entire organization's structure.
- 9:20Speaker 1: And if that enumeration finds a weakness powersploiit has tools
- 9:24Speaker 1: for that too.
- 9:24Speaker 2: That's where power up comes in. It's designed for privilege escalation.
- 9:28Speaker 2: It automatically scans the system for common misconfigurations like unsecured
- 9:32Speaker 2: services that allow an attacker to elevate their access from
- 9:35Speaker 2: a standard user to a system admin.
- 9:38Speaker 1: And if powersploy gives you the raw data, Bloodhound turns
- 9:41Speaker 1: that data into a strategic map.
- 9:43Speaker 2: Bloodhound is a visual game changer. It takes all those
- 9:46Speaker 2: complex hidden relationships within active directory and visualizes.
- 9:50Speaker 1: Them like a subway map of the network.
- 9:51Speaker 2: That's a great way to put it. The stations are
- 9:54Speaker 2: users and hosts and the lines are exploitable trust relationships.
- 9:58Speaker 2: It uses a script together all the ad info, loads
- 10:01Speaker 2: it into a database and gives you a gy and.
- 10:04Speaker 1: The ultimate value is that it quickly maps out the shortest,
- 10:08Speaker 1: most efficient path from say a low level user, all
- 10:11Speaker 1: the way up to a domain admin.
- 10:13Speaker 2: Precisely, it shows you how to leverage trust relationships that
- 10:16Speaker 2: were probably never intended to be used that way.
- 10:19Speaker 1: Okay, now for the tool that everyone's heard of, mimicads.
- 10:22Speaker 1: It's famous for dumping password hashes.
- 10:25Speaker 2: That's its legendary capability for sure, but it does more.
- 10:28Speaker 2: It can also pull clear text login passwords directly from memory,
- 10:32Speaker 2: which is just catastrophic for a network.
- 10:34Speaker 1: And it enables two incredibly powerful attacks, the first one
- 10:37Speaker 1: being past the hash correct.
- 10:39Speaker 2: Pass The hash lets an attacker authenticate to a system
- 10:42Speaker 2: using only the stolen password hash, you never need to
- 10:44Speaker 2: know the actual password.
- 10:46Speaker 1: And the second, even more powerful attack involves Carbero's tickets.
- 10:49Speaker 2: Yes, mimicats can create and use what are called golden tickets.
- 10:53Speaker 2: These are forged Carbos tickets that grant remote, persistent access
- 10:57Speaker 2: to the domain controller itself. Game over, it's the ultimate trophy.
- 11:02Speaker 2: You have access to virtually everything.
- 11:04Speaker 1: Finally, let's touch on impack. It. Unlike power split, which
- 11:08Speaker 1: is PowerShell based, impack it is a collection of Python
- 11:11Speaker 1: classes for network protocols impack.
- 11:14Speaker 2: It is the protocol whisperer. It lets attackers programmatically interact
- 11:18Speaker 2: with network services, often bypassing application security. It includes remote
- 11:23Speaker 2: execution tools that replicate legitimate software like PSZC, and it
- 11:28Speaker 2: even has its own credential extraction features and it enables
- 11:31Speaker 2: very specific attacks right absolutely. It has tools like get
- 11:35Speaker 2: two sir SPNs, which is central to kerberostan, an attack
- 11:38Speaker 2: that targets credentials tied to service accounts. It's an incredibly
- 11:42Speaker 2: versatile toolkit for low level protocol manipulation.
- 11:45Speaker 1: So what does this all mean when you put it
- 11:46Speaker 1: into action. Let's visualize a simple process setting up a
- 11:49Speaker 1: C two connection back to the Red team using metasploit.
- 11:52Speaker 2: Okay, we can break this down. First is preparation. The
- 11:55Speaker 2: Red Team machine needs to be ready to listen for
- 11:57Speaker 2: that incoming connection, so you make sure the database running.
- 11:59Speaker 2: Then you start metasplot.
- 12:00Speaker 1: Then you select the handler module, which is what's going
- 12:03Speaker 1: to manage the incoming payload.
- 12:05Speaker 2: That's right. You set up the multi handler module and
- 12:08Speaker 2: you define the specific payload you want the victim to execute,
- 12:11Speaker 2: say a reverse KEP payload for a Windows system.
- 12:14Speaker 1: And then comes the crucial configuration step. You have to
- 12:17Speaker 1: tell the payload where to.
- 12:18Speaker 2: Call home exactly. You can figure the LA host which
- 12:21Speaker 2: is your listening IP address, and the lport the port
- 12:24Speaker 2: you're using like four four four four, And critically, you
- 12:27Speaker 2: set the handler to persist so it keeps listening even
- 12:30Speaker 2: after it catches a session.
- 12:32Speaker 1: The listener is waiting. Now we need the malicious file itself.
- 12:35Speaker 2: We use a utility like msf venom to create that executable,
- 12:39Speaker 2: and you have to ensure it uses the exact same
- 12:41Speaker 2: payload type. LA shows an lport that you define on
- 12:44Speaker 2: the handler.
- 12:45Speaker 1: Everything has to match perfectly perfectly.
- 12:47Speaker 2: You set the file type to dot exc so it
- 12:49Speaker 2: runs on Windows. Name it something innocent.
- 12:51Speaker 1: And the final stage is delivery and execution.
- 12:54Speaker 2: Right, you host that payload, maybe on a simple web server,
- 12:57Speaker 2: and the final step is getting the target user to
- 13:00Speaker 2: download and most importantly run that file.
- 13:03Speaker 1: And the second they run that file, what happens.
- 13:05Speaker 2: An immediate connection. A session opens right up on the
- 13:08Speaker 2: Red team's waiting machine. You have access, you can check
- 13:11Speaker 2: the user ID and C two operations can begin using
- 13:15Speaker 2: all those specialized tools we just discussed.
- 13:17Speaker 1: That was an essential tour of the adversary's arsenal. We've
- 13:20Speaker 1: covered the core philosophy of red versus Blue, the strategic
- 13:24Speaker 1: playbook of a minor att and CK, the foundational windows
- 13:28Speaker 1: commands that become offensive.
- 13:29Speaker 2: Tools, and the immense power of specialized frameworks like Powersploit, Bloodhound,
- 13:34Speaker 2: and of course mimicets.
- 13:37Speaker 1: For you, the learner, understanding these TTPs is really the
- 13:40Speaker 1: best way to become a stronger defender or a more
- 13:42Speaker 1: informed security practitioner.
- 13:44Speaker 2: Absolutely, to secure a network, you have to learn to
- 13:47Speaker 2: think exactly like the adversary trying to break it.
- 13:50Speaker 1: So to reinforce what we've discussed, let's leave you with
- 13:52Speaker 1: a short exercise that builds on the power of mimicets.
- 13:55Speaker 2: This raises an important question focused on persistence. We talked
- 13:58Speaker 2: about both past the Hash and the Golden Ticket attack
- 14:01Speaker 2: for your own deep dive research the difference between the.
- 14:04Speaker 1: Two, specifically regarding persistence.
- 14:06Speaker 2: Yes, what critical change in privilege or duration of access
- 14:12Speaker 2: does that Golden ticket offer that just using past the
- 14:14Speaker 2: hash doesn't.
- 14:15Speaker 1: And here is the final provocative thought to take with you.
- 14:18Speaker 1: Every successful defensive measure implemented in your network today was
- 14:22Speaker 1: once a vulnerability systematically exploited by a red team. True
- 14:26Speaker 1: security isn't found in avoiding attacks, but in systematically learning
- 14:29Speaker 1: from every penetration attempt until there are no secrets left
- 14:32Speaker 1: for the edversary to uncover.