Latest / CyberSecurity Summary / Building Virtual Pentesting Labs for Advanced Penetration Testing
Transcript
- 0:00Speaker 1: So welcome to today's deep dive. I'm really glad you're
- 0:02Speaker 1: joining us for this one because we are getting into
- 0:04Speaker 1: something incredibly cool today.
- 0:06Speaker 2: Yeah, we're basically looking at how to safely play with
- 0:08Speaker 2: fire exactly.
- 0:10Speaker 1: I mean, if you want to learn how to fuse
- 0:11Speaker 1: a bomb, you practice on a dummy, right, Yeah, you
- 0:14Speaker 1: build this controlled environment where you know, clipping the wrong
- 0:17Speaker 1: wire just triggers a loud buzzer instead of doubling a city.
- 0:20Speaker 2: Block, right, which makes sense. But in the realm of
- 0:24Speaker 2: professional cybersecurity and ethical hacking, people constantly try to learn
- 0:28Speaker 2: their trade by just poking around on live critical networks,
- 0:31Speaker 2: which is terrifying. It's completely terrifying. So today we're digging
- 0:35Speaker 2: into this customized, exclusive exploration of Kevin Cardwell's comprehensive guide.
- 0:41Speaker 2: It's called building Virtual pen Testing Labs for advanced penetration testing.
- 0:46Speaker 1: And the mission for this deep dive isn't just learning
- 0:48Speaker 1: how to hack. It's about how to actually think like
- 0:51Speaker 1: a professional security tester, understand their exact systematic methodology, and
- 0:56Speaker 1: discover how to build a safe virtual playground to practice
- 1:00Speaker 1: these dark arts.
- 1:01Speaker 2: Yeah, without going to jail or you know, accidentally taking
- 1:04Speaker 2: down a hospital's database.
- 1:06Speaker 1: Right, But before we can build that sandbox, we have
- 1:08Speaker 1: to fundamentally understand what a professional tester is actually trying
- 1:12Speaker 1: to achieve in the first place.
- 1:13Speaker 2: And more importantly, what they're trying to break. Because the
- 1:18Speaker 2: industry throws the term penetration testing around quite loosely.
- 1:21Speaker 1: Oh totally. They treat security like it's a product you
- 1:24Speaker 1: can just buy and install exactly.
- 1:26Speaker 2: But Cardwell's entire thesis rests on the fact that security
- 1:30Speaker 2: is a process. It's a methodology, not a product.
- 1:33Speaker 1: Okay, let's unpack this because we all know the standard basics, right, authentication, authorization, confidentiality, integrity, availability,
- 1:42Speaker 1: and non repudiation, right, the.
- 1:43Speaker 2: Core components of security testing.
- 1:45Speaker 1: But the source material makes this fascinating point about confidentiality.
- 1:49Speaker 1: It's incredibly hard to protect because of the Internet's Bedrock
- 1:52Speaker 1: protocol TCPIP.
- 1:55Speaker 2: Yeah, the Transmission Control Protocol and Internet Protocol Suite, which.
- 1:59Speaker 1: Is built back in the early nine teen seventies, right.
- 2:01Speaker 2: For Arpinett, which was essentially just this tiny network connecting
- 2:05Speaker 2: a few academic institutions and military researchers.
- 2:08Speaker 1: Or everyone inherently trusted each other exactly.
- 2:11Speaker 2: The foundational assumption baked into The actual mathematics of TCPIP
- 2:16Speaker 2: was inherent trust.
- 2:17Speaker 1: Wow.
- 2:18Speaker 2: It was assumed that if you received a packet of data,
- 2:21Speaker 2: it came from a reliable, friendly source. It wasn't designed
- 2:25Speaker 2: for secrecy.
- 2:26Speaker 1: So we basically took a protocol designed for a friendly
- 2:30Speaker 1: neighborhood block party and used it to build a highly
- 2:34Speaker 1: hostile global metropolis.
- 2:36Speaker 2: That's a great way to put it. What's fascinating here
- 2:39Speaker 2: is how that inherent trust issue completely undermines non repudiation, right.
- 2:43Speaker 1: The idea that you can mathematically prove a specific person
- 2:46Speaker 1: sent a specific.
- 2:47Speaker 2: Message exactly, because all it takes is one compromised machine
- 2:50Speaker 2: to throw that ole concept out the window. If a
- 2:53Speaker 2: machine has a remote access trojan on it, you can't
- 2:55Speaker 2: guarantee its state because.
- 2:57Speaker 1: You can't prove the human sitting at the keyboard actually
- 3:00Speaker 1: like send rather than like a malicious script running in
- 3:03Speaker 1: the background.
- 3:04Speaker 2: Precisely, and that shaky foundation brings up this massive corporate
- 3:09Speaker 2: myth that Cardwall talks about.
- 3:11Speaker 1: Oh, the vulnerability assessment versus pen testing thing.
- 3:14Speaker 2: Yeah, most clients do not know what a penetration test
- 3:17Speaker 2: actually is. They sign a contract for one, but they
- 3:20Speaker 2: really just want a vulnerability assessment.
- 3:22Speaker 1: I mean, a vulnerability assessment is basically like walking around
- 3:25Speaker 1: a house checking if the windows are unlocked.
- 3:27Speaker 2: Right, it's just a mapping exercise.
- 3:29Speaker 1: But a true penetration test is actually climbing through the window,
- 3:33Speaker 1: walking into the living room and seeing if you can
- 3:34Speaker 1: carry out the TV.
- 3:35Speaker 2: Yes. True penetration testing involves actual exploitation to validate the vulnerability,
- 3:42Speaker 2: and clients usually panic when they realize you intend to
- 3:44Speaker 2: climb through the window.
- 3:45Speaker 1: Wait, there was that amazing anecdote in the book.
- 3:47Speaker 2: About this, right, Oh, the Foreign stock market it director. Yeah,
- 3:51Speaker 2: so Cardwell recalls meeting with this director outlining the methodology.
- 3:54Speaker 1: And he gets to the validation phase.
- 3:56Speaker 2: Right, he explains they'll run real exploit code, and the
- 3:59Speaker 2: director just haddocks and says, that is my stockbroker records,
- 4:02Speaker 2: and if we lose them, we lose a lot of money.
- 4:05Speaker 1: Oh, man, I bet they skip the validation step.
- 4:08Speaker 2: They absolutely skip the validations.
- 4:10Speaker 1: Because proving the windows unlocked isn't worth the risk of
- 4:13Speaker 1: accidentally burning the house down exactly. But okay, armed with
- 4:17Speaker 1: this knowledge that true pen testing requires exploitation, how does
- 4:21Speaker 1: a professional systematically get to that point?
- 4:24Speaker 2: Well, we have to look at the hackers blueprint, and
- 4:27Speaker 2: card Well notes the crucial difference in the planning phase
- 4:30Speaker 2: between a pro and a malicious hacker.
- 4:33Speaker 1: Right time and legality. A malicious hacker has what six
- 4:37Speaker 1: to nine months to plan, yeah.
- 4:38Speaker 2: Six to nine months to passively stalk a target, and
- 4:41Speaker 2: they can break the law. A professional tester bound by
- 4:44Speaker 2: ethics has a two week contract and strict legal lines.
- 4:47Speaker 1: Which means the pro has to rely heavily on ocentth
- 4:50Speaker 1: right open source intelligence that non intrusive target.
- 4:53Speaker 2: Search exactly, gathering public info without sending a single packet
- 4:57Speaker 2: directly to the target's internal network use tools like end
- 5:01Speaker 2: slook up or server sniff.
- 5:03Speaker 1: Oh. Server sniff is so clever because Microsoft servers often
- 5:07Speaker 1: block standard icmpping requests by default.
- 5:10Speaker 2: Right, so a normal trace road just dies at the firewall.
- 5:13Speaker 1: But Servicesniff gets around that by doing a TCP trace rope.
- 5:16Speaker 2: Yes, it sends a tcps yn packet, usually to port
- 5:20Speaker 2: eighty or four to forty three, and if they're hosting
- 5:22Speaker 2: a public web server, the firewall has to let.
- 5:25Speaker 1: That packet through or their website wouldn't work.
- 5:27Speaker 2: Exactly, so you bypass the block by exploiting the ports
- 5:31Speaker 2: that the business requires to be open.
- 5:32Speaker 1: That's brilliant. And then there's the whole wayback machine strategy.
- 5:36Speaker 2: Oh yeah, finding deleted tools.
- 5:38Speaker 1: The specific example he gave was wild. He was looking
- 5:41Speaker 1: for this stiganography tool called infistago right.
- 5:44Speaker 2: From anti Labs. They had pivoted to antivirus software and
- 5:49Speaker 2: completely scrubbed infistago from their site.
- 5:51Speaker 1: But Cardwell just used the two thousand and eight archives
- 5:54Speaker 1: on the way back Machine to find the old site
- 5:56Speaker 1: and download the executable.
- 5:57Speaker 2: Anyway, because the Internet never really forgets see.
- 6:00Speaker 1: That is amazing. But then we get to Showdan and
- 6:02Speaker 1: this is where I have to push back a little bit.
- 6:03Speaker 2: Okay, lay it on me.
- 6:04Speaker 1: Showdan is basically this massive cloud scanner. Right, Cardwell searches
- 6:09Speaker 1: for like iPhone RU and instantly gets a list of
- 6:12Speaker 1: specific vulnerable servers in Russia.
- 6:14Speaker 2: Yeah, with IP addresses and open ports.
- 6:17Speaker 1: Right. So, if tools like showdan are publicly indexing vulnerable
- 6:22Speaker 1: servers globally, isn't that blurring the line between passive research
- 6:27Speaker 1: and handing a loaded gun to the bad guys.
- 6:30Speaker 2: Well, that's exactly why the methodology is so rigid. Showdowan
- 6:33Speaker 2: is doing the active scanning as user, You're just reading
- 6:36Speaker 2: a public database. The progression from passive observation to active probing.
- 6:41Speaker 2: That's where the legal and ethical lines are drawn.
- 6:43Speaker 1: Ah okay, so looking at Shrodan is just reading the
- 6:46Speaker 1: phone book exactly.
- 6:47Speaker 2: But the moment you direct your own machine to interact
- 6:50Speaker 2: with those ips, you enter the intrusive target search phase.
- 6:53Speaker 2: You're dialing the numbers.
- 6:54Speaker 1: And that requires authorization.
- 6:55Speaker 2: Explicit written authorization. Once you have that, you start finding
- 6:59Speaker 2: live systems with en mapping sweeps, checking open ports, and.
- 7:03Speaker 1: The OS numeration is wild. Using the n.
- 7:05Speaker 2: Map a command, Yeah, it analyzes the microscopic quirks in
- 7:09Speaker 2: how the server's TCPIP stack responds to guess the OS version.
- 7:13Speaker 2: Then you bring in a vulnerability scanner like nexpos.
- 7:15Speaker 1: And finally exploitation.
- 7:17Speaker 2: Right cardwill uses metasploit exploiting the MS zero eight zero
- 7:21Speaker 2: six seven vulnerability as his example to get a command shell.
- 7:24Speaker 1: But getting there means analyzing the data correctly, like reading
- 7:28Speaker 1: wire shark packet capture.
- 7:29Speaker 2: Oh, the ICLC type three code thirteen example, that's a classic, Yeah.
- 7:34Speaker 1: Walk us through that because to an untrained eye it
- 7:37Speaker 1: just looks like a connection error.
- 7:38Speaker 2: Right, So type three means destination unreachable, but the specific
- 7:43Speaker 2: code thirteen means the communication is administratively.
- 7:46Speaker 1: Filtered, meaning it's not a broken network exactly.
- 7:49Speaker 2: It alerts the tester that a router explicitly blocked it
- 7:53Speaker 2: because there is an access control list and ACL in place.
- 7:56Speaker 1: It's like navigating a maze by tapping a cane against
- 7:59Speaker 1: the wall and listening to the echo.
- 8:01Speaker 2: That's a perfect analogy.
- 8:02Speaker 1: But executing a buffer overflow or probing an ACL on
- 8:05Speaker 1: a live corporate network is exactly what caused that stock
- 8:09Speaker 1: market director.
- 8:10Speaker 2: To panic, which is why you have to build the matrix.
- 8:12Speaker 1: The virtual sandbox.
- 8:14Speaker 2: Yes, choosing your virtual environment is critical, and Cardwall breaks
- 8:17Speaker 2: it down into type one versus type two virtualization.
- 8:20Speaker 1: Okay, here's where it gets really interesting because using a
- 8:23Speaker 1: type one hypervisor like vSphere Hypervisor or esen, it rides
- 8:28Speaker 1: directly on the hardware. Right, it's incredibly powerful, but it's
- 8:32Speaker 1: basically like demolishing a house to the foundation just to
- 8:36Speaker 1: build a custom recording studio. It dictates the OS directly,
- 8:39Speaker 1: which is terrible for a.
- 8:40Speaker 2: Laptop because you still need to write reports and check emails.
- 8:44Speaker 1: Exactly, So use a type two hypervisor like virtual Box,
- 8:48Speaker 1: hyper v or VMware Workstation, which.
- 8:50Speaker 2: Rides on top of your existing operating system.
- 8:53Speaker 1: It's like putting up soundproof partition walls in your existing
- 8:55Speaker 1: spare bedroom. You still get the studio, but you don't
- 8:58Speaker 1: have to wreck the house.
- 8:59Speaker 2: I love that, but the tool nuances matter here. Virtual
- 9:02Speaker 2: Box is great and it's free, but Cardwell notes it
- 9:05Speaker 2: suffers from keyboard input.
- 9:07Speaker 1: Glitches, yeah, requiring special extensions to fix. And then Microsoft's
- 9:11Speaker 1: hyper V.
- 9:11Speaker 2: Hyper v is tricky. It requires a sixty four bit
- 9:15Speaker 2: OS and a CPU that supports.
- 9:17Speaker 1: Sell it second level address translation.
- 9:19Speaker 2: Right, And even if you have that, it historically struggles
- 9:22Speaker 2: with Linux networking, which is a huge problem since so
- 9:25Speaker 2: many pen testing tools are Linux based.
- 9:27Speaker 1: So the winner is VMware Workstation.
- 9:29Speaker 2: Yes, it costs money, but it is the winner, and.
- 9:32Speaker 1: It's the winner because of the virtual switches. Right. It
- 9:34Speaker 1: allows for up to ten virtual switches on Windows.
- 9:38Speaker 2: And up to two hundred and fifty five on Linux hosts.
- 9:42Speaker 2: If we connect this to the bigger picture, the reason
- 9:45Speaker 2: those ten virtual switches matter so much is because real
- 9:48Speaker 2: world corporate networks are never flat.
- 9:51Speaker 1: They aren't just one router with everything plugged in exactly.
- 9:54Speaker 2: They are segmented. You have firewalls, DMZs, internal routing rules.
- 10:00Speaker 2: If you can't simulate those complex, multi layered architectures, your
- 10:04Speaker 2: practice lab is useless. For advanced testing.
- 10:07Speaker 1: You can't practice pivoting from a web server to an
- 10:09Speaker 1: internal database if everything's on a single flat network.
- 10:12Speaker 2: Precisely, VMware Workstation gives you the infrastructure to build the
- 10:16Speaker 2: actual maze.
- 10:17Speaker 1: The room is useless if it's empty, right, how do
- 10:19Speaker 1: we put realistic targets inside it?
- 10:21Speaker 2: Well, you can populate it using pre built vulnerable ISOs.
- 10:24Speaker 2: The security community has great options.
- 10:26Speaker 1: Like the Samurai Web Testing Framework Samurai WTF.
- 10:29Speaker 2: Yeah, or the oas Broken Web Application Project, which is
- 10:32Speaker 2: actually sponsored by Mandian and.
- 10:34Speaker 1: That includes tools like webgoat and Mutility.
- 10:36Speaker 2: Exactly, you just mount the ISO, boot it up, and
- 10:39Speaker 2: you have a target rich environment.
- 10:40Speaker 1: But what about the format problem? Like what if a
- 10:43Speaker 1: client gives you a VMware image a VMDK format but
- 10:47Speaker 1: you only have Microsoft hyperv which uses VHD.
- 10:51Speaker 2: That happens a lot. You can use conversion tools like
- 10:53Speaker 2: the Starwin vtwov converter.
- 10:55Speaker 1: Although the author notes of funny quirk about that.
- 10:57Speaker 2: Oh yeah, He mentions that FreeBSD Systems old version nine
- 11:00Speaker 2: point x usually just break during the.
- 11:03Speaker 1: Conversion, just completely bricked.
- 11:04Speaker 2: Yeah, totally unusable. But for modern Windows and Linux it
- 11:07Speaker 2: works great.
- 11:08Speaker 1: But the coolest thing in this whole section has to
- 11:10Speaker 1: be P two V Physical to virtual.
- 11:13Speaker 2: Oh absolutely, using tools like v center converter or even
- 11:16Speaker 2: a feature built right into VMware workstation.
- 11:19Speaker 1: So what does this all mean for the listener? I mean,
- 11:21Speaker 1: imagine the power of this. You can literally take a chaotic,
- 11:26Speaker 1: terrifyingly fragile server from a client's physical.
- 11:29Speaker 2: Office like that's stock market server.
- 11:31Speaker 1: Yes, you digitally clone it, trap it in your VMware matrix,
- 11:34Speaker 1: and hit it with exploits all day long without ever
- 11:37Speaker 1: risking their actual business.
- 11:39Speaker 2: It is incredible. P TWOV is basically the ultimate bridge
- 11:43Speaker 2: between theoretical lab practice and high stakes real world consulting.
- 11:49Speaker 2: You are hacking an exact digital replica.
- 11:52Speaker 1: It's just brilliant. So to recap our journey today, we
- 11:55Speaker 1: went from understanding the true nature of the CIA triad
- 11:58Speaker 1: and why confidentiality is so hard on the Internet, to
- 12:01Speaker 1: breaking down the hacker's osent methodology.
- 12:03Speaker 2: From passive reconnaissance to active exploitation.
- 12:07Speaker 1: Right, and then we learn how to construct a multi
- 12:09Speaker 1: switched virtual battleground and populate it with clone physical servers.
- 12:13Speaker 2: It's an entire ecosystem for ethical hacking.
- 12:16Speaker 1: It really is. But before we sign off, I want
- 12:18Speaker 1: to leave you with a final thought. We talked early
- 12:20Speaker 1: on about how Cardwell mentioned TCPIP being incredibly hard to
- 12:23Speaker 1: secure because it was built in the nineteen seventies on
- 12:26Speaker 1: inherent trust, right arpin net think about this. Yeah, all
- 12:29Speaker 1: of this pen testing, all these complex virtual labs, this
- 12:33Speaker 1: entire multi billion dollar cybersecurity industry, it all exists simply
- 12:36Speaker 1: because we are trying to bolt security onto a foundation
- 12:39Speaker 1: that was never meant to be secure.
- 12:41Speaker 2: We're constantly patching a leaky ship exactly.
- 12:44Speaker 1: So if the Internet eventually undergoes a foundational rewrite to
- 12:48Speaker 1: replace TCPIP with a protocol built on zero trust by default,
- 12:52Speaker 1: oh wow. Well, penetration testing as we know it simply
- 12:55Speaker 1: cease to exist. Or will human error just find a
- 12:59Speaker 1: brand new way to leave the virtual window open?
- 13:01Speaker 2: That is a fascinating question, Tom.
- 13:03Speaker 1: All Over, I think we all know the answer is
- 13:05Speaker 1: usually human error. But anyway, thank you so much for
- 13:08Speaker 1: taking this deep Doug with us. We'll catch you on
- 13:09Speaker 1: the next one.