Latest / CyberSecurity Summary / Penetration Testing Step-By-Step Guide
Transcript
- 0:00Speaker 1: Welcome to the deep dive. We're here to unpack the
- 0:02Speaker 1: most vital insights from a stack of sources. Just for you.
- 0:06Speaker 1: Think about the digital world we live in every single day.
- 0:08Speaker 1: It's huge, complex, It feels like a fortress sometimes right,
- 0:12Speaker 1: but well, sometimes a door just swings open if you
- 0:15Speaker 1: know where to look. That is, today we're stepping through
- 0:17Speaker 1: one of those doors. We're exploring the art and maybe
- 0:20Speaker 1: the science of ethical hacking, or the more formal term
- 0:25Speaker 1: penetration testing.
- 0:26Speaker 2: Yeah, and this deep dive it's really your shortcut to
- 0:29Speaker 2: understanding this whole fascinating field. We're pulling our insights today
- 0:33Speaker 2: from a really practical guide, Penetration Testing step by step Guide,
- 0:36Speaker 2: the second edition by Roddy Chataub. And it's not just theory,
- 0:39Speaker 2: you know, it's very hands on. It explores the actual
- 0:42Speaker 2: techniques the tools that hackers use, but for good reasons
- 0:46Speaker 2: for defense exactly.
- 0:47Speaker 1: So our goal for you today it's pretty simple. We
- 0:50Speaker 1: want you to walk away understanding not just what system
- 0:53Speaker 1: vulnerabilities are or even how they get attacked, but crucially
- 0:58Speaker 1: how to defend against them. So, whether you're maybe new
- 1:01Speaker 1: to information security, or perhaps you're a manager who needs
- 1:04Speaker 1: to get a handle on modern threats. This deep dive,
- 1:08Speaker 1: it's really designed to give you those aha moments, yeah,
- 1:12Speaker 1: you know, without just drowning you in information.
- 1:14Speaker 2: Absolutely, and before we jump right in, there's a really
- 1:17Speaker 2: critical point we need to make everything we talk about today,
- 1:20Speaker 2: it's all framed within the ethics of being a white
- 1:22Speaker 2: hat hacker, an ethical hacker. All these techniques they're meant
- 1:26Speaker 2: for authorized testing. You need explicit permission. The goal is
- 1:30Speaker 2: always to find vulnerabilities and report them, not for anything
- 1:33Speaker 2: malicious or illegal. It's really about building stronger defenses because
- 1:36Speaker 2: you understand.
- 1:37Speaker 1: The offense right makes sense. So, okay, we've had a
- 1:40Speaker 1: little glimpse into this digital underworld. Let's get to the
- 1:42Speaker 1: heart of it. How do the good guys actually fight back?
- 1:45Speaker 1: What is penetration testing really and how does this proactive
- 1:49Speaker 1: defense work for businesses?
- 1:50Speaker 2: Well, think of it like this penetration testing. It's like
- 1:55Speaker 2: hiring a professional burglar to test your home security system. Seriously,
- 1:59Speaker 2: you give them permission right to try and break into
- 2:02Speaker 2: your networks, your systems, your applications, specifically to find those
- 2:05Speaker 2: weak spots, the vulnerabilities that a malicious hacker, a black
- 2:09Speaker 2: hat might use to get in and cause real damage.
- 2:12Speaker 2: It's proactive. You're trying to find those holes and patch
- 2:15Speaker 2: them before the bad guys do beat them to the punch.
- 2:18Speaker 1: Okay, and why is this so critical for businesses these days?
- 2:21Speaker 1: Is it just, you know, a good practice or is
- 2:24Speaker 1: there something more driving it?
- 2:25Speaker 2: Oh, it's way beyond just a good idea. Often it's
- 2:29Speaker 2: actually a necessity or requirement. Many businesses, especially if they
- 2:32Speaker 2: handle payments, they're requiring to do regular pen tests to
- 2:35Speaker 2: meet security standards like the Payment Card Industry Data Security
- 2:39Speaker 2: Standard PCIDSS that requires a yearly pen test for certification.
- 2:44Speaker 2: And because of things like that, the demand for skilled
- 2:46Speaker 2: pen testers is just huge, it's booming. So understanding this
- 2:50Speaker 2: stuff is really valuable.
- 2:51Speaker 1: Okay, So who's this deep dive really for them? Who
- 2:53Speaker 1: benefits most from digging into this book's insights with us?
- 2:56Speaker 2: Well, I think it's perfect for anyone who wants to
- 2:59Speaker 2: understand the mechanic of ethical hacking. Maybe you're just starting
- 3:02Speaker 2: out in cybersecurity, or maybe you're an IT manager an
- 3:05Speaker 2: INFOSEC manager, and you need practical insights. You want to
- 3:09Speaker 2: understand the threats, the tools attackers use, and importantly, the
- 3:12Speaker 2: protective measures you need. To put in place. Is designed
- 3:15Speaker 2: to be really practical, you know, not get bogged down
- 3:17Speaker 2: in just academic theory.
- 3:19Speaker 1: Gotcha, and the book we're using. It breaks the whole
- 3:22Speaker 1: process down into five core phases for a pen test.
- 3:26Speaker 1: Can you give us a quick roadmap?
- 3:27Speaker 2: Yeah, it's a pretty logical flow. Think of it like steps. First,
- 3:30Speaker 2: there's reconnaissance that's just gathering info about your target, like
- 3:34Speaker 2: detective work, finding out everything you can. Then comes scanning.
- 3:37Speaker 2: That's when you actively probe the target looking for actual vulnerabilities.
- 3:41Speaker 2: After that, the goal is gaining access, the actual exploitation part,
- 3:46Speaker 2: getting in. Once you're in, it's about maintaining access, making
- 3:49Speaker 2: sure you can stay in or get back in later,
- 3:51Speaker 2: and finally covering tracks, hiding the evidence that you were
- 3:55Speaker 2: ever there.
- 3:56Speaker 1: Okay, reconnaissance, scanning, gaining access, maining covering tracks. Got it.
- 4:02Speaker 1: Let's dive into the first big area then, Wi Fi vulnerabilities.
- 4:06Speaker 1: Wireless is huge, right, It's often that first digital connection
- 4:09Speaker 1: when you walk into a place.
- 4:11Speaker 2: Oh, absolutely critical because a compromised Wi Fi network that
- 4:14Speaker 2: isn't just a small problem. It puts your entire internal
- 4:17Speaker 2: network at risk. For companies, insecure Wi Fi is often Honestly,
- 4:22Speaker 2: the path of least resistance for an attacker makes it
- 4:24Speaker 2: a prime target.
- 4:25Speaker 1: And thinking about vulnerabilities, I remember WEP encryption from wayback.
- 4:29Speaker 1: Is that still a thing we need to worry about?
- 4:31Speaker 1: It seems ancient.
- 4:33Speaker 2: We'd be surprised WEP is old. It is weak, but yeah,
- 4:36Speaker 2: you still find it out there. Sometimes it uses this
- 4:38Speaker 2: algorithm RC four. And here's the problem. Each packet is
- 4:42Speaker 2: encrypted using a key stream generated partly by something called
- 4:45Speaker 2: an initializing factor or five E. It's only twenty four
- 4:49Speaker 2: bits long. And the real killer is this IV is
- 4:52Speaker 2: sent in plain text right there in the packet, plaintext.
- 4:55Speaker 1: Okay, that sounds like a huge red flag immediately, Yeah,
- 4:57Speaker 1: the IV is just out there. How to attackers actual
- 5:00Speaker 1: use that flaw? How do they crack the key?
- 5:02Speaker 2: Right? That's the fundamental flaw Because that twenty four bit
- 5:05Speaker 2: IV is so short, and it's sent unencrypted, it has
- 5:08Speaker 2: to repeat eventually, especially on a busy network. So a
- 5:11Speaker 2: tool like air cracking it doesn't even need the password itself.
- 5:15Speaker 2: It just listens. It collects enough of these packets, enough
- 5:18Speaker 2: of these repeating ivs, and by doing statistical analysis on
- 5:21Speaker 2: how those ivs repeat, it can literally figure out the
- 5:25Speaker 2: entire WEP key. It's not magic, just math exploiting that weakness.
- 5:29Speaker 2: It can crack it surprisingly quickly, and attackers can even
- 5:32Speaker 2: speed it up using things like a fake authentication procedure
- 5:35Speaker 2: to inject packets.
- 5:36Speaker 1: Okay, that makes total sense. Why WEP is considered broken. Yeah,
- 5:39Speaker 1: so then WPA and WPA two came along to fix
- 5:42Speaker 1: all that. They sound much more secure, unique keys, this
- 5:44Speaker 1: four way handshake. But you know in hacking there's always
- 5:48Speaker 1: a butt, isn't There are there still ways attackers get
- 5:50Speaker 1: around WPA two.
- 5:51Speaker 2: You hit it right on the head. There's always a butt.
- 5:53Speaker 2: WPA and WPA two definitely a massive improvement over WEP,
- 5:58Speaker 2: fix that exposed IVP problem. They use unique temporary keys
- 6:02Speaker 2: for every packet and this robust four way handshake. Think
- 6:06Speaker 2: of the handshake like a secret conversation. Your device and
- 6:09Speaker 2: the router securely agree on unique keys. There's the pairwise
- 6:12Speaker 2: master key, the PMK, and the paralyzed transient KEYPTK. They're
- 6:15Speaker 2: derived from your WiFi password, the pre shared key or PSK.
- 6:18Speaker 2: It means the encryption is constantly changing.
- 6:20Speaker 1: Much harder to crack, okay, much harder, but not impossible.
- 6:23Speaker 1: So even with those upgrades, how do attackers actually bypass
- 6:26Speaker 1: WPA two. What are the main approaches?
- 6:28Speaker 2: Yeah, still not impossible. There are really two main ways
- 6:32Speaker 2: attackers go after w POPA two. First, exploiting the WPS
- 6:36Speaker 2: feature Wi Fi protected setup. Remember that button on routers
- 6:40Speaker 2: or at the PN. It was meant for convenience, you know,
- 6:42Speaker 2: easily connecting printers and stuff, but it turned into a
- 6:44Speaker 2: huge security hole. That eight digit PN. A tool called
- 6:48Speaker 2: Reaver can basically brute force it. It attacks it in two halves,
- 6:51Speaker 2: the first four digits, then the next four. So even
- 6:53Speaker 2: with a super complex WPA two password, Reaver can often
- 6:57Speaker 2: crack that eight digit PN in maybe ten hours or so.
- 7:00Speaker 2: Get your password?
- 7:00Speaker 1: Wow? Okay, so a convenience feature became a major vulnerability.
- 7:03Speaker 1: What's the second method?
- 7:04Speaker 2: Then? The second way involves capturing that four way handshake directly.
- 7:09Speaker 2: An attacker can actually force the connected device like your laptop,
- 7:12Speaker 2: to disconnect from the Wi Fi. It's called a de
- 7:15Speaker 2: authentication attack. Then, when your laptop automatically tries to reconnect,
- 7:19Speaker 2: that four way handshake happens again. The attacker listens and
- 7:22Speaker 2: captures it. Once they have that captured handshake, they use
- 7:25Speaker 2: tools like air cracking again, but this time they need
- 7:28Speaker 2: a huge list of possible passwords, a word list. They
- 7:32Speaker 2: might generate one with a tool like crunch, or download
- 7:34Speaker 2: massive lists from places like seek lists online. Then they
- 7:38Speaker 2: just try every password in the list against the handshake.
- 7:40Speaker 2: If your password is in that list, they've got it.
- 7:43Speaker 2: If not, this method.
- 7:44Speaker 1: Fails, right the dictionary attack. That makes sense. Okay, that
- 7:47Speaker 1: brings us to another really sneaky tactic, one that plays
- 7:50Speaker 1: on our desire for free stuff. Fake access points classic lure,
- 7:54Speaker 1: isn't it?
- 7:54Speaker 2: Oh? Absolutely classic and effective. Hackers set up fake Wi
- 7:58Speaker 2: Fi hotspots often give them ten names like free coffee
- 8:01Speaker 2: shop WiFi or airport guest, especially in public places. You
- 8:05Speaker 2: connect thinking it's legitimate, but now all your unencrypted traffic
- 8:09Speaker 2: it's flowing right through the attacker's computer. They can see
- 8:12Speaker 2: websites you visit, maybe present fake logging pages to seal
- 8:15Speaker 2: your passwords, re emails if they're not encrypted, and tools
- 8:19Speaker 2: like WiFi Pumpkin three makes setting these up surprisingly easy
- 8:23Speaker 2: for an attacker.
- 8:24Speaker 1: Okay, So, hearing all this, what's the bottom line for
- 8:27Speaker 1: securing our own wireless networks? What are the absolute must dos?
- 8:31Speaker 2: The takeaways are pretty clear. Yeah. First, never ever use
- 8:34Speaker 2: wp just don't. It's completely broken. Second, always use WPA
- 8:38Speaker 2: two and use a really strong complex password, think long passphrase,
- 8:43Speaker 2: mix of uppercase, lowercase symbols. Numbers don't make it easy
- 8:46Speaker 2: to guess. For businesses, integrating Wi Fi access with something
- 8:48Speaker 2: like active directory is great. Avoids shared passwords, and for
- 8:51Speaker 2: everyone that WPS feature we talked about, if your router
- 8:54Speaker 2: has it, disable it, turn it off. That convenience just
- 8:56Speaker 2: isn't worth the security.
- 8:57Speaker 1: Risk disabled WPS got it? Okay? So let's say a
- 9:01Speaker 1: hacker has gotten onto the network, maybe through weak Wi Fi.
- 9:05Speaker 1: What's next? Our next deep dive is into post connection attacks,
- 9:09Speaker 1: particularly this man in the middle stuff. Once they have
- 9:11Speaker 1: that foothold, what's the first move right?
- 9:13Speaker 2: Once they're inside, The very next step is discovery, like
- 9:16Speaker 2: mapping out the territory. You need to figure out what
- 9:19Speaker 2: else is on this network, what other devices are connected,
- 9:21Speaker 2: what are their IP addresses. Tools like net discover or
- 9:24Speaker 2: ARP scan are good for quickly finding other machines. But
- 9:27Speaker 2: then the real workhorse is en map or its graphical version,
- 9:31Speaker 2: zen map. N map is incredibly powerful. It scans targets
- 9:34Speaker 2: and gives you detailed info, open ports, operating systems, what
- 9:37Speaker 2: services are running that detailed scan. That's really the starting
- 9:41Speaker 2: point for finding specific exploitable vulnerabilities on those machines, and.
- 9:45Speaker 1: That leads us right into a man in the middle attacks.
- 9:47Speaker 1: Then TM sounds kind of spy like, how do you
- 9:51Speaker 1: define that?
- 9:51Speaker 2: It pretty much is like spy stuff. A man in
- 9:54Speaker 2: the middle attack or NATM is when an attacker secretly
- 9:58Speaker 2: positions themselves between two communicating parties. Imagine you're talking to
- 10:02Speaker 2: your bank online. The attacker gets in the middle. They
- 10:05Speaker 2: intercept your messages to the bank and the bank's messages
- 10:08Speaker 2: back to you. Both sides think they're talking directly, but
- 10:10Speaker 2: they're actually talking through the attacker. It's like sophisticated eavesdropping,
- 10:15Speaker 2: but worse because the attacker can potentially change the messages.
- 10:19Speaker 2: Not just listen, they control the conversation. They might capture logins,
- 10:23Speaker 2: manipulate transactions. It's really dangerous. Modern encryption like TLS tries
- 10:28Speaker 2: to stop this, but attackers find ways around it sometimes.
- 10:30Speaker 1: Okay, that's pretty scary. What are some common types of
- 10:33Speaker 1: these my TM attacks?
- 10:34Speaker 2: Well, the book mentions several key ones, things like ARP spoofing,
- 10:37Speaker 2: DNS poofing, STP mangling, DHGP, spuefing, ICMP redirection. They all
- 10:42Speaker 2: work slightly differently to trick network devices.
- 10:45Speaker 1: Let's dig into ARP spoofing. How does that one exploit
- 10:48Speaker 1: trust on a network? Why is it so effective?
- 10:51Speaker 2: Okay? ARP Address resolution protocol. It's fundamental for local networks.
- 10:56Speaker 2: Basically how your computer finds the physical MC address of
- 10:59Speaker 2: another when it only knows the IP address, like asking
- 11:02Speaker 2: who has this IP? The massive problem ARP is built
- 11:07Speaker 2: on trust. It's incredibly insecure by design. Any computer on
- 11:11Speaker 2: the network can just accept an ARP reply, even if
- 11:14Speaker 2: it's fake. So arpspoof exploits this perfectly. It sends out
- 11:17Speaker 2: fake AIRP messages. It tells your computer, hey, I'm the router,
- 11:20Speaker 2: and it tells the router, hey I'm your computer. Suddenly,
- 11:23Speaker 2: all the traffic between you and the router flows through
- 11:26Speaker 2: the attacker's machine. For this to work seamlessly, the attacker
- 11:29Speaker 2: needs to enable IP four in on their machine, so
- 11:31Speaker 2: the traffic just passes through. Once that's set up, tools
- 11:34Speaker 2: like wireshark running on the attacker's machine can see everything, logins, browsing,
- 11:38Speaker 2: you name it. If it's unencrypted. It's disturbingly simple. Wow.
- 11:42Speaker 1: Yeah, disturbingly simple, is right, just exploiting that basic trust.
- 11:46Speaker 1: But what if the attacker wants to do more than
- 11:48Speaker 1: just listen? What if they want to actively mess with
- 11:50Speaker 1: the traffic. That's where tools like better cap come in. Right,
- 11:53Speaker 1: What makes it such a powerful network tool?
- 11:55Speaker 2: Exactly? Better Cap is like a Swiss army knife for
- 11:58Speaker 2: network attacks, especially my TM. It's incredibly powerful and versatile.
- 12:02Speaker 2: It lets an attacker manipulate HTTP, HTTPS, sometimes and TCP
- 12:06Speaker 2: traffic in real time, sniff credentials, inject code, modify pages
- 12:11Speaker 2: on the fly, for instance, using its arc dot spoof
- 12:13Speaker 2: module to become the man in the middle and then
- 12:16Speaker 2: dot sniff to capture data. It can easily grab unencrypted
- 12:19Speaker 2: HTTP log in, say from a test website, and a
- 12:22Speaker 2: really powerful feature caplets. These are like scripts for better Cap.
- 12:25Speaker 2: Automating sequences of commands makes complex attacks much easier to execute.
- 12:29Speaker 1: Okay, but what about ng GTPs. We always here look
- 12:31Speaker 1: for the lock. HTTPS is secure? How does something like
- 12:34Speaker 1: SSL stripping try to defeat that?
- 12:36Speaker 2: Right? HTTPS is much more secure. SSL stripping is a
- 12:39Speaker 2: technique attackers used to try and downgrade that security. The
- 12:42Speaker 2: attacker acts as a proxy during the initial connection When
- 12:46Speaker 2: your browser tries to connect via HTTPS, the attacker intercepts
- 12:49Speaker 2: it talks HGTPS to the real server, but talks plane
- 12:53Speaker 2: unencrypted HTTP back to your browser. So you think you
- 12:56Speaker 2: might be secure, or maybe you don't notice THES is missing,
- 12:59Speaker 2: but your connection is actually in the clear. But there's
- 13:02Speaker 2: a crucial defense HSTS HTTP strict transport security. It's a
- 13:08Speaker 2: header a website sends that tells your browser, Hey, for
- 13:10Speaker 2: this site, only ever use HTTPS, no exceptions, so that
- 13:14Speaker 2: parameters like maxage how long the browser should remember this
- 13:16Speaker 2: rule include subdomains and preload.
- 13:19Speaker 1: HSTS sounds like a solid defense, but you mentioned dynamic
- 13:22Speaker 1: versus static HSTS. Does that distinction matter much?
- 13:24Speaker 2: Oh? It matters hugely for security. Dynamic HSTS is where
- 13:29Speaker 2: your browser learns about HSTS after the very first time
- 13:32Speaker 2: it visits the site it gets the header. Then that
- 13:35Speaker 2: leaves a tiny window on that very first connection where
- 13:37Speaker 2: an SSL stripping attack could potentially work before the browser
- 13:41Speaker 2: knows it must use HTPS. Static HSTS closes that gap.
- 13:46Speaker 2: Websites can submit themselves to be included in a preload
- 13:48Speaker 2: list that's built right into browsers like Chrome, Firefox, etc.
- 13:52Speaker 2: So if a site is on that pre load list.
- 13:54Speaker 2: Your browser already knows it must use HTTPS, even if
- 13:56Speaker 2: you've never visited it before. That makes us a CEL
- 13:59Speaker 2: stripping completely and effective. Against those sites the browser just
- 14:02Speaker 2: won't connect insecurely.
- 14:03Speaker 1: Got it. Preloading is key and DNS spoofing is another mitmtrick,
- 14:07Speaker 1: basically lying about website.
- 14:09Speaker 2: Addresses exactly your computer uses DNS, the domain name system
- 14:13Speaker 2: to turn website names like www dot Google dot com
- 14:17Speaker 2: into IP addresses. In DNS spoofing, the ITM attacker runs
- 14:22Speaker 2: their own fake DNS server on the local network. When
- 14:25Speaker 2: your computer asks what's the IP for www dot my
- 14:28Speaker 2: bank dot com, The attacker's fakeserver answers with an IP
- 14:32Speaker 2: address they control, maybe a phishing site that looks real,
- 14:35Speaker 2: so you get redirected to the wrong place. But again,
- 14:38Speaker 2: like s is all stripping, this generally doesn't work against
- 14:41Speaker 2: sites using HTTPS. With HSTS enabled and preloaded, the browser
- 14:45Speaker 2: will refuse to connect to a fake HTTP version. You
- 14:48Speaker 2: can demo this with tools like an apatche webserver for
- 14:50Speaker 2: the fake site and BETTERCAPS. DNS dot spoof module.
- 14:53Speaker 1: And BETTERCAP can even inject code like JavaScript into the
- 14:56Speaker 1: websites you're visiting.
- 14:57Speaker 2: That's right. If the connection is HTTP or HTT without
- 15:00Speaker 2: strong hsts, better cap can inject custom JavaScript into the
- 15:04Speaker 2: pages as they pass through. This is incredibly dangerous. JavaScript
- 15:07Speaker 2: running in your browser can do a lot of malicious
- 15:09Speaker 2: things steal cookies, lug keystrokes, redirect you, pop up fake logins,
- 15:13Speaker 2: all controlled by the attacker.
- 15:14Speaker 1: Okay, so, after hearing about ARP spoofing, dnspoofing, SSL stripping,
- 15:19Speaker 1: how do we actually detect and more importantly, prevent ARP
- 15:23Speaker 1: poisoning which seems to underpin a lot of this.
- 15:25Speaker 2: Detecting it tools like wireshark are invaluable. It can spot
- 15:30Speaker 2: unusual network chatter like an ARP storm tons of AIRP
- 15:33Speaker 2: requests which might indicate a scan or attack. Wireshot can
- 15:37Speaker 2: even directly flag potential MITM attacks if it sees duplicate
- 15:40Speaker 2: IP addresses claiming the same ASC or vice versa. For prevention,
- 15:44Speaker 2: things like intrusion detection systems or intrusion prevention systems idscs
- 15:48Speaker 2: are important. Also, modern layer two switches can be configured
- 15:52Speaker 2: with features like dynamic AARP inspection or the AMSC address
- 15:55Speaker 2: tracking to block spoofed packets. There are also client side
- 15:58Speaker 2: tools like ZARP that monitor for suspicious ARP activity. Interestingly,
- 16:02Speaker 2: while we focus on the bad stuff, airpeacepoofing can be
- 16:05Speaker 2: used for legitimate reasons, like on public Wi Fi redirecting
- 16:08Speaker 2: users who haven't logged in yet to a sign up page.
- 16:10Speaker 1: Right, legitimate uses too, Okay, So moving on. After all
- 16:14Speaker 1: that scanning and maybe MYTM setup, the real goal for
- 16:18Speaker 1: an attacker is often gaining access, getting control of devices.
- 16:22Speaker 1: Let's talk server side attacks first. These are direct assaults,
- 16:24Speaker 1: right exactly.
- 16:25Speaker 2: Server side attacks target vulnerabilities directly on the server itself.
- 16:29Speaker 2: They don't need the user to click anything or run anything.
- 16:32Speaker 2: You just need the server's ike address and an exploitable
- 16:35Speaker 2: service running zenmap or nmap is key here for that
- 16:39Speaker 2: initial info gathering, finding open ports identifying services like FTP,
- 16:44Speaker 2: RSH remote shell or Samba Windows file sharing, so you're.
- 16:47Speaker 1: Looking for known flaws in those.
- 16:49Speaker 2: Specific services precisely. Sometimes it's about finding older, unpatched versions
- 16:54Speaker 2: with well known vulnerabilities. For example, there's a specific version
- 16:58Speaker 2: of VSFTPD and FTPC version two point three point four
- 17:02Speaker 2: that famously had a back door baked into it. If
- 17:05Speaker 2: you find that running boom root access. Another example is
- 17:08Speaker 2: netkit RSH. If that remote shell service is enabled and
- 17:11Speaker 2: misconfigured on a Linux box, you might be able to
- 17:13Speaker 2: execute commands remotely.
- 17:14Speaker 1: And beyond those simpler known flaws, there are more complex
- 17:18Speaker 1: code execution vulnerabilities. Tell us about those and this concept
- 17:21Speaker 1: of a reverse connection that sounds clever.
- 17:24Speaker 2: Yeah, code execution vulnerabilities exploit flaws maybe in web applications
- 17:28Speaker 2: or services like Zomba that let an attacker run their
- 17:31Speaker 2: own commands on the server. Now the reverse connection. This
- 17:35Speaker 2: is a really smart way to bypass firewalls. See, most
- 17:39Speaker 2: firewalls are configured to block incoming connections initiated from the
- 17:42Speaker 2: outside like a castle wall. Or reverse connection flips that
- 17:45Speaker 2: the attacker sets up a listener on their machine. Then
- 17:48Speaker 2: the exploit makes the victim's server initiate an outgoing connection
- 17:52Speaker 2: back to the attacker. Since the connection started from inside
- 17:55Speaker 2: the network, the firewall often lets it pass right through.
- 17:58Speaker 2: It's like the victim opens a secret door outwards. The
- 18:01Speaker 2: metasplit framework is the go to tool for this. It
- 18:03Speaker 2: has tons of exploits and payloads. A common payload is
- 18:06Speaker 2: something like cmdo nix reverse netcat. You just tell it
- 18:09Speaker 2: your attacker ipe LHST and the port you're listening on
- 18:12Speaker 2: lpr ort, run the exploit and hope the victim connects back.
- 18:16Speaker 1: That is clever. Okay. So besides trying these exploits manually,
- 18:20Speaker 1: there's automated vulnerability scanning. What's the main goal.
- 18:24Speaker 2: There, right? Automated scanning is about efficiency and coverage. Its
- 18:28Speaker 2: purpose is to systematically check computers, servers, whole networks for
- 18:32Speaker 2: known weaknesses. These scanners look for outdated software, misconfigurations, missing patches,
- 18:38Speaker 2: things that match entries in huge vulnerability databases. Think of
- 18:42Speaker 2: databases like OSVDB Open Source Vulnerability Database, the NIST, MVD
- 18:48Speaker 2: National Vulnerability Database, or CVE Common Vulnerabilities and Exposures. The
- 18:53Speaker 2: scanner basically compares what it finds on your systems against
- 18:56Speaker 2: these lists of known problems. It's like an automated security audit.
- 19:00Speaker 1: Some of the big names in scanning software, well.
- 19:02Speaker 2: There are several well known ones. You've got nessis Qualities,
- 19:05Speaker 2: open vas which is open source, but a really prominent
- 19:08Speaker 2: commercial one, especially one that integrates well with exploitation tools,
- 19:11Speaker 2: is rapid seven.
- 19:12Speaker 1: Nextpos xsoz so it integrates with metasploit. You said, what's
- 19:15Speaker 1: its role in the bigger picture? The whole vulnerability management
- 19:18Speaker 1: process and any practical tips for using it.
- 19:21Speaker 2: Yeah, nexpos integrates tightly with metasploit. You can find a
- 19:24Speaker 2: vulnerability in expos and often directly launch and exploit for
- 19:27Speaker 2: it in metasploit. Its role covers the entire vulnerability management
- 19:31Speaker 2: life cycle. Discovery, finding assets on your network, detection, finding
- 19:35Speaker 2: the weaknesses, verification, checking if they're actually exploitable, risk classification, reporting,
- 19:41Speaker 2: and even helping prioritize fixing things the mitigation part. Practically speaking,
- 19:46Speaker 2: it's a powerful tool, very comprehensive, but be aware it
- 19:50Speaker 2: can be a bit of a beast resource wise, needs
- 19:52Speaker 2: decent RAM like eight GB good disk space, especially in
- 19:56Speaker 2: a VM, and the first time you start it up
- 19:57Speaker 2: it might take like thirty minutes to updates data bit.
- 20:00Speaker 2: Once it's running, it's great. You create sites for your
- 20:02Speaker 2: scan targets at IP addresses, run the scans, and then
- 20:05Speaker 2: you get these really detailed reports, audit reports, executive summaries,
- 20:09Speaker 2: even just the top ten worst vulnerabilities. Very useful.
- 20:11Speaker 1: Okay, so those are server side attacks, that's direct, But
- 20:15Speaker 1: client side attacks they feel different, more personal, maybe because
- 20:20Speaker 1: they involve the human element.
- 20:21Speaker 2: Absolutely. Client side attacks nearly always need the user to
- 20:25Speaker 2: do something click a link, open a file, install an app,
- 20:28Speaker 2: and because of that, they rely heavily on social engineering
- 20:32Speaker 2: tricking the user. Honestly, it's often much much easier to
- 20:35Speaker 2: exploit human trust or curiosity than it is to find
- 20:38Speaker 2: a purely technical flaw. In well maintained software, you can
- 20:41Speaker 2: have the best firewall, the best anti virus, that if
- 20:44Speaker 2: you trick someone into letting you in the door, none
- 20:47Speaker 2: of that matters. The human is often the weakest link.
- 20:49Speaker 1: It really is amazing how effective that can be. I
- 20:52Speaker 1: remember getting a phishing email once. It looked so real SII.
- 20:56Speaker 1: So there's a tool called the veiled Evasion framework that
- 20:58Speaker 1: helps create malware that gets past security.
- 21:01Speaker 2: That's exactly what veil evasion is designed for. It helps
- 21:04Speaker 2: generate backdoors, malicious payloads that are specifically crafted to try
- 21:08Speaker 2: and bypass common antivirus software. It often uses something called
- 21:12Speaker 2: Interpreter payloads from Metasplay. Interpreter is really advanced. Instead of
- 21:17Speaker 2: just dropping a simple executable file, it often works by
- 21:20Speaker 2: injecting itself directly into the memory of another process using
- 21:23Speaker 2: DLL injection. This makes it much harder to detect because
- 21:27Speaker 2: there might not be a malicious file sitting on the
- 21:29Speaker 2: hard drive. It runs in memory and gives the attacker
- 21:31Speaker 2: incredible control keylogger, screen capture, filesystem access, pivoting, all without
- 21:36Speaker 2: easily being traced on the disc at least until a reboot.
- 21:39Speaker 1: Wow, running in memory. That's sneaky. So how does anti
- 21:42Speaker 1: malware software even try to catch threads like that? What
- 21:44Speaker 1: are the main methods?
- 21:45Speaker 2: Anti malware uses a few main strategies. The classic one
- 21:49Speaker 2: is signatures, basically a database of known malware fingerprints. If
- 21:53Speaker 2: a file matches a known signature, it's flagged. Then there's heuristics.
- 21:58Speaker 2: This is more behavior based. It looks for suspicious actions
- 22:01Speaker 2: or characteristics even if the file doesn't match a known signature.
- 22:05Speaker 2: This can catch new threats, but it can also sometimes
- 22:07Speaker 2: lead to false positives, flagging legitimate software by mistake. Third,
- 22:12Speaker 2: sandboxing running a suspicious program in a safe, isolated environment
- 22:16Speaker 2: to see what it does without letting it harm the
- 22:18Speaker 2: main system. An interesting detail here. Some sophisticated malware can
- 22:23Speaker 2: actually detect when it's running in a sandbox, and if
- 22:26Speaker 2: detects that, it might just sit there and do nothing,
- 22:28Speaker 2: only activating its malicious code when it thinks it's on
- 22:30Speaker 2: a real user's machine. And finally, if malware is detected,
- 22:34Speaker 2: the usual action is removal, deleting it or quarantining it,
- 22:38Speaker 2: moving it to a safe place where it can't run.
- 22:40Speaker 1: Okay, so veil creates the evasive malware, then the attacker
- 22:43Speaker 1: needs to set up a way to listen for that
- 22:45Speaker 1: malware calling home right correct.
- 22:48Speaker 2: That's where the metaspolate handler comes in. It's essentially the listener.
- 22:52Speaker 2: You can figure it to expect a connection from the
- 22:54Speaker 2: specific type of backdoor you created on a specific port.
- 22:58Speaker 2: It just sits there waiting. The common headache when setting
- 23:01Speaker 2: this up is the port might already be in use
- 23:03Speaker 2: by another application on your attacker machine. You can use
- 23:07Speaker 2: commands like netstat a or LSoft in Linux to check
- 23:10Speaker 2: which process is using the port, and then you might
- 23:13Speaker 2: need to kill that process. So the handley combined to
- 23:15Speaker 2: the port.
- 23:15Speaker 1: Right, gotta free up the port so the listener is ready.
- 23:18Speaker 1: How does the malware actually get to the victim? What
- 23:20Speaker 1: are the common delivery methods?
- 23:22Speaker 2: Well, the simplest way is just putting the malicious file
- 23:25Speaker 2: on a web server, maybe your Collie Linux machine running
- 23:27Speaker 2: apatche too, and tricking the user into downloading and running it. Directly,
- 23:32Speaker 2: but more common and often more effective are things like
- 23:35Speaker 2: phishing emails, emails with malicious links or attachments. A really
- 23:40Speaker 2: effective and quite devious method is embedding the malware inside
- 23:43Speaker 2: a seemingly harmless file like a PDF or a JPG.
- 23:47Speaker 2: You can use SFX archives, which are self extracting archives
- 23:50Speaker 2: created with tools like wind raar. The victim thinks they're
- 23:53Speaker 2: just opening a document or a picture, clicks it, the
- 23:55Speaker 2: document opens, but silently in the background. The malware also
- 23:59Speaker 2: extremes and executes very sneaky, and attackers often set at
- 24:04Speaker 2: persistence too, configuring the malware so it automatically starts up
- 24:07Speaker 2: again if the victim reboots their computer, maybe by inchecking
- 24:10Speaker 2: it as a Windows service or adding a registry key
- 24:12Speaker 2: to run a script on startup.
- 24:13Speaker 1: And there's a tool called Cage to help manage all
- 24:16Speaker 1: these compromised machines.
- 24:17Speaker 2: Yeah, Cage is basically a graphical front end for managing
- 24:20Speaker 2: metasplit sessions. If an attacker has multiple compromise machines connecting
- 24:24Speaker 2: back via interpreter, Cage provides a guy to easily interact
- 24:28Speaker 2: with them, run commands, take screenshots, organize the sessions. Makes
- 24:32Speaker 2: managing multiple victims simpler.
- 24:34Speaker 1: So with all these clever delivery methods, especially the ones
- 24:37Speaker 1: embedding malware, what are the best ways to protect ourselves?
- 24:41Speaker 2: Good question. There are a few key layers of defense. First,
- 24:44Speaker 2: man in the middle prevention. Be careful about the networks
- 24:47Speaker 2: you connect to. Use trusted networks, maybe a VPN on
- 24:50Speaker 2: public Wi Fi. Tools like ZARP can also help detect
- 24:53Speaker 2: AARP poisoning attempts on your local network. Second, always look
- 24:56Speaker 2: for HTTPS connections. Encrypted traffic is much hard for an
- 25:00Speaker 2: attacker to tamper with or inject things into. Use browser
- 25:03Speaker 2: extensions like HTTPS everywhere. Third hashing. This is really important
- 25:08Speaker 2: for downloads. If a software publisher provides a hash like
- 25:11Speaker 2: MT five or SAHA two five six for their file,
- 25:14Speaker 2: you can calculate the hash of the file you downloaded.
- 25:16Speaker 2: If the hash is match, the file is almost certainly
- 25:19Speaker 2: authentic and hasn't been tampered with. If they don't match,
- 25:22Speaker 2: don't want it okay.
- 25:23Speaker 1: Hashing is a good practical tip. So let's say the
- 25:25Speaker 1: attacker is successful. They've gained access, the work isn't over.
- 25:29Speaker 1: Our next deem dive is post exploitation and social engineering tactics.
- 25:34Speaker 1: What exactly happens in post exploitation. What's the goal?
- 25:37Speaker 2: Post exploitation is everything that happens after you've successfully compromised
- 25:41Speaker 2: a system. Gaining that initial access is just the first step.
- 25:45Speaker 2: The goal now is to maximize your control, gather valuable information,
- 25:49Speaker 2: potentially move laterally to other systems on the network, and
- 25:52Speaker 2: ensure you can maintain access persistently. The metasploit Interpreter shell
- 25:57Speaker 2: is packed with post exploitation commands, shows you everything you
- 26:00Speaker 2: can do. Background lets you hide the session but keep
- 26:03Speaker 2: it active. Sessions list all your active connections. Since info
- 26:07Speaker 2: gives you basic info about the victims OS.
- 26:09Speaker 1: And the book mentions something intriguing. Process impersonation. How does
- 26:13Speaker 1: that work? Why is it useful for an attacker?
- 26:15Speaker 2: Ah? Yeah, process migration or impersonation. It's a stealth technique.
- 26:20Speaker 2: Materpreter allows you to take your malicious process and migrate
- 26:23Speaker 2: it so it runs inside a legitimate common Windows process
- 26:27Speaker 2: like explore dot exx, or maybe a browser process like
- 26:30Speaker 2: Microsoft Edge. Why because if someone opens task Manager and
- 26:34Speaker 2: looks at the running processes, they're less likely to spot
- 26:37Speaker 2: explore dot ex as being suspicious compared to some weirdly
- 26:40Speaker 2: named malware dot ex It helps the back door blend
- 26:44Speaker 2: in making it harder to detect and.
- 26:46Speaker 1: Kill blend in dot clever. And once you have that
- 26:49Speaker 1: materpreter session, you basically have full control over the victims
- 26:52Speaker 1: files pretty much.
- 26:53Speaker 2: Yeah, you have full control over their filesystem. You can
- 26:55Speaker 2: browse directories ALSPWDCD, download files from the victim machine, download
- 27:00Speaker 2: upload file to upload, delete files, even modify them. You
- 27:03Speaker 2: can also drop into a standard Windows command shell through
- 27:06Speaker 2: the interpreter session for even more direct control. It's like
- 27:09Speaker 2: sitting at their computer remotely.
- 27:10Speaker 1: But that connection might die if they reboot. Right, how
- 27:13Speaker 1: do attackers achieve persistence? Making sure they can get back
- 27:16Speaker 1: in after a restart right?
- 27:17Speaker 2: Persistence is key for long term access. A simple interpreter
- 27:21Speaker 2: session in memory usually dies on reboot, so post exploitation
- 27:25Speaker 2: often involves setting up persistence mechanisms. The book talks about
- 27:29Speaker 2: methods like injecting the back door as a Windows service
- 27:31Speaker 2: that starts automatically, or creating Windows Registry keys that tell
- 27:35Speaker 2: the system to run a script, maybe a Visual Basic
- 27:38Speaker 2: Script jvbscript as mentioned. When the user logs in or
- 27:42Speaker 2: the system boots up, that script then connects back to
- 27:45Speaker 2: the attackers listener re establishing the connection automatically, and.
- 27:48Speaker 1: Maybe the most chilling part, keyloggers and screenshots. That's actual
- 27:53Speaker 1: real time spying.
- 27:54Speaker 2: It is Interpreter has modules for both. You can start
- 27:56Speaker 2: a keylogger that captures every single keystroke the victim type, passwords, emails,
- 28:01Speaker 2: chat messages, everything. You can also take screenshots at their
- 28:04Speaker 2: desktop in real time, seeing exactly what they're doing. It
- 28:07Speaker 2: gives the attacker complete invasive visibility into the victims' activities
- 28:10Speaker 2: on the compromised machine.
- 28:12Speaker 1: Okay, shifting from the purely technical, let's talk social engineering.
- 28:16Speaker 1: The book says it's often easier to exploit human trust
- 28:19Speaker 1: than hack software. Why is that still so true with
- 28:22Speaker 1: all our tech?
- 28:23Speaker 2: It boils down to psychology. Really, security fundamentally relies on
- 28:28Speaker 2: knowing who and what to trust. Social engineers exploit our
- 28:31Speaker 2: basic human nature, our desire to be helpful, our curiosity,
- 28:35Speaker 2: our fear, sometimes just being busy or distracted. It's often
- 28:39Speaker 2: far less work to craft a convincing email that tricks
- 28:42Speaker 2: someone into clicking a link or giving up a password
- 28:45Speaker 2: than it is to find and exploit a zero day
- 28:47Speaker 2: vulnerability in software. Technology can build high walls, but social
- 28:51Speaker 2: engineer and just walks up to the gate and asks
- 28:53Speaker 2: to be let in, often successfully. The human is the variable.
- 28:57Speaker 1: Yeah, that makes sense. It targets our instincts. So, like
- 28:59Speaker 1: any attack, social engineering starts with information gathering. What tools
- 29:03Speaker 1: help with that?
- 29:03Speaker 2: Absolutely? Good recon is crucial for effective social engineering. You
- 29:08Speaker 2: need to know your target. Tools like Google dorcs are
- 29:11Speaker 2: surprisingly powerful for finding publicly exposed information online. Recon is
- 29:16Speaker 2: a great framework specifically for open source intelligence gathering. And
- 29:20Speaker 2: while Tago is really interesting, it's a visual tool. It
- 29:22Speaker 2: helps map out relationships between different pieces of information people,
- 29:26Speaker 2: email addresses, companies, websites, network infrastructure. It pulls data from
- 29:30Speaker 2: tons of public sources and creates these visual link analysis charts.
- 29:34Speaker 2: Helps an attacker build a really detailed picture of their
- 29:36Speaker 2: target and potential attacking.
- 29:38Speaker 1: In the classic delivery email spoofing, how do attackers make
- 29:42Speaker 1: fake emails look real enough to bypass spam filters.
- 29:45Speaker 2: Email spoofing is definitely the most common way to deliver
- 29:47Speaker 2: social engineering attacks like phishing links or malware attachments. The
- 29:51Speaker 2: challenge for attackers is that modern spam blockers are pretty
- 29:55Speaker 2: good at spotting emails sent from dodgy free spoofing services.
- 29:58Speaker 2: They often end up in junk folds. So attackers get smarter,
- 30:02Speaker 2: they might use reputable SMTP relay servers. These are legitimate
- 30:06Speaker 2: email sending services like send and Blue is mentioned as
- 30:09Speaker 2: an example. Using those can help bypass some filters. Or
- 30:12Speaker 2: they might set up their own customer email servers, or
- 30:14Speaker 2: compromise existing ones, or even just create very convincing fake
- 30:18Speaker 2: accounts on real services. But even then you might see
- 30:21Speaker 2: clues like the email landing in your promotions tab or
- 30:24Speaker 2: seeing a via sendeblue dot com tag in the sender details.
- 30:28Speaker 2: Those are potential red flags to watch for.
- 30:30Speaker 1: Okay, let's move into our fift deep dive web and
- 30:32Speaker 1: mobile application penetration testing. Starting with web browsers, there's a
- 30:36Speaker 1: tool called BEEF. What's special about it?
- 30:39Speaker 2: Right? BEEF the Browser Exploitation framework. What makes it unique
- 30:43Speaker 2: is it's laser focus on the web browser itself as
- 30:45Speaker 2: the attack platform. Most tools target the network or the
- 30:48Speaker 2: servers OS or the client OS. BEEF says, forget that
- 30:51Speaker 2: for a minute. Let's attack the user directly through their browser.
- 30:54Speaker 1: It hooks the browser, hooks the browser. How does that work?
- 30:57Speaker 1: How does it actually gain control?
- 30:59Speaker 2: It works by general creating a small piece of JavaScript
- 31:01Speaker 2: code called the hook. The attacker needs to get this
- 31:04Speaker 2: hook code to run in the victim's browser. This usually
- 31:08Speaker 2: happens if the attacker can inject it into a website
- 31:10Speaker 2: the victim visits, maybe a site the attacker controls or
- 31:13Speaker 2: a legitimate site they've compromised with the vulnerability. When the
- 31:16Speaker 2: victim's browser loads the page with the hook, that JavaScript
- 31:20Speaker 2: runs and makes the browser secretly connect back to the
- 31:22Speaker 2: attacker's beef server. Once that connection is made, the browser
- 31:26Speaker 2: is hooked and the attacker can send commands to it
- 31:28Speaker 2: through the beef interface.
- 31:30Speaker 1: Okay, so getting that hook onto a website sounds like
- 31:32Speaker 1: it involves cross site SCRIPTINGXSS. What exactly is XSS and
- 31:37Speaker 1: how does it enable beef?
- 31:38Speaker 2: Yeah, XSS is a very common way to deliver the beefook.
- 31:41Speaker 2: Cross site scripting is a type of injection attack. Basically,
- 31:45Speaker 2: the attacker manages to inject malicious JavaScript code into a
- 31:48Speaker 2: website that other users trust. When another user visits that page,
- 31:52Speaker 2: their browser executes the attacker's script because it thinks the
- 31:55Speaker 2: script is part of the legitimate website, like a trojan
- 31:58Speaker 2: horse delivered by the website itself. There are a few
- 32:00Speaker 2: main types stored XSS or persistent, where the malicious script
- 32:05Speaker 2: is saved permanently on the website, maybe in a comment field,
- 32:07Speaker 2: and affects everyone who've used it. Reflected EXSS, where the
- 32:10Speaker 2: script is part of a link the attacker tricks the
- 32:13Speaker 2: victim into clicking it, reflects off the web server and
- 32:15Speaker 2: runs in the victim's browser just that one time, and
- 32:18Speaker 2: DOM based EXSS, which is a bit trickier exploiting how
- 32:21Speaker 2: the browser itself processes data on the client side, sometimes
- 32:24Speaker 2: without even talking to the server.
- 32:26Speaker 1: How would a pen tester even find an EXSS vulnerability
- 32:30Speaker 1: and then use it to inject that beef hook.
- 32:32Speaker 2: Finding EXSS often starts by looking for places on a
- 32:35Speaker 2: website where user input is displayed back on the page.
- 32:38Speaker 2: Think search results, comment sections, user profiles. You try injecting
- 32:42Speaker 2: simple test scripts like script alert excess script. If you
- 32:47Speaker 2: see that alert box pop up when the page loads BINGO,
- 32:50Speaker 2: you've likely found an EXSS flaw. Once you find one,
- 32:53Speaker 2: especially a stored EXSS vulnerability, you can then inject the
- 32:57Speaker 2: beef hook script instead of just the alert. Because it's stored,
- 33:00Speaker 2: every user who visits that compromise page from then on
- 33:03Speaker 2: will automatically get hooked by BEEF, connecting their browser back
- 33:06Speaker 2: to the attacker.
- 33:07Speaker 1: And once a browser is hooked with BEEF, you can
- 33:09Speaker 1: actually use that to hack the underlying machine like Windows
- 33:12Speaker 1: or even mobile phones.
- 33:13Speaker 2: Yes, that's where BEEF gets really powerful. It's not just
- 33:17Speaker 2: about controlling the browser. It's a launch pad. From the
- 33:20Speaker 2: BEEF control panel, the attacker can send commands to the
- 33:23Speaker 2: hooked browser. One common tactic is using social engineering modules,
- 33:27Speaker 2: for example, sending a fake update notification that looks like
- 33:30Speaker 2: it's from Firefox or Adobe Flash Player. If the victim
- 33:34Speaker 2: clicks install update, what they actually download and run could
- 33:37Speaker 2: be a metaspoint interpreter back door generated by the attacker.
- 33:40Speaker 2: If they run it, boom, the attacker gets a full
- 33:42Speaker 2: remote control session on their Windows machine and worryingly, yes,
- 33:46Speaker 2: BEEF works just fine on mobile browsers too, Android iOS
- 33:50Speaker 2: hooking the mobile browser can lead to similar kinds of attacks.
- 33:52Speaker 1: Okay, that's concerning. So what are the best defenses against
- 33:55Speaker 1: excess is? How do websites prevent this?
- 33:58Speaker 2: Preventing XSS requires dillas from web developers. Key techniques include
- 34:03Speaker 2: escaping user input. This means converting potentially harmful characters like
- 34:07Speaker 2: anelo into safe entities like NELT and ENEGEL, so the
- 34:11Speaker 2: browser treats them as text, not code, validating input being
- 34:16Speaker 2: very strict about what kind of data is allowed in
- 34:19Speaker 2: different fields. If a field should only contain numbers, don't
- 34:22Speaker 2: allow letters or symbols. Using whitelists is better than blacklists,
- 34:26Speaker 2: sanitizing user input, actively removing or cleaning up any potentially
- 34:30Speaker 2: dangerous HTML or script tags from user submissions, and on
- 34:34Speaker 2: top of that, using a Web application firewall. Wf ws
- 34:38Speaker 2: sit in front of the web server and inspect incoming traffic,
- 34:41Speaker 2: trying to detect and block EXSS attacks and other common
- 34:44Speaker 2: web threats before they even reach the application code.
- 34:47Speaker 1: Right defense and depth. Okay, Moving beyond browser exploits, let's
- 34:50Speaker 1: talk general website penetration testing. What's the typical stack of components?
- 34:53Speaker 2: A tester looks at sure, A typical web application has
- 34:56Speaker 2: multiple layers. There's the server hardware itself or VM, the
- 35:00Speaker 2: operating system running on it, the web server software like
- 35:03Speaker 2: Apatchee or Microsoft ISA, the database backing the application, maybe Myschool, Postgress,
- 35:09Speaker 2: wiel Segle server, and then the actual web application code
- 35:11Speaker 2: written in languages like PHP, Python, Java, NOJS, etc. The
- 35:16Speaker 2: first step in testing is always information gathering, figuring out
- 35:19Speaker 2: as much as possible about each of these components.
- 35:21Speaker 1: What are some good tools for that initial information gathering
- 35:24Speaker 1: phase on websites to understand that stack?
- 35:27Speaker 2: There are lots of great tools whose lookups give you
- 35:30Speaker 2: domain registration details. Netcraft provides incredibly detailed reports on websites.
- 35:35Speaker 2: The technologies they use, webserver os, frameworks, hosting provider known history,
- 35:40Speaker 2: sometimes even vulnerabilities. It's amazing what you can find there.
- 35:43Speaker 2: Robtext is good for DNS information finding related domains, seeing
- 35:47Speaker 2: what other sites might be hosted on the same server.
- 35:49Speaker 2: Knock Pi or similar tools helps discover hidden subdomains associated
- 35:54Speaker 2: with a main domain which might host less secure applications,
- 35:57Speaker 2: and DRB or tools like gobuster or a fun uf
- 36:00Speaker 2: are essential. They brute force common directory and file names
- 36:03Speaker 2: using word lists. You'd be surprised how often they uncover
- 36:06Speaker 2: sensitive files left accessible, like configuration files, backup files, or
- 36:10Speaker 2: even things like robots dot txt or maybe an accounts
- 36:13Speaker 2: dot txt file that shouldn't be there.
- 36:15Speaker 1: Finding lift or files, Yeah, it happens more than you'd think.
- 36:18Speaker 1: What about file upload vulnerabilities? How are those exploited?
- 36:21Speaker 2: File upload features are a common source of vulnerabilities. If
- 36:24Speaker 2: a site lets you upload, say a profile picture, it
- 36:27Speaker 2: needs to strictly check that the uploaded file actually is
- 36:30Speaker 2: an image. If the checks are weak rejeff only looking
- 36:33Speaker 2: at the filename extension, an attacker might try uploading something
- 36:36Speaker 2: malicious instead. A common attack is uploading a PHP webshell.
- 36:41Speaker 2: This is a small script, often created with a tool
- 36:43Speaker 2: like Weaveley, that gives the attacker command execution on the server.
- 36:47Speaker 2: If the server accepts the upload and the attacker can
- 36:49Speaker 2: then access that uploaded file via their browser, the PHP
- 36:52Speaker 2: code executes, and the attacker effectively gets a remote shell
- 36:56Speaker 2: on the web server. Full control.
- 36:58Speaker 1: Okay, webshells are bad. What about direct code execution vulnerabilities
- 37:02Speaker 1: in the web app itself.
- 37:03Speaker 2: These happen when the web application takes input from the
- 37:06Speaker 2: user and improperly uses it as part of a command
- 37:08Speaker 2: that gets executed on the server's operating system. A classic
- 37:11Speaker 2: example is a website feature that lets you say ping
- 37:13Speaker 2: and IP address to test connectivity. If the website just
- 37:16Speaker 2: takes the IP address you provide and plugs it directly
- 37:19Speaker 2: into a system ping command without cleaning it first sanitizing it,
- 37:23Speaker 2: an attacker could inject extra commands instead of just an IP.
- 37:26Speaker 2: They might enter something like eight eight point eight point
- 37:28Speaker 2: eight and ce binge attacker IP attach report. The semicolon
- 37:31Speaker 2: separates commands and Linux umix, so the server ping's eight
- 37:34Speaker 2: point eight point eight point eight, and then it executes
- 37:36Speaker 2: the netcat command, which launches a reverse shell connecting back
- 37:40Speaker 2: to the attacker's machine.
- 37:41Speaker 1: Game over combining comm the panston infony. Then there are
- 37:45Speaker 1: file inclusion vulnerabilities LFI and RFI. What's the difference in
- 37:49Speaker 1: How do they work?
- 37:49Speaker 2: Right? LFI and RFI. Local file inclusion LiFi exploits flaws
- 37:54Speaker 2: where a web application includes files based on user input
- 37:57Speaker 2: but doesn't properly restrict which files can be included. An
- 38:01Speaker 2: attacker might manipulate a URL parameter like dot page dot
- 38:04Speaker 2: et setsia passwd the dot traverss directories upwards. If the
- 38:08Speaker 2: app is vulnerable, it might actually include and display the
- 38:11Speaker 2: contents of the stead of pass weed file, which contains
- 38:13Speaker 2: user account info. On Linux, let's then read arbitrary files
- 38:17Speaker 2: on the server. Remote file inclusion RFI is similar, but
- 38:20Speaker 2: potentially even more dangerous. It occurs that the application can
- 38:23Speaker 2: be tricked into including a file from a remote URL
- 38:25Speaker 2: one controlled by the attacker. This usually requires a specific
- 38:28Speaker 2: PHP configuration setting allow er and clude to be enabled.
- 38:32Speaker 2: It's off by default now, thankfully. If RFI is possible,
- 38:34Speaker 2: the attacker can host a malicious script like a webshell
- 38:37Speaker 2: on their own server and trick the victim server into
- 38:39Speaker 2: downloading and executing it instant backdoor.
- 38:42Speaker 1: Okay, so LiFi reads local files, RFI executes for remote files.
- 38:46Speaker 1: What are the key ways to prevent all these webvolms? Uploads?
- 38:49Speaker 1: Code execution, file inclusion.
- 38:51Speaker 2: Several key defenses for file uploads. Implement strict checks on
- 38:54Speaker 2: file types, not just based on the filename extension, but
- 38:57Speaker 2: by inspecting the file content mime type match bytes. Also
- 39:01Speaker 2: store uploaded files outside the webroot if possible, or in
- 39:03Speaker 2: a location where they cannot be executed for code execution.
- 39:07Speaker 2: Rigorously sanitize all user input. Never ever trust user input.
- 39:12Speaker 2: Use built in language functions designed for safe command execution
- 39:15Speaker 2: if you absolutely must, but avoid it if possible. Whitelist
- 39:18Speaker 2: allowed inputs for file inclusion. Disable dangerous PHP settings like
- 39:22Speaker 2: allowal fopen and allower include in PHP dot e ne
- 39:26Speaker 2: avoid including files based directly on user input. Use hard
- 39:29Speaker 2: coded pads or map user input to safe allowed filepads
- 39:33Speaker 2: and generally across the board. A well configured web application
- 39:36Speaker 2: firewall WAF acts as an essential safety net catching many
- 39:39Speaker 2: of these attack patterns.
- 39:40Speaker 1: Yes, wfs are important, and let's tackle a huge one.
- 39:43Speaker 1: SQL injection. This sounds incredibly powerful because it targets the
- 39:47Speaker 1: database directly.
- 39:48Speaker 2: It absolutely is powerful. SQL injection or SQL involves injecting
- 39:54Speaker 2: malicious SEQL structured query language code into input fields on
- 39:58Speaker 2: a web page like login forms, search boxes, even URL parameters.
- 40:04Speaker 2: The goal is to manipulate the SQL queries that the
- 40:06Speaker 2: web application sends to its back end database, essentially tricking
- 40:10Speaker 2: the application into running the attacker's SQL code.
- 40:12Speaker 1: And why is SQL considered so critical so powerful compared
- 40:16Speaker 1: to some other web.
- 40:17Speaker 2: Attacks because it gives the attacker a direct line to
- 40:19Speaker 2: the database, and the database is usually where the crown
- 40:22Speaker 2: jewels are kept user credentials, user names, hashed passwords, personal information,
- 40:27Speaker 2: financial records, sensitive company data, everything. A successful sequel attack
- 40:32Speaker 2: can allow an attacker to bypass authentication, entirely read sensitive
- 40:36Speaker 2: data they shouldn't see, modify or delete data, and sometimes
- 40:39Speaker 2: even execute operating system commands on the database server itself,
- 40:42Speaker 2: leading to full server compromise. It cuts right to the core.
- 40:45Speaker 1: How does a pintester even find out if a site
- 40:48Speaker 1: is vulnerable? What's the first step?
- 40:49Speaker 2: It often starts very simply, just trying to input special
- 40:52Speaker 2: characters into web forms, especially the single quote, which is
- 40:55Speaker 2: used to denote strings in SQL. If inputting a single
- 40:58Speaker 2: quote causes the website to throw a weird error message,
- 41:01Speaker 2: maybe revealing parts of in SQL query or database information,
- 41:04Speaker 2: that's a huge red flag. It suggests the application isn't
- 41:08Speaker 2: handling the input properly and is vulnerable. Once a potential
- 41:11Speaker 2: vulnerability is found, attackers try injecting actual SQL code. Common
- 41:15Speaker 2: payloads like or are one year one or or one
- 41:18Speaker 2: one can sometimes bypass log informs entirely because one a
- 41:21Speaker 2: U one is always true. If the input is in
- 41:23Speaker 2: the URL HGPGT request. They need to remember to URL
- 41:27Speaker 2: and code special characters like space becomes per twenty, single
- 41:30Speaker 2: quote becomes per twenty seven, And they.
- 41:32Speaker 1: Can actually pull data out of the database using these injections.
- 41:35Speaker 1: How does that work?
- 41:36Speaker 2: Yes, extracting data is a primary goal. Once they confirm
- 41:39Speaker 2: a vulnerability, they use various techniques. They might use order
- 41:43Speaker 2: by clauses, injecting order by one, order by two, et cetera,
- 41:46Speaker 2: and watching when the page breaks to figure out how
- 41:49Speaker 2: many columns the original query returns. Then they use union select.
- 41:53Speaker 2: This lets them combine the results of the original query
- 41:56Speaker 2: with the results of a new query they inject. Using
- 41:58Speaker 2: union select, they can start a extracting information the database version,
- 42:02Speaker 2: the current database, user names of other databases. Information schema
- 42:06Speaker 2: is key here. It's a database about databases, table names,
- 42:09Speaker 2: column names, and eventually dump the contents of sensitive tables
- 42:13Speaker 2: like the users or accounts table containing usernames and passwords.
- 42:16Speaker 2: In some database configurations, they might even be able to
- 42:19Speaker 2: read files from the server using functions like load file
- 42:22Speaker 2: it sets the road, or write files to the server
- 42:24Speaker 2: using into out file if the database process has sufficient permissions.
- 42:28Speaker 1: That sounds incredibly complex and manual. Is there an automated
- 42:31Speaker 1: way to perform SQL injection attacks?
- 42:34Speaker 2: Oh? Definitely, Manually exploiting SQL it can be tedious and complex.
- 42:38Speaker 2: That's where school map comes in. Stormap is a fantastic
- 42:40Speaker 2: open source penetration testing tool that completely automates the process
- 42:44Speaker 2: of detecting and exploiting SQL injection vulnerabilities. You just pointed
- 42:48Speaker 2: at a potentially vulnerable URL, and it does the rest.
- 42:51Speaker 2: It can identify the database type myceql, Oracle, etc. Figure
- 42:54Speaker 2: out the injection techniques, fetch data, dump entire databases or
- 42:57Speaker 2: specific tables, access the underlying files, stem, and even try
- 43:01Speaker 2: to execute operating system commands through the database connection. Practical
- 43:05Speaker 2: commands are simple like sqollmap atch uhtpt dot test, dot com,
- 43:08Speaker 2: school end, dot, php, dot id one, DBS to list databases,
- 43:12Speaker 2: or dump dash you user's dashd web acdb to dump
- 43:15Speaker 2: the user's table from the web ATPDB database. It makes
- 43:18Speaker 2: complex attacks much easier.
- 43:20Speaker 1: Okay, school map sounds powerful. So what is the best
- 43:22Speaker 1: defense against SQL injection? What's the most crucial thing developers
- 43:25Speaker 1: need to do.
- 43:26Speaker 2: The single most important defense, hands down is using prepared statements,
- 43:30Speaker 2: also often called parameterized queries. Think of it this way.
- 43:34Speaker 2: Instead of building a SQL query by just sticking user
- 43:37Speaker 2: input directly into the SQL string, you create the SQL
- 43:40Speaker 2: query with placeholders like dot or dot user name. Then
- 43:44Speaker 2: you separately provide the user's input values, and the database
- 43:47Speaker 2: driver handles safely inserting those values into the placeholders. This
- 43:51Speaker 2: fundamentally separates the SQL code logic from the data. The
- 43:55Speaker 2: user's input is always treated as data, never is executable code,
- 43:59Speaker 2: making injection possible for that query. It's the gold standard.
- 44:02Speaker 2: Other important layers include using least privileged database accounts the
- 44:06Speaker 2: Web Applications database users should only have the absolute minimum
- 44:09Speaker 2: permissions needed to function, definitely not admin rights, using multiple
- 44:13Speaker 2: dB users if you have multiple applications, using the same
- 44:16Speaker 2: database server to keep them isolated, and again, deploying a
- 44:19Speaker 2: Web application firewall WAF can catch many common SQL.
- 44:22Speaker 1: Patterns prepared statements, got it And speaking of automated tools,
- 44:26Speaker 1: OASPZ is another big one for web testing.
- 44:29Speaker 2: Absolutely ZACE the z attack proxy is extremely popular. It's free,
- 44:34Speaker 2: open source and maintained by OAS Open Web Application Security Project.
- 44:39Speaker 2: It acts as a proxy between your browser and the website,
- 44:41Speaker 2: and it can automatically scan the website for a wide
- 44:44Speaker 2: range of vulnerabilities as you browse, or you can launch
- 44:46Speaker 2: active scans. It finds things like exss skewqlay insecure configurations,
- 44:52Speaker 2: information leaks, and it categorizes the findings by severity high, medium, low,
- 44:57Speaker 2: often shown with red orange yellow flags. It gives detailed
- 45:01Speaker 2: alerts and suggests remediation steps. Great tool for both beginners
- 45:05Speaker 2: and experts.
- 45:05Speaker 1: Okay, let's shift gears for our final deep dives mobile
- 45:08Speaker 1: phone penetration testing.
- 45:10Speaker 2: The number of mobile devices out there is just mind boggling.
- 45:13Speaker 1: It really is staggering. They're talking billions and billions globally,
- 45:16Speaker 1: something like fourteen billion now, heading towards maybe seventeen billion soon.
- 45:20Speaker 1: And because we do so much on our phones, banking, communications,
- 45:23Speaker 1: storing photos, accessing work data, mobile security has become this
- 45:27Speaker 1: massive new frontline for cyber attacks. These devices are treasure
- 45:31Speaker 1: troves of data.
- 45:32Speaker 2: So what are the main ways attackers try to get
- 45:34Speaker 2: into phones? The main attack factors? Well, there are several
- 45:37Speaker 2: common vectors for mobile Physical access is one, if someone
- 45:40Speaker 2: gets hold of your unlocked phone. Malware is huge. Malicious
- 45:44Speaker 2: apps often disguised as games or utilities, downloaded from unofficial stores,
- 45:49Speaker 2: or even sometimes sneaking into official ones. Network attacks exploiting
- 45:53Speaker 2: insecure Wi Fi is just as relevant for phones as
- 45:56Speaker 2: for laptops. Social engineering is very effective on mobile phishing, tearmishing,
- 46:01Speaker 2: fake log imprompts, insecure applications themselves, apps that handle data poorly,
- 46:05Speaker 2: don't encrypt traffic, store passwords insecurely, and of course vulnerabilities
- 46:09Speaker 2: in the mobiles itself, though those are rarer for attackers
- 46:12Speaker 2: to exploit widely without zero days. Often it still comes
- 46:15Speaker 2: down to tricking the user, and if.
- 46:17Speaker 1: An attacker does get in, what can they actually do?
- 46:20Speaker 1: What are the outcomes?
- 46:21Speaker 2: The consequences can be really severe. Data loss is a
- 46:25Speaker 2: big one. Contact stolen private messages, read sensitive photos or
- 46:29Speaker 2: documents exfiltrated. Attackers might use your phone's resources silently, using
- 46:33Speaker 2: its processing power for crypto mining, or making it part
- 46:36Speaker 2: of a botnet for dedas attacks. There's reputation loss if
- 46:39Speaker 2: they hijack your social media or email accounts, and the
- 46:42Speaker 2: worst case is often identity theft, grabbing enough personal information
- 46:45Speaker 2: and credentials to impersonate you, open fraudulent accounts, et cetera.
- 46:49Speaker 1: So is there a typical life cycle for a mobile attack?
- 46:51Speaker 2: Yeah, it usually fallows a pattern. First, the vice infection.
- 46:55Speaker 2: This often involves tricking the victim. For Android, that might
- 46:58Speaker 2: mean downloading a malicious apka file from a third party source.
- 47:02Speaker 2: For iOS, it's harder, often requiring physical access, exploiting a
- 47:05Speaker 2: rare zero day, or maybe targeting jail broken devices. Second,
- 47:10Speaker 2: backdoor installation. Once the malware is on the device, it
- 47:13Speaker 2: often needs higher privileges. For Android, this might involve trying
- 47:16Speaker 2: to gain root access. For iOS, the device is jailbroken,
- 47:20Speaker 2: the malware has more freedom. Third data exultration. The malware
- 47:24Speaker 2: or backdoor then communicates back to the attacker server, sending
- 47:28Speaker 2: collected data, contacts, SMS messages, location data, photos, banking logins,
- 47:32Speaker 2: whatever it was designed to steal.
- 47:33Speaker 1: What about the official app stores Google Play, Apple App Store?
- 47:36Speaker 1: Are they generally safe or do malicious apps slip through?
- 47:40Speaker 2: Generally? Yes, the official stores Google Play Store, Apple App
- 47:43Speaker 2: Store are much safer than the alternatives. They have vetting processes,
- 47:47Speaker 2: automated scanning, and manual reviews designed to catch malware. However,
- 47:52Speaker 2: they're not perfect. Cleverly disguised malware does occasionally slip through
- 47:56Speaker 2: the cracks. The real danger often comes from third party
- 48:00Speaker 2: app stores or just downloading APK files directly from websites.
- 48:04Speaker 2: Attackers love to take legitimate apps, inject malware into them, repackaging,
- 48:08Speaker 2: and then offer them for free. On these alternative stores,
- 48:11Speaker 2: users download the trojanized version thinking they're getting a deal,
- 48:14Speaker 2: but they're actually installing spyware.
- 48:16Speaker 1: Right stick to official stores where possible. Okay, let's look
- 48:18Speaker 1: at androids specifically. What are the security basics of the
- 48:22Speaker 1: Android OS.
- 48:23Speaker 2: Androids built on Linux, and a key security concept is
- 48:26Speaker 2: the sandbox. Every app runs in its own isolated environment,
- 48:30Speaker 2: its own sandbox. Each app gets a unique user id
- 48:34Speaker 2: ued and the Linux kernel enforces separation. An app basically
- 48:37Speaker 2: can't directly access another app's private data or interfere with
- 48:41Speaker 2: the core system unless specific permissions are granted. Those permissions
- 48:44Speaker 2: are crucial things like accessing contacts, location, camera, Internet. They're
- 48:48Speaker 2: defined in the app's Android manifest dotxml file and the
- 48:52Speaker 2: user typically has to approve them. Android also has built
- 48:55Speaker 2: in features like Google play Protect, which scans apps for
- 48:58Speaker 2: malware and by default it blocked installation from unknown sources
- 49:01Speaker 2: outside the Play Store, though users can disable that protection.
- 49:05Speaker 2: For authentication, you have screen locks, pattern pian password biometrics,
- 49:09Speaker 2: and importantly, offline brute force attacks against the lock screen
- 49:12Speaker 2: are generally infeasible too many failed attempts conrigger a data way.
- 49:15Speaker 2: Plus there's the fine my device feature for remote location
- 49:18Speaker 2: and wiping.
- 49:19Speaker 1: And how does Apple's iOS compare the walled garden approach?
- 49:22Speaker 2: Yeah?
- 49:22Speaker 1: What are its security fundamentals?
- 49:24Speaker 2: iOS is known for its tight control. It's a proprietary
- 49:27Speaker 2: OS and apps primarily come from the heavily vetted app store.
- 49:31Speaker 2: Installing unofficial apps via IPA files is possible, but more restricted,
- 49:36Speaker 2: often requiring developer accounts or enterprise certificates. The iOS sandbox
- 49:40Speaker 2: is generally considered even stricter than androids by default. Jail
- 49:44Speaker 2: braking is the process of removing these restrictions on iOS,
- 49:47Speaker 2: similar to rooting on Android. It allows installing third party
- 49:50Speaker 2: apps and gives root access, but it also significantly weakened security,
- 49:54Speaker 2: voids the warranty and makes the device much more vulnerable
- 49:57Speaker 2: to malware. For authentication, iosu us as passcodes for six
- 50:01Speaker 2: digits face ID or touch ID. The passcode is cryptographically
- 50:05Speaker 2: tied to the device's unique device id UID to protect
- 50:08Speaker 2: data encryption keys like Android ten, failed passcode attempts usually
- 50:13Speaker 2: trigger a data wipe, and in corporate environments, mobile device
- 50:16Speaker 2: management MDM software is widely used to enforce security policies,
- 50:19Speaker 2: distribute apps, and remotely manage iPhones and iPads.
- 50:22Speaker 1: Okay, so both have sandboxes and protections. When pen testing
- 50:25Speaker 1: mobile apps? What are the key risks testers look for?
- 50:27Speaker 1: You mentioned in O Waspy Mobile top ten. Yes.
- 50:30Speaker 2: Similar to the web version, the O was bobol Top
- 50:33Speaker 2: ten lists the most critical security risks specifically for mobile applications.
- 50:38Speaker 2: Instead of just listening them all, let's highlight one that's
- 50:40Speaker 2: really common and dangerous. Insecure data storage. This happens when
- 50:45Speaker 2: an app stores sensitive information, maybe your logging credentials, session tokens,
- 50:49Speaker 2: personal details, even credit card numbers, directly on the phone's
- 50:52Speaker 2: storage without proper encryption or protection. It might store it
- 50:56Speaker 2: in plain text files, easily accessible databases, or preference file.
- 51:00Speaker 2: If an attacker gains even limited access to the device's
- 51:03Speaker 2: file system, maybe via malware or physical access, or even
- 51:06Speaker 2: just another robe app, if permissions are weak, they can
- 51:09Speaker 2: often just read this stored data directly, huge risk. Other
- 51:12Speaker 2: major risks include things like improper platform usage, misusing OS features,
- 51:17Speaker 2: insecure communication, not using HGTPS properly, code tampering, and reverse engineering.
- 51:22Speaker 1: The app into your data storage. Sounds bad, Let's look
- 51:24Speaker 1: at some practical Android hacking examples from the book.
- 51:27Speaker 2: How do you set up a test environment for testing
- 51:29Speaker 2: Android apps? You typically use Android's studio, which includes emulators
- 51:33Speaker 2: virtual Android devices. You also need the Android SDK Software
- 51:38Speaker 2: Development Kit, which contains essential tools like the Android debug
- 51:41Speaker 2: Bridge ADB, ADB is the crucial command line tool for
- 51:45Speaker 2: communicating with both emulators and physical Android devices connected via
- 51:49Speaker 2: USB with debugging enabled. Common ADB commands include ad devices
- 51:54Speaker 2: to see connected device emulators, ad shell to get a
- 51:57Speaker 2: command line shell directly on the device, adbed pull to
- 52:00Speaker 2: download files from the phone to your computer, and add
- 52:03Speaker 2: push to upload files to the phone. Pen Testers often
- 52:06Speaker 2: install deliberately vulnerable apps like Diva, Damn insecure vulnerable application
- 52:11Speaker 2: onto an emulator or test device to practice finding and
- 52:13Speaker 2: exploiting common flaws in a safe environment, and how might.
- 52:16Speaker 1: An attacker actually grab credentials using ADB leveraging that insecure
- 52:20Speaker 1: storage issue right.
- 52:21Speaker 2: This is where insecure storage becomes a real problem. If
- 52:24Speaker 2: an app foolishly stores, say, the user's log in details
- 52:27Speaker 2: in its shared preferences file, a common way Android apps
- 52:30Speaker 2: store simple settings in plain text. An attacker with ADB
- 52:34Speaker 2: access ABS shell can often navigate to the app's data
- 52:37Speaker 2: directory data Data app package, NAM shared prefs and just
- 52:40Speaker 2: use cat to print the contents of the XML preferences file.
- 52:43Speaker 2: If the username and password are in there unencrypted, they're
- 52:46Speaker 2: immediately exposed like catjackcar dot sem dot, Diva preferences dot
- 52:50Speaker 2: XML might just split up a log in details super simple,
- 52:53Speaker 2: super bad. And mobile apps can have SQL injection flaws too.
- 52:57Speaker 2: How does that work on a phone?
- 52:58Speaker 1: Yeah? Absolutely. Many Android apps use local Squad databases to
- 53:01Speaker 1: store data. The app takes user input, like from a
- 53:04Speaker 1: search bar, and puts it dirictly into a SQL query
- 53:06Speaker 1: for that local database without proper sanitization SQL as possible.
- 53:10Speaker 2: An attacker might use ad blogcat to watch the apps
- 53:13Speaker 2: logs and see the SQL queries being made in real time.
- 53:16Speaker 2: Then they could try injecting classic sequel payloads like R
- 53:20Speaker 2: one one into an input field within the app. If
- 53:23Speaker 2: the app is vulnerable, this might trick the query into
- 53:25Speaker 2: returning all records from a table, potentially revealing all stored
- 53:29Speaker 2: user names, passwords, credit card details, et cetera, right within
- 53:32Speaker 2: the app's interface. Alternatively, with ADB access, you can often
- 53:37Speaker 2: just add pull the entire squide database file eg. Squad
- 53:40Speaker 2: dot dB from the app's data directory onto your computer.
- 53:43Speaker 2: Then you can open it with a standard squite three
- 53:46Speaker 2: tool and browse all the tables and data offline at
- 53:48Speaker 2: your leisure.
- 53:49Speaker 1: Wow. Okay, so pulling the whole database and what about
- 53:51Speaker 1: hacking a real Android phone not just an emulator getting
- 53:54Speaker 1: that remote control.
- 53:55Speaker 2: That's the more realistic attack scenario. It usually involves creating
- 53:59Speaker 2: a malicious APK file. First, you'd use a tool like
- 54:03Speaker 2: msfinom part of metasploit, to generate an APK payload, often
- 54:07Speaker 2: a reverse blate payload, which will connect back to the
- 54:09Speaker 2: t attacker. You might even try to bin in this
- 54:12Speaker 2: payload to a legitimate looking app to disguise it. Then
- 54:15Speaker 2: you need a way for the victim's phone to connect
- 54:17Speaker 2: back to you, since you're likely behind routers and firewalls.
- 54:20Speaker 2: You typically set up a cloud server like a cheap
- 54:23Speaker 2: Google Cloud or AWS instance running a Buntu. You'd host
- 54:26Speaker 2: the malicious ABK on a web server on that cloud
- 54:29Speaker 2: instance for the victim to download, and you'd run your
- 54:31Speaker 2: metasplit listener on that same cloud server, waiting for the
- 54:34Speaker 2: connection on its public IP address. The hardest part is
- 54:38Speaker 2: social engineering convincing the victim to download and install that APK.
- 54:42Speaker 2: They'd likely have to disable the install Unknown Apps security
- 54:45Speaker 2: setting on their phone first, which is a hurdle, but
- 54:47Speaker 2: if they do install it and run it, the payload
- 54:49Speaker 2: connects back to your listener, giving you a interpreter session.
- 54:52Speaker 2: From there, you have significant control SEMPS info check root,
- 54:56Speaker 2: see if the phone is rooted, geolocate, get GPS coordinated
- 55:00Speaker 2: it's dump contacts, dump SEMs, take pictures with the camera,
- 55:02Speaker 2: record audio, lots of possibilities. Tools like evil droid are
- 55:06Speaker 2: also popular for generating these malicious APKs, sometimes offering more
- 55:09Speaker 2: evasion features or easier ways to inject backdoors into existing
- 55:12Speaker 2: legitimate APKs.
- 55:14Speaker 1: Okay, so connecting all this back, We've talked a lot
- 55:16Speaker 1: about labs and testing. What's the main practical difference when
- 55:20Speaker 1: trying to gain access in a real network like out
- 55:23Speaker 1: in the wild compared to a controlled lab environment.
- 55:25Speaker 2: The biggest practical difference, especially when you need the victim
- 55:28Speaker 2: machine to connect back to you, like with reverse shells,
- 55:30Speaker 2: interpreter listeners b fooks, is dealing with network address translation,
- 55:36Speaker 2: net and firewalls. In a lab, your attacker machine and
- 55:39Speaker 2: victim machine might be on the same simple network easy
- 55:43Speaker 2: In the real world, your attacker machine, say your Collie
- 55:46Speaker 2: box at home or on that cloud server, is behind
- 55:48Speaker 2: a router. The victim is somewhere else, also behind a router.
- 55:52Speaker 2: For that victim machine to connect back to your listener,
- 55:55Speaker 2: you need to configure port forwarding on your router or
- 55:58Speaker 2: the cloud server's firewall. I need to tell your router, hey,
- 56:01Speaker 2: any incoming connection attempt on port, say forty four four
- 56:04Speaker 2: to four should be forwarded to the internal IP address
- 56:07Speaker 2: of my Collie machine. Without port forwarding, your router would
- 56:11Speaker 2: just block those incoming connection attempts and your listener would
- 56:14Speaker 2: never receive the connection from the victim. It's a crucial
- 56:17Speaker 2: step for making reverse connections work across the Internet.
- 56:20Speaker 1: Port forwarding right, That makes sense. What we have certainly
- 56:23Speaker 1: covered a lot of ground today, an incredible journey through
- 56:27Speaker 1: the intricate world of penetration testing. We went from cracking
- 56:31Speaker 1: Wi Fi doing those sneaky man in the middle attacks
- 56:35Speaker 1: all the way to exploiting servers clients using social engineering
- 56:38Speaker 1: and digging into web and mobile security.
- 56:41Speaker 2: Yeah, it's a broad field, but hopefully by understanding these techniques,
- 56:45Speaker 2: you're not just learning how the bad guys operate. You're
- 56:47Speaker 2: really gaining that critical insight you need to build better
- 56:50Speaker 2: defenses to spot weaknesses and the systems you use or manage.
- 56:54Speaker 2: It's about turning that curiosity about how things break into
- 56:58Speaker 2: a real capability to make things strong. That's the power here.
- 57:01Speaker 1: Absolutely, So the final question for you listening in this
- 57:04Speaker 1: world is just increasingly connected, relying on all these systems,
- 57:08Speaker 1: What hidden vulnerabilities might be lurking in the digital services
- 57:11Speaker 1: use every single day, and maybe, just maybe, how could
- 57:14Speaker 1: you potentially contribute ethically, of course, to finding them and
- 57:18Speaker 1: making our shared digital world just a little bit safer.
- 57:21Speaker 2: Keep asking questions, keep learning, keep exploring, and just remember
- 57:25Speaker 2: that real, true security, it starts with really understanding how
- 57:29Speaker 2: things work and how they can be broken