Latest / CyberSecurity Summary / Bug Bounty Hunting for Web Security: Find and Exploit Vulnerabilities in Web sites and Applications
Transcript
- 0:00Speaker 1: What if you could get paid to break things, I
- 0:02Speaker 1: mean legally and ethically find hidden weaknesses in the digital
- 0:07Speaker 1: armor of some really big tech companies.
- 0:09Speaker 2: Yeah, it sounds a bit counterintuitive, doesn't it. Yeah, but
- 0:12Speaker 2: it's a real thing.
- 0:12Speaker 1: We're diving into, well, a pretty fascinating field today where
- 0:16Speaker 1: curiosity meets critical thinking and you know, the payout can
- 0:19Speaker 1: actually be quite impressive.
- 0:21Speaker 2: It's true. We're talking about the world of web security
- 0:24Speaker 2: and bug bounty hunting. It's a really crucial front line
- 0:29Speaker 2: in protecting well, pretty much everything we do online now.
- 0:32Speaker 1: Absolutely, so today we're doing a deep dive into bug
- 0:35Speaker 1: bounty hunting for web security. Our mission really is to
- 0:38Speaker 1: cut through the jargon, understand the core ideas, the clever
- 0:43Speaker 1: techniques and the essential tools that let security pros find
- 0:46Speaker 1: these vulnerabilities in web apps, right.
- 0:48Speaker 2: And how they help prevent malicious attacks and yeah, sometimes
- 0:52Speaker 2: even or in a nice bounty for doing it.
- 0:54Speaker 1: And this deep dive it pulls insights from a pretty
- 0:57Speaker 1: comprehensive guide, right, an experts view on the let's say,
- 1:00Speaker 1: offensive side of bug hunting exactly.
- 1:03Speaker 2: We're going to unpack how ethical hackers think, what specific
- 1:06Speaker 2: weaknesses they target, and the frankly powerful tools they use
- 1:11Speaker 2: in this constant sort of digital chess match.
- 1:13Speaker 1: Okay, let's get into it then. So the big question first,
- 1:16Speaker 1: why why would someone actually dedicate their time to hunting
- 1:20Speaker 1: for bugs? What's the real pull?
- 1:23Speaker 2: Well, there are a few pretty strong motivations actually. First,
- 1:26Speaker 2: it just makes you a better security professional, plain and simple.
- 1:29Speaker 2: If you understand how attackers operate, you get way better
- 1:32Speaker 2: at defending.
- 1:33Speaker 1: That makes sense, know your enemy kind.
- 1:34Speaker 2: Of thing precisely. Second, there's well a huge element of recognition,
- 1:40Speaker 2: you know, respect within the cybersecurity community. Finding a critical
- 1:43Speaker 2: bug in a major platform that really builds your credibility fast.
- 1:47Speaker 1: And the money you mentioned bounties.
- 1:48Speaker 2: Oh yeah, and of course the financial side can be significant.
- 1:52Speaker 2: It's definitely not uncommon for top hunters to earn substantial
- 1:56Speaker 2: sums for finding really high impact vulnerabilities.
- 2:00Speaker 1: That's a key point. It's not some niche hobby anymore.
- 2:04Speaker 1: Big names like Google, Facebook, Twitter, they aren't just putting
- 2:09Speaker 1: up with this, They're actively encouraging it with their own
- 2:12Speaker 1: bug bounty programs.
- 2:14Speaker 2: Right, It's become a standard practice. It's a win win really.
- 2:17Speaker 2: They get their security strengthened and skilled people get rewarded
- 2:21Speaker 2: for finding the flaws.
- 2:22Speaker 1: What's really interesting, though, is the ethical angle. The guide
- 2:26Speaker 1: is clear on this, isn't it?
- 2:27Speaker 2: Oh, absolutely crystal clear. You're learning these attacking techniques quote
- 2:31Speaker 2: unquote specifically for defense. You're essentially becoming a white hat
- 2:35Speaker 2: hacker or maybe a penetration tester to find those flaws
- 2:39Speaker 2: before the h the actual bad guys do.
- 2:41Speaker 1: So the knowledge is like a shield, not a weapon,
- 2:44Speaker 1: for causing trouble.
- 2:45Speaker 2: Exactly, never from malpractice.
- 2:47Speaker 1: Which naturally brings up the legal side. There's a very
- 2:49Speaker 1: bright line here. You just cannot cross.
- 2:51Speaker 2: Cannot stress this enough. You must never ever attack systems
- 2:55Speaker 2: without the owner's explicit permission. Seriously, this is an.
- 2:58Speaker 1: Optional and the consequence if you do they can be severe.
- 3:02Speaker 2: It's against the law in many places, and it could
- 3:04Speaker 2: easily end a potential career before he even gets off the ground.
- 3:08Speaker 2: Just don't do it.
- 3:09Speaker 1: Okay. So for someone starting out thinking this sounds interesting,
- 3:13Speaker 1: how do they get that permission? How do they stay legal?
- 3:16Speaker 2: The advice is pretty straightforward. Register with established bug bounty platforms,
- 3:21Speaker 2: you know places like bug crowd Hacker, one, Cobalt, there's
- 3:25Speaker 2: even the Japan bug bounty program Anti hack.
- 3:28Speaker 1: These platforms provide the framework.
- 3:31Speaker 2: Yeah, they act as the intermediary, They provide the legal sandbox.
- 3:34Speaker 2: The rules of engagement are clear, so you know you're
- 3:37Speaker 2: operating within legitimate boundaries.
- 3:38Speaker 1: Got it. But finding these exploits, it's not like just
- 3:43Speaker 1: running a quick scan is it sounds like it takes
- 3:45Speaker 1: some serious effort.
- 3:47Speaker 2: Oh. Absolutely, there's a steep learning curve involved, no doubt.
- 3:49Speaker 2: You need a pretty deep understanding of how web applications
- 3:53Speaker 2: are built, the HGTP protocol itself, different encoding schemes, all
- 3:57Speaker 2: the different types of attacks out there.
- 3:58Speaker 1: So it's less about just knowing the it's much.
- 4:01Speaker 2: More about understanding the underlying logic. You know how the
- 4:04Speaker 2: web actually works and where those fundamental building blocks can
- 4:08Speaker 2: be well twisted or subverted.
- 4:10Speaker 1: Okay, so if you had to boil it down, what
- 4:13Speaker 1: is a bug bounty hunter? A simple definition?
- 4:15Speaker 2: Sure, At its core, a bug bounty hunter is an
- 4:18Speaker 2: ethical hacker who gets paid to find vulnerabilities in software
- 4:22Speaker 2: and websites. Simple as that, really, but pretty powerful.
- 4:26Speaker 1: That's a great summary. Now, Okay, someone's intrigued, they're thinking
- 4:29Speaker 1: about trying this, But you can't just start poking around
- 4:33Speaker 1: on say Google's live servers. Right, you need a safe space.
- 4:37Speaker 1: Why is setting up a virtual lab so vital for beginners?
- 4:40Speaker 2: It's absolutely crucial paramount even because it lets you practice
- 4:44Speaker 2: using all these hacking tools legally and more importantly, safely
- 4:48Speaker 2: on your own system.
- 4:49Speaker 1: Like a digital sandbox exactly like that.
- 4:52Speaker 2: Think of it as a controlled test chamber. If some
- 4:55Speaker 2: malicious code gets loose, or maybe a tool doesn't behave
- 4:58Speaker 2: as expected, it's all contained with in that simulated environment.
- 5:01Speaker 2: It won't trash your main computer.
- 5:03Speaker 1: Ah okay, so it protects your actual machine.
- 5:05Speaker 2: Right, it's your personal risk free playground. You can just experiment,
- 5:09Speaker 2: try everything that comes into your head without worrying about
- 5:12Speaker 2: breaking anything important or accidentally attacking someone else.
- 5:16Speaker 1: Makes perfect sense, like a crash test dummy for your
- 5:19Speaker 1: digital experiments. So what tools and setups do you recommend
- 5:23Speaker 1: for building this virtual lab?
- 5:26Speaker 2: For beginners? Virtual Box is usually the top recommendation. It's
- 5:30Speaker 2: super versatile because it runs on pretty much any operating
- 5:33Speaker 2: system Windows, Linux, Mac OS, so.
- 5:36Speaker 1: It works wherever you are.
- 5:37Speaker 2: Yeah, it's compatibility and relative ease of use make it
- 5:40Speaker 2: a really good starting point for setting up a security lab.
- 5:43Speaker 1: And once you have virtual Box running, what os should
- 5:45Speaker 1: you install inside it for this kind of work.
- 5:48Speaker 2: Colie Linux is definitely the go to choice for most
- 5:50Speaker 2: people starting in ethical hacking.
- 5:52Speaker 1: Why Collie specifically because.
- 5:54Speaker 2: It comes preloaded with just a massive suite of essential
- 5:58Speaker 2: security tools, hundreds of them. It just streamlines the setup
- 6:01Speaker 2: process incredibly. You basically get a hacker's toolkit ready to
- 6:04Speaker 2: go right out of the virtual box.
- 6:06Speaker 1: Okay, that's convenient. So we've got Collie running inside virtual box.
- 6:10Speaker 1: What are the first few core tools someone would likely
- 6:14Speaker 1: start using to actually hunt for vulnerabilities.
- 6:17Speaker 2: Well, you'll quickly become familiar with tools like burp suite
- 6:21Speaker 2: and wasp bz ABP. These are what we call interception proxies.
- 6:25Speaker 1: Interception proxies. How do they work?
- 6:27Speaker 2: Imagine like a control tower for your web traffic. Every
- 6:33Speaker 2: single piece of information your browser sends to a website
- 6:36Speaker 2: or receives back passes through this tool.
- 6:38Speaker 1: First, so you can see everything exactly.
- 6:41Speaker 2: They capture all the traffic from the web application you're targeting,
- 6:44Speaker 2: just less you inspect it, analyze it, even modify requests
- 6:48Speaker 2: before they hit the server or responses before they reach
- 6:51Speaker 2: your browser.
- 6:51Speaker 1: Like being a man in the middle, but for ethical reasons.
- 6:53Speaker 2: Precisely give you incredible control and visibility. But it's also
- 6:57Speaker 2: really important to remember relying on just one tool that's
- 7:00Speaker 2: usually a bad idea in this field. Why is that
- 7:02Speaker 2: because no single tool catches everything. Different tools have different strengths,
- 7:07Speaker 2: different ways of looking at things, So having a diverse
- 7:11Speaker 2: toolkit is always always better for doing comprehensive testing. You'll
- 7:15Speaker 2: miss things otherwise, right.
- 7:17Speaker 1: So it's not about one magic bullet tool, but building
- 7:19Speaker 1: an arsenal. And where do you practice with these tools
- 7:22Speaker 1: if you can't just point them at live websites?
- 7:24Speaker 2: Ah, that's where applications like webgoat come in. It's deliberately
- 7:27Speaker 2: designed to be insecure, built to be broken pretty much.
- 7:31Speaker 2: It's made by OAS, the Open Web Application Security Project,
- 7:35Speaker 2: specifically for learning and testing common web app vulnerabilities. You
- 7:38Speaker 2: run it locally, usually on your own machine, at an
- 7:41Speaker 2: address like http dot localhost dot a zero a zero web.
- 7:44Speaker 1: Gooat, and because it's local and designed for testing, you.
- 7:47Speaker 2: Can experiment as much as you want, try all sorts
- 7:49Speaker 2: of attacks without any legal risk whatsoever. It's the perfect
- 7:52Speaker 2: training ground.
- 7:53Speaker 1: Are there other Linux distributions besides Collie that ethical hackers
- 7:57Speaker 1: sometimes use? Maybe for more specialized.
- 8:00Speaker 2: Oh sure, Kalli is the most popular, but there are others.
- 8:03Speaker 2: Black Arts, linuxes well a behemoth. It boasts something like
- 8:07Speaker 2: over nineteen hundred tools pre installed.
- 8:09Speaker 1: Wow.
- 8:10Speaker 2: Yeah. Then for users who want extreme security through isolation,
- 8:13Speaker 2: there's quebsos. It compartmentalizes everything into separate, isolated virtual machines. Interesting,
- 8:19Speaker 2: and you also have things like in pre doos which
- 8:21Speaker 2: uses the anonymous IP network and hunix, which leverages the
- 8:25Speaker 2: tour network for you know, enhance privacy and anonymity. Each
- 8:28Speaker 2: has its niche.
- 8:29Speaker 1: Okay, so we've covered the why and the how to
- 8:32Speaker 1: set up our ethical hacking playground. Now for the really
- 8:35Speaker 1: juicy stuff, let's dive into some specific web vulnerabilities. Often
- 8:40Speaker 1: ethical hackers start by looking for subtle tricks, right like
- 8:43Speaker 1: cross site requests forgery or CSRF.
- 8:45Speaker 2: What exactly is that CSRF? Yeah, often pronounced sea surf.
- 8:48Speaker 2: It's an attack where a malicious request gets sent from
- 8:51Speaker 2: a user's browser without them even knowing it or intending it.
- 8:53Speaker 1: How does that work? How can my browser send something
- 8:56Speaker 1: I didn't ask it to?
- 8:57Speaker 2: Think of it like this? Your already logged into your bank,
- 9:01Speaker 2: right your browser has a valid session cookie. The attacker
- 9:05Speaker 2: tricks your browser into submitting another request to your bank,
- 9:09Speaker 2: say to transfer money, leveraging that existing logged in session.
- 9:13Speaker 2: Your browser just does what it's told, thinking the request
- 9:16Speaker 2: is legitimate because.
- 9:17Speaker 1: While you're logged in, so the users logged in, everything
- 9:20Speaker 1: seems normal. How does the attacker actually trigger that unwanted request?
- 9:24Speaker 2: They can create a seemingly harmless web page, maybe with
- 9:27Speaker 2: just an image or a link on it. Hidden on
- 9:29Speaker 2: that page is an HTML form. When your browser lows
- 9:32Speaker 2: that page, maybe even just the hidden image pixel, some
- 9:35Speaker 2: JavaScript in the background like document dot form zero dot submit,
- 9:39Speaker 2: automatically submits that hit en form.
- 9:41Speaker 1: And because my browser is already logged into the vulnerable.
- 9:43Speaker 2: Site exactly, that malicious request often just sails right through
- 9:47Speaker 2: the defenses because it includes your valid session cookies, the
- 9:50Speaker 2: server thinks you sent it.
- 9:52Speaker 1: Wow, So it's less about injecting bad code and more
- 9:55Speaker 1: about tricking the browser into being an unwitting accomplice.
- 9:58Speaker 2: That's a great way to put it. Bloids the trust
- 10:00Speaker 2: between a user's browser and the site they're logged into.
- 10:04Speaker 1: So how do developers stop this? What's the key defense
- 10:07Speaker 1: against CSRF?
- 10:08Speaker 2: The core defense is using CSRF tokens for every action
- 10:12Speaker 2: the user takes that changes something like changing a password
- 10:15Speaker 2: or sending money, the server should require a secret, unique,
- 10:19Speaker 2: unpredictable token to be submitted along with the request, and
- 10:23Speaker 2: this token proves it proves that the request really originated
- 10:26Speaker 2: from the legitimate user interface on the site itself and
- 10:30Speaker 2: not from some malicious third party page. Yeah, credit for
- 10:33Speaker 2: is a request. If the token is missing or invalid,
- 10:36Speaker 2: the server just rejects the action.
- 10:38Speaker 1: Fascinating. Okay, Next up, cross site scripting XSS. This one
- 10:42Speaker 1: feels like it's been around forever, but it's still a
- 10:45Speaker 1: huge problem, right.
- 10:45Speaker 2: Oh, absolutely, EXSS is still incredibly common. It involves injecting
- 10:50Speaker 2: malicious browser site scripts, usually it's JavaScript, into a web application.
- 10:53Speaker 1: How does that injection happen?
- 10:55Speaker 2: Typically it's because user input fields aren't properly sanitized or validated.
- 11:00Speaker 2: Think about a comment section on a blog or a
- 11:02Speaker 2: search bar. If I can type something like scriptrol create
- 11:07Speaker 2: been hacked script into that field and.
- 11:09Speaker 1: The website just displays it as raw HTML.
- 11:12Speaker 2: Exactly, then every single user who views that page or
- 11:17Speaker 2: maybe sees that search result will have my malicious script
- 11:20Speaker 2: run in their browser within the context of the trusted website.
- 11:24Speaker 1: So attackers are basically probing every place a user can
- 11:27Speaker 1: type something in looking for a spot where raw HTML
- 11:30Speaker 1: or jobscript might slip through.
- 11:32Speaker 2: The cracks precisely. And the reason it's so hard to
- 11:34Speaker 2: prevent entirely, especially on huge complex applications like say Google
- 11:38Speaker 2: or Facebook, is just the sheer scale. You have thousands
- 11:42Speaker 2: of developers, millions of lines of code ensuring every single
- 11:45Speaker 2: input fuel everywhere perfectly strips out every potentially harmful tag
- 11:49Speaker 2: or script. It's a monumental challenge.
- 11:51Speaker 1: Just one little oversight can open a huge door.
- 11:53Speaker 2: A massive door. That's why EXSS remains one of the
- 11:56Speaker 2: most prevalent vulnerabilities found by bug hunters.
- 11:59Speaker 1: So the core insight here isn't just about the script itself,
- 12:02Speaker 1: is it. It's about how absolutely critical every single point
- 12:06Speaker 1: of user input becomes. A tiny mistake can compromise potentially
- 12:11Speaker 1: everyone using the site.
- 12:12Speaker 2: That's exactly it. The impact can be widespread.
- 12:14Speaker 1: How would a hacker approach finding EXSS in a safe
- 12:18Speaker 1: test environment like one of those deliberately vulnerable.
- 12:20Speaker 2: Apps, Well, using something like o WASP, Broken Web Application
- 12:25Speaker 2: or BWPP. You'd start by systematically trying to inject simple
- 12:29Speaker 2: jobscript snippets into various input fields. You know, like that
- 12:33Speaker 2: basic alert Hello, this is reflected XSS.
- 12:36Speaker 1: Payload, just to see if anything executes.
- 12:38Speaker 2: Yeah, just to see if you get that pop up box.
- 12:40Speaker 2: And tools like burp suite and o wasp ZAPPI are
- 12:43Speaker 2: indispensable here. Zapip, for instance, is really helpful because it
- 12:47Speaker 2: doesn't just flag potential vulnerabilities with those colored alerts red
- 12:51Speaker 2: for high risk, orange for medium, yellow for low.
- 12:54Speaker 1: It tells you how to fix it.
- 12:54Speaker 2: Too often, yes, it'll suggest concrete solutions, like maybe adding
- 12:58Speaker 2: the x frame options ny header to prevent certain types
- 13:01Speaker 2: of attacks like clickjacking, which is related.
- 13:03Speaker 1: So z adp gives you a bit of a roadmap
- 13:05Speaker 1: for both finding and fixing the issue.
- 13:08Speaker 2: It definitely can and for more systematic testing, maybe trying
- 13:12Speaker 2: lots of different EXSS variations. Burp Suite's intruder tool is
- 13:16Speaker 2: incredibly powerful. You can feed it a whole list of
- 13:18Speaker 2: known EXSS payloads and just automate the process of sending
- 13:22Speaker 2: them to various input fields looking for responses that indicate
- 13:25Speaker 2: your script actually executed successfully.
- 13:27Speaker 1: Okay, let's switch gears to header injection and URL redirection.
- 13:31Speaker 1: What's the basic weakness here what allows this kind of attack?
- 13:34Speaker 2: This vulnerability pops up when an application takes user input,
- 13:38Speaker 2: maybe from a URL parameter, and uses it directly to
- 13:41Speaker 2: decide where to redirect the user's browser without properly checking
- 13:45Speaker 2: or validating that input first.
- 13:46Speaker 1: So instead of sending you to a safe fixed.
- 13:49Speaker 2: Location right, instead of having SAFECode like header location dot https,
- 13:53Speaker 2: do wwwang dot site hard coded, the vulnerable code might
- 13:56Speaker 2: look more like response dot send, redirect, request dot get parameter,
- 13:59Speaker 2: or just blindly trust whatever URL the user or attacker
- 14:03Speaker 2: provides in that parameter, and.
- 14:05Speaker 1: That opens the door to what's the main risk for
- 14:07Speaker 1: the user.
- 14:08Speaker 2: The biggest risk is usually very convincing phishing attacks. An
- 14:12Speaker 2: attacker can craft a special URL that looks like it
- 14:15Speaker 2: belongs to the legitimate website, but when you click it,
- 14:19Speaker 2: that vulnerable redirect parameter sends your browser seamlessly to a
- 14:22Speaker 2: malicious site designed to steal your credentials or drop malware.
- 14:27Speaker 1: Because it came from the trusted site initially, the user
- 14:30Speaker 1: might not notice the switch exactly.
- 14:32Speaker 2: It makes the fish much harder to spot. It really
- 14:35Speaker 2: exploits that user trust in the original domain.
- 14:38Speaker 1: So how do ethical hackers track down these hidden potentially
- 14:42Speaker 1: malicious redirects.
- 14:44Speaker 2: Again, Bripsweet's proxy and spider tools are key. As you
- 14:48Speaker 2: browse the target application, you're keeping an eye out for
- 14:50Speaker 2: any HTTP responses that come back with a three xx
- 14:53Speaker 2: status code that three to one means a redirect is happening.
- 14:56Speaker 1: And once you spot a three xx redirect, then you.
- 14:59Speaker 2: Take that request over to Burp's repeater tool. There you
- 15:02Speaker 2: can manually tamper with the parameter that seems to be
- 15:05Speaker 2: controlling the redirect destination. If you can change it to
- 15:08Speaker 2: point to an external site you control, and the browser
- 15:11Speaker 2: successfully redirects there, you've confirmed the vulnerability, and.
- 15:14Speaker 1: If you find one, what's the fix you'd recommend?
- 15:17Speaker 2: Well, the best fix is usually to just avoid using
- 15:19Speaker 2: user controlled data in redirection logical together if possible. If
- 15:24Speaker 2: a redirect is necessary based on input, then use direct
- 15:27Speaker 2: hard coded links mapped to save values, or maintain a
- 15:32Speaker 2: very strict server side whitelist of allowed destination ur else.
- 15:35Speaker 1: Whitelisting sounds safer.
- 15:37Speaker 2: Definitely and absolutely crucial. Any user input that might influence
- 15:41Speaker 2: a redirect destination must be strongly validated. Check that it
- 15:45Speaker 2: starts with an expected trusted prefix like http dot your
- 15:48Speaker 2: site dot com and doesn't contain characters that could trick
- 15:50Speaker 2: the browser.
- 15:51Speaker 1: Okay, next up a real classic malicious file uploads. What's
- 15:55Speaker 1: the immediate danger if an attacker can successfully upload a
- 15:58Speaker 1: bad file?
- 15:59Speaker 2: Oh, the danger is huge. If an attacker can upload
- 16:02Speaker 2: a malicious file, especially something like a PHP script or
- 16:05Speaker 2: another executable file type, and then get the server to
- 16:07Speaker 2: run it, that can give them a significant foothold on
- 16:09Speaker 2: the system, leading to what It could lead to them
- 16:12Speaker 2: completely owning the system, as they say, getting full control,
- 16:15Speaker 2: or at the very least, maybe defacing the website changing
- 16:18Speaker 2: its content. It's basically a form of remote code execution.
- 16:22Speaker 2: You're potentially letting the attacker run their own programs directly
- 16:25Speaker 2: on your server.
- 16:26Speaker 1: Yikes. How does a poorly secured file upload form look
- 16:30Speaker 1: compared to a safe one?
- 16:31Speaker 2: An insecure one might be just a basic HTML form
- 16:34Speaker 2: form action upload, PHP method, posting type, multipart from data,
- 16:39Speaker 2: maybe with little or no checking happening on the server side.
- 16:41Speaker 2: It just sort of trusts whatever file the user sends.
- 16:44Speaker 1: It as a secure one.
- 16:45Speaker 2: A secure site implements robust validation on the server after
- 16:48Speaker 2: the file arrives. It would check the file extension sure,
- 16:51Speaker 2: But more importantly, it would check the actual file type
- 16:53Speaker 2: based on its content, not just the name. Maybe scan
- 16:56Speaker 2: it from malware and sure it matches an allowed list
- 16:59Speaker 2: of types like only accepting JPEGs or PDFs, and reject
- 17:03Speaker 2: anything suspicious, especially executable scripts like PHP.
- 17:06Speaker 1: So how would an attacker try to bypass these checks?
- 17:09Speaker 1: In a test lab like DVWA.
- 17:12Speaker 2: They often rely on tricks and misconfigurations. For example, you
- 17:15Speaker 2: might try uploading a malicious PHP file containing commands like
- 17:19Speaker 2: slixick elsli to list files or mk to hacker to
- 17:24Speaker 2: create a directory.
- 17:25Speaker 1: But the server might block dot php files.
- 17:27Speaker 2: Right, so if the server only checks the last part
- 17:30Speaker 2: of the file name, you might try naming your file
- 17:32Speaker 2: something like shell dot php dot jpg. You hope the
- 17:36Speaker 2: server sees dot jpg and allows it, but maybe later
- 17:39Speaker 2: another part of the system interprets it as dot php
- 17:42Speaker 2: and executes it clever.
- 17:44Speaker 1: What else?
- 17:45Speaker 2: You'd also use burp Suite's repeater tool to modify the
- 17:48Speaker 2: request on the fly. You can change the content type
- 17:50Speaker 2: heater that the browser sends, maybe setting it to image jpg.
- 17:53Speaker 2: Even though you're uploading PHP code. You're trying to fool
- 17:55Speaker 2: the server side validation logic and if it works. If
- 17:58Speaker 2: it works, you might send see visible changes like website defacement,
- 18:02Speaker 2: or maybe you can navigate to a new directory like
- 18:04Speaker 2: hacker that your malicious script created that confirms your code executed.
- 18:09Speaker 2: It's definitely a game of cat mouse with the servers
- 18:11Speaker 2: validation rules.
- 18:12Speaker 1: Okay, let's shift slightly towards email security poisoning Sender Policy
- 18:16Speaker 1: Framework or SBF. Most of us just send and receive
- 18:20Speaker 1: emails without thinking much about this. What does SBF actually do?
- 18:24Speaker 2: SBF is a technical standard for email authentication. Its main
- 18:28Speaker 2: job is to help protect both email senders and recipients
- 18:31Speaker 2: from spam, from email spoofing where someone pretends to be
- 18:35Speaker 2: someone else, and from phishing attacks.
- 18:37Speaker 1: How does it do that?
- 18:38Speaker 2: It works by allowing a domain owner, like say, your company,
- 18:42Speaker 2: to publish a list of mail servers that are authorized
- 18:44Speaker 2: to send email on behalf of that domain. When an
- 18:47Speaker 2: email arrives, the receiving server checks the sender's IP address
- 18:51Speaker 2: against this published SBF record for the domain.
- 18:54Speaker 1: Sort of like a bouncer checking an ID against a
- 18:56Speaker 1: guest list.
- 18:57Speaker 2: That's a great analogy. Yeah, if the sending server isn't
- 18:59Speaker 2: all list, the receiving server can be suspicious and might
- 19:03Speaker 2: mark the email as spam or even rejected outright.
- 19:05Speaker 1: Why do we need this extra layer? Doesn't basic email
- 19:08Speaker 1: handle authentication?
- 19:10Speaker 2: That's good question. The fundamental email protocol SMTP is actually
- 19:14Speaker 2: quite old and well surprisingly trusting. It doesn't have strong
- 19:19Speaker 2: authentication built in. It's relatively easy for someone to forge
- 19:23Speaker 2: the from address on an email.
- 19:24Speaker 1: So SPF plugs that gap exactly.
- 19:26Speaker 2: It adds a much needed layer of verification on top
- 19:29Speaker 2: of the basic SMTP process.
- 19:31Speaker 1: Okay, so it's important, but does it have limitations? And
- 19:34Speaker 1: I hear about DMRC too, what's that about.
- 19:36Speaker 2: Yes, SPF definitely has limitations. Yeah. One major one is
- 19:40Speaker 2: that it doesn't actually validate the frumheader the address the
- 19:43Speaker 2: recipient ces and their email client. It checks the envelope from,
- 19:47Speaker 2: which is used more for routing behind the scenes.
- 19:49Speaker 1: Ah, so it might not stop spoofing of the visible
- 19:51Speaker 1: address correct.
- 19:53Speaker 2: Also, SPF can sometimes break when emails are legitimately forwarded
- 19:56Speaker 2: because the forwarding server might not be listed in the
- 19:58Speaker 2: original domains sp F record. That's where DMRC comes in.
- 20:02Speaker 1: What is dmrcad.
- 20:03Speaker 2: DMR, which stands for Domain based Message Authentication Reporting and Conformance,
- 20:08Speaker 2: builds upon both SPF and another standard called DKIM. It
- 20:11Speaker 2: provides much stronger protection against spoofing and fizzing. Crucially, DMR
- 20:16Speaker 2: allows domain owners to tell receiving servers exactly what to
- 20:19Speaker 2: do with emails that fail SPF or DKEM checks, like
- 20:23Speaker 2: quarantine them or reject them. And it provides really valuable
- 20:25Speaker 2: reports back to the domain owner about who is sending
- 20:28Speaker 2: email using their domain, helping them spot fraudulent activity.
- 20:31Speaker 1: So better protection and visibility. How would someone check if
- 20:34Speaker 1: their domain's SPF record is set up correctly?
- 20:36Speaker 2: They're easy to use online tools for that. Good examples
- 20:38Speaker 2: are Kidderman dot com, SPF validate dot html, or the
- 20:42Speaker 2: tools on mxtoolbox dot com. You just put in your
- 20:45Speaker 2: domain name say Sunjipsynha, dot fund, and these tools will
- 20:48Speaker 2: fetch and analyze its published SPF record. They'll show you
- 20:51Speaker 2: what it is like VSPF one plus A plus MX
- 20:54Speaker 2: plus IP four point nine, four point one three zero
- 20:56Speaker 2: point one nine, put one two four all and tell
- 20:59Speaker 2: you it looks correctly formated, helping you spot in years useful.
- 21:02Speaker 1: Okay, Next on our list, XML External Entity injection or XX.
- 21:06Speaker 1: Now many people know XML is a way to structure data,
- 21:09Speaker 1: right How does that lead to an attack?
- 21:11Speaker 2: Right? First, quick recap. XML is a markup language, software
- 21:15Speaker 2: and hardware independent used for storing and transporting data. It's
- 21:18Speaker 2: self descriptive, kind of like a structured text file, maybe
- 21:22Speaker 2: similar in concept to a database table in some ways.
- 21:24Speaker 1: Is it still used much? I hear more about JSON now.
- 21:27Speaker 2: Jason has definitely become more popular for webapis, but XML
- 21:30Speaker 2: is still very widely used, especially in enterprise systems, configuration files,
- 21:35Speaker 2: industry specific standards things like SOPU web services. It's definitely
- 21:39Speaker 2: not gone away.
- 21:39Speaker 1: And what's a DTD? You mentioned that in the context
- 21:41Speaker 1: of XML.
- 21:42Speaker 2: A DTD or document type definition basically defines the rules
- 21:47Speaker 2: for an XML document. It specifies what elements and attributes
- 21:50Speaker 2: are allowed, their structure, ensuring the XML is valid according
- 21:53Speaker 2: to a specific format.
- 21:55Speaker 1: Okay, so XML is just structured data. DTD defines the structure.
- 21:59Speaker 1: Where does the injection part and the danger come from?
- 22:02Speaker 2: The danger the XX injection happens when an application processes
- 22:06Speaker 2: XML input from an untrusted source and its XML parser
- 22:10Speaker 2: is configured insecurely. Specifically, it involves exploiting a feature of
- 22:13Speaker 2: XML parsers that allows XML documents to declare and include
- 22:17Speaker 2: external entities.
- 22:18Speaker 1: External entities like pulling in data from outside the main
- 22:21Speaker 1: XML file exactly.
- 22:24Speaker 2: An attacker can craft malicious XML input that defines an
- 22:27Speaker 2: external entity pointing to a sensitive resource like a local
- 22:31Speaker 2: file on the server. If the parser is vulnerable, it
- 22:35Speaker 2: might actually fetch and include the content of that file
- 22:38Speaker 2: right into the XML document being processed.
- 22:41Speaker 1: So they trick the parser into grabbing things it shouldn't like.
- 22:44Speaker 1: What kind of things?
- 22:45Speaker 2: Potentially, Yeah, this could allow them to view files from
- 22:48Speaker 2: the server's file system. I think configuration files, password files
- 22:52Speaker 2: like etc. Pass throught on Linux. It could also potentially
- 22:56Speaker 2: let them interfere with back end systems the application talks to,
- 22:59Speaker 2: or even low bunch attacks against other external systems from
- 23:02Speaker 2: the application server itself. It exploits how some standard XML
- 23:06Speaker 2: libraries handle these external entities, sometimes insecurely by default.
- 23:10Speaker 1: So it's about tricking the XML parser into becoming an
- 23:13Speaker 1: unwilling accomplice to fetch local files. Can you give a
- 23:16Speaker 1: concrete example of what that malicious XML might look like?
- 23:19Speaker 2: Sure, in a vulnerable app like utilidae or bupp, you
- 23:23Speaker 2: might inject something like this into an XML input field
- 23:26Speaker 2: doc typefood dot entity, xccsystem file dot ettc passwd barn
- 23:32Speaker 2: xebar Okay. Breaking that down, the doc type part defines
- 23:36Speaker 2: a new entity named XC. The system file dot icpasswd
- 23:41Speaker 2: tells the parser that the content of this XCS entity
- 23:44Speaker 2: is the content of the local file a setter pass.
- 23:47Speaker 2: Then later in the XML n XS tries to use
- 23:50Speaker 2: that entity, and.
- 23:50Speaker 1: If the application is vulnerable.
- 23:52Speaker 2: It will replace anx with the actual contents of the
- 23:55Speaker 2: ETSETA pass file, and often that content will get reflected
- 23:58Speaker 2: back in the applications response, letting the attacker see it.
- 24:01Speaker 2: It's a direct way to leak sensitive server information.
- 24:03Speaker 1: That's incredibly powerful access from just manipulating XML. How would
- 24:07Speaker 1: you automate finding these and maybe grabbing specific config.
- 24:10Speaker 2: Files For automation, you definitely turn to Burpsuite's Intruder tool again.
- 24:14Speaker 2: You can load it up with a list of pre
- 24:16Speaker 2: made XX payloads. There are great collections online like the
- 24:18Speaker 2: payloads all the things repository on GitHub, and.
- 24:21Speaker 1: Intruder tries all of them.
- 24:22Speaker 2: Yeah, Intruder will systematically send requests with these different XXX payloads,
- 24:27Speaker 2: targeting various parameters or parts of the XML input. It
- 24:31Speaker 2: automates the fuzzing process trying different techniques to read local
- 24:34Speaker 2: files like common config files, or interact with the system
- 24:38Speaker 2: while you monitor the responses for any signs of success
- 24:41Speaker 2: like leaked file contents appearing okay.
- 24:43Speaker 1: Moving on to command injection vulnerabilities. The sounds well, pretty direct,
- 24:49Speaker 1: like the attacker is literally typing commands. What's the danger
- 24:53Speaker 1: level here?
- 24:54Speaker 2: The danger level is extremely high critical, usually because these
- 24:58Speaker 2: vulnerabilities allow an attacker to execute arbitrary operating system OS
- 25:02Speaker 2: commands directly on the server that's hosting the web application.
- 25:06Speaker 1: So if they get command injection.
- 25:08Speaker 2: It's often game over. They can potentially compromise the entire application,
- 25:12Speaker 2: steal or destroy all its data, maybe install malware, pivot
- 25:16Speaker 2: to attack other internal systems, essentially take full control of
- 25:19Speaker 2: the server infrastructure. It's one of those impactful vulnerabilities you
- 25:22Speaker 2: can find.
- 25:22Speaker 1: How is that different from something like say code injection.
- 25:25Speaker 1: They sound similar.
- 25:26Speaker 2: That's a really key distinction. OS. Command injection specifically runs
- 25:30Speaker 2: commands at the operating system level, like LS to list
- 25:34Speaker 2: files on Linux, or deeron Windows, or even rmaarf to
- 25:38Speaker 2: wipe the disc. It's interacting directly with the server's.
- 25:41Speaker 1: Shell, whereas code injection.
- 25:43Speaker 2: Code injection executes attacker supplied code within the application's own
- 25:46Speaker 2: programming language environment. So maybe injecting malicious PHP code that
- 25:51Speaker 2: the PHP interpreter runs, or Java code or Python code.
- 25:54Speaker 2: Both are extremely severe, but they operate at slightly different
- 25:57Speaker 2: layers of the system stack.
- 25:59Speaker 1: Got it, and how do attackers actually manage to sneak
- 26:03Speaker 1: their OS commands in? How do they piggyback them onto
- 26:05Speaker 1: legitimate input?
- 26:06Speaker 2: They typically use command separators. These are special characters that
- 26:10Speaker 2: the operating system shell understands as meaning run another command.
- 26:14Speaker 2: Common ones on Linux Unix are the semi colon, pete mill,
- 26:17Speaker 2: the ampersandic candor runs in background, double ampersand and L
- 26:20Speaker 2: runs only if previous command succeeded. The pipe sends output
- 26:23Speaker 2: of one command to another, and double pipe runs only
- 26:26Speaker 2: if previous command failed.
- 26:27Speaker 1: So they might append l's to some normal input exactly.
- 26:31Speaker 2: For example, if an application has a feature to ping
- 26:33Speaker 2: and IP address and takes the IP from user input,
- 26:36Speaker 2: an attacker might provide one hundred point zero point zero
- 26:41Speaker 2: point one LS. The application might build the command ping
- 26:44Speaker 2: one to two point zero point zero point one LS,
- 26:48Speaker 2: the OS runs, the ping finishes, sees the semi colon,
- 26:51Speaker 2: and then just runs l's as a completely separate command.
- 26:53Speaker 2: They're chaining commands together clever.
- 26:55Speaker 1: So how would an ethical hacker discover this in a
- 26:58Speaker 1: lab setting? What's the A.
- 27:00Speaker 2: Common approach is using vulnerable features like maybe a DNS
- 27:03Speaker 2: look up page in an app like mutilitay, combined with
- 27:06Speaker 2: purp suites, repeater and intruder. You'd start experimenting in repeater,
- 27:10Speaker 2: injecting potential command separators in simple OS commands after legitimate input,
- 27:14Speaker 2: like trying eight point eight point eight point eight eight
- 27:16Speaker 2: or eight eight point eight point eight in one one.
- 27:18Speaker 1: Mean, just trying different separators and commands.
- 27:20Speaker 2: Yeah, and then you'd use intruder to automate this fuzzing.
- 27:22Speaker 2: You can provide lists of separators, commands, maybe even special
- 27:25Speaker 2: fuzzing markers like sex sixcpres to systematically try different combinations.
- 27:29Speaker 2: Then you carefully analyze the HTTP responses from the server
- 27:32Speaker 2: looking for what in the response you're looking for the
- 27:35Speaker 2: output of your injected commands. If you inject LS and
- 27:38Speaker 2: suddenly see a file listing in the HTML response, or
- 27:41Speaker 2: you injects and see user information like OD three to
- 27:44Speaker 2: three WWW data, you know you've found a command injection vulnerability.
- 27:49Speaker 2: You can use it to discover the OS type, running
- 27:52Speaker 2: user installed software, all sorts of useful info.
- 27:54Speaker 1: We've covered a lot of serious ground. Let's wrap up
- 27:57Speaker 1: the vulnerability section with two big ones each, m MAL
- 28:00Speaker 1: injection and sqel injection. First, HTML injection. How is this
- 28:04Speaker 1: one characterized?
- 28:05Speaker 2: HTML injection is often described as a rendering attack. It
- 28:09Speaker 2: basically means an attacker can inject arbitrary HTML code tags
- 28:12Speaker 2: like h one or imagy or even form into a
- 28:15Speaker 2: web page, and that injected HTML gets rendered in display
- 28:18Speaker 2: to other users.
- 28:19Speaker 1: So it messes with how the page looks. What are
- 28:22Speaker 1: the actual risks?
- 28:23Speaker 2: Well? Compared to command injection, it might seem less risky
- 28:25Speaker 2: for say, direct data theft, but it can seriously damage
- 28:29Speaker 2: website's reputation by defacing its appearance. More critically, it can
- 28:32Speaker 2: often be a stepping stone to more severe attacks. For instance,
- 28:36Speaker 2: an attacker could inject a fake login form using HTML injection.
- 28:40Speaker 2: That form might look legitimate, but it actually posts the
- 28:43Speaker 2: user's credentials to the attacker server. Or they might inject
- 28:47Speaker 2: HTML that helps them steal session cookies, potentially leading to
- 28:51Speaker 2: a full cross site scripting EXSS attack if they can
- 28:54Speaker 2: also inject script tags.
- 28:56Speaker 1: So it's about manipulating what the user sees and potentially
- 28:59Speaker 1: setting them up for something worse. How is it usually
- 29:03Speaker 1: found and what's the defense.
- 29:04Speaker 2: You can often find it manually in test apps, like
- 29:07Speaker 2: maybe a stored blog page in bwapp. You try injecting
- 29:10Speaker 2: simple HTML tags like btestp or maybe a small image
- 29:13Speaker 2: tag and see if it actually renders on the page
- 29:16Speaker 2: when you view it later and prevention. Prevention comes down
- 29:19Speaker 2: to robust input sanitization. Again, any user supplied input that's
- 29:23Speaker 2: going to be displayed back on a page needs to
- 29:24Speaker 2: have potentially dangerous HTML characters properly escaped or stripped out
- 29:28Speaker 2: before it's rendered. Using libraries designed for this is key. Also,
- 29:32Speaker 2: implementing a strong content security policy or CSP is crucial.
- 29:36Speaker 1: What does CSP do here?
- 29:38Speaker 2: CSP tells the user's browser exactly what sources of content, scripts, images, styles, etc.
- 29:44Speaker 2: Are allowed to be loaded and executed for your website.
- 29:47Speaker 2: It can help mitigate the impact of injection attacks even
- 29:49Speaker 2: if some malicious HTML or script manages to get through
- 29:53Speaker 2: the initial sanitization right.
- 29:55Speaker 1: And finally, the big one SQL injection or sequel sort
- 30:00Speaker 1: of this, it sounds incredibly serious. What's the fundamental idea.
- 30:03Speaker 2: It is extremely serious. Sequel is a web security vulnerability
- 30:08Speaker 2: that allows an attacker to interfere with the database queries
- 30:10Speaker 2: that an application makes. Essentially, the attacker crafts malicious input that,
- 30:15Speaker 2: when included in a database query by the application, changes
- 30:19Speaker 2: the query's logic in a way the attacker controls.
- 30:21Speaker 1: You're basically talking directly to the database through the web
- 30:24Speaker 1: application in effect.
- 30:26Speaker 2: Yes, by manipulating the input, they trick the application into
- 30:29Speaker 2: sending malicious sequel commands to the database on their.
- 30:31Speaker 1: Behalf and potential impact If they succeed, what can they do? Oh?
- 30:35Speaker 2: The consequences are typically catastrophic. Attackers can potentially read sensitive
- 30:41Speaker 2: data from the database, the user credentials, personal information, credit
- 30:46Speaker 2: card numbers. They can modify or delete data. They can
- 30:49Speaker 2: often bypass authentication mechanisms entirely, maybe gaining administrative access to
- 30:54Speaker 2: the application.
- 30:55Speaker 1: Can it get worse than that?
- 30:57Speaker 2: Yes, Depending on the database configuration and permission, they might
- 31:00Speaker 2: even be able to execute operating system commands on the
- 31:03Speaker 2: database server itself, completely compromising the underlying infrastructure, or launch
- 31:08Speaker 2: denial of service attacks that bring down the database and
- 31:11Speaker 2: the application. It's a gateway to the Crown jewels usually Wow.
- 31:15Speaker 1: You mentioned bypassing authentication. Can you give an example of
- 31:17Speaker 1: how that works? It sounds almost too simple, It.
- 31:20Speaker 2: Often is surprisingly simple with basic vulnerabilities. Let's say you
- 31:23Speaker 2: have a log in form that takes a username in password.
- 31:26Speaker 2: A vulnerable application might build a SQL query like select
- 31:29Speaker 2: from users where a username improtucer and password.
- 31:33Speaker 1: Okay, standard log in query.
- 31:34Speaker 2: Now, an attacker might enter something like R one one
- 31:37Speaker 2: into the username field and maybe anything in the password field.
- 31:41Speaker 2: The application might then construct the query select from users
- 31:44Speaker 2: where username or one in password or whatever.
- 31:47Speaker 1: What does the R one one do?
- 31:49Speaker 2: Well? One one is always true, so the wear clause
- 31:51Speaker 2: becomes where username equal true. Since anything or true is
- 31:56Speaker 2: always true, the condition matches every row in the user's table.
- 32:00Speaker 2: The at the end is a comment signal and SQL
- 32:02Speaker 2: often making the database ignore the rest of the line,
- 32:05Speaker 2: including the password.
- 32:06Speaker 1: Check, so the query just returns all users exactly.
- 32:09Speaker 2: And often the application code will just log in the
- 32:12Speaker 2: first user returned by the query, which is frequently the
- 32:15Speaker 2: administrator account. Boom, They're logged in as admin without needing
- 32:18Speaker 2: a password. It's the digital equivalent of a skeleton key.
- 32:21Speaker 1: That's incredibly effective for such a simple input. Now, beyond
- 32:25Speaker 1: logging in, how do attackers use SQL to explore the
- 32:27Speaker 1: database and steal data? You mentioned a tool called school map.
- 32:31Speaker 2: Right once you've confirmed in SQL injection, point maybe using
- 32:34Speaker 2: burp suite to find where input affects the database. School
- 32:37Speaker 2: Map is the go to tool for automating the exploitation. It's
- 32:41Speaker 2: incredibly powerful and comes pre installed with Cali Linux.
- 32:44Speaker 1: How does it work? What can it do?
- 32:46Speaker 2: You can basically feed school Map a saved AGTTP request
- 32:49Speaker 2: from burpsuite that contains the vulnerable parameter using the alve flag.
- 32:54Speaker 2: Then you give it commands. It can automatically figure out
- 32:56Speaker 2: what type of database is on the back end my SQL,
- 32:59Speaker 2: Microsoft's server, Postgrescool, Oracle, et cetera, often by fingerprinting the
- 33:03Speaker 2: responses or grabbing the database.
- 33:06Speaker 1: Banner so it identifies a target first. Then what Then you.
- 33:09Speaker 2: Can tell it to list all the databases available you Wise,
- 33:12Speaker 2: once you pick a database of interest, say one name
- 33:15Speaker 2: Noah SIP, you can list all the tables within that
- 33:17Speaker 2: database no aspit tables and.
- 33:19Speaker 1: Find interesting tables like credit cards exactly.
- 33:22Speaker 2: Once you find an interesting table like credit cards, you
- 33:24Speaker 2: can list all the columns within that table dat d no,
- 33:27Speaker 2: ask betty t credit cards columns to see what kind
- 33:29Speaker 2: of data it holds, maybe CC number or CCVE expire date, and.
- 33:33Speaker 1: The final step getting the actual data yep.
- 33:37Speaker 2: The final step is to tell school map to dump
- 33:40Speaker 2: all the data from that specific table DATCHI knee no
- 33:43Speaker 2: OSC datchnee credit cards dump. It will then use various
- 33:48Speaker 2: SEQL injection techniques to extract every row and column from
- 33:51Speaker 2: that table and display it right there for you. It
- 33:54Speaker 2: automates what would be an incredibly tedious manual process potentially
- 33:58Speaker 2: revealing highly sensitive information. It's an ethical hacker's best friend
- 34:02Speaker 2: when it comes to exploring databases via seqel.
- 34:04Speaker 3: Wow, that is incredibly comprehensive, going from finding a small
- 34:08Speaker 3: flaw to potentially dumping the entire database. What an eye
- 34:12Speaker 3: opening journey through just some of these web vulnerabilities and
- 34:14Speaker 3: the tools used to find them. It really hammers home
- 34:17Speaker 3: how many potential cracks there can be in the digital
- 34:19Speaker 3: foundations we rely on constantly.
- 34:21Speaker 2: It truly is a dynamic field, isn't it. It's constantly
- 34:23Speaker 2: evolving the world of web security and bug bounty hunting specifically.
- 34:27Speaker 2: It just demands continuous learning. You have to keep up
- 34:29Speaker 2: with research adapt quickly. New threats, new vulnerability types, new
- 34:33Speaker 2: attack techniques emerge all the.
- 34:35Speaker 1: Time, so what worked yesterday might not be enough today exactly.
- 34:38Speaker 2: Success in this area really comes from well, a deep curiosity,
- 34:43Speaker 2: maybe even a bit of obsession, and definitely persistence in determination.
- 34:47Speaker 2: You have to be willing to dig deep and always
- 34:49Speaker 2: try to stay one step ahead.
- 34:50Speaker 1: So a final thought for our listeners, then, in this
- 34:53Speaker 1: world of ever evolving digital threats, how much do you
- 34:56Speaker 1: really know about the hidden weaknesses and the websites and
- 34:59Speaker 1: applications you interact with every single day?
- 35:03Speaker 2: And maybe what might that knowledge compel you to explore
- 35:05Speaker 2: next