Latest / CyberSecurity Summary / Web Hacking Arsenal: A Practical Guide to Modern Web Pentesting
Transcript
- 0:00Speaker 1: Welcome to the deep dive. You're here because you want
- 0:03Speaker 1: to understand the important stuff. Maybe you get those light
- 0:05Speaker 1: bulb moments, but without feeling like you're drowning in jargon.
- 0:09Speaker 2: Exactly.
- 0:09Speaker 1: Today we're tackling a subject that's well fascinating and also
- 0:13Speaker 1: increasingly vital, web haacking and penetration testing.
- 0:17Speaker 2: Think of it this way. We're going to explore how
- 0:20Speaker 2: the security of web applications gets tested, kind of like
- 0:24Speaker 2: understanding how a security consultant probes a building's defenses right.
- 0:29Speaker 1: Not to break in, but to find the weak spots
- 0:30Speaker 1: so they can actually be fixed precisely. And our guide
- 0:33Speaker 1: for this, our source material is Rafe Block and his
- 0:36Speaker 1: book Web Haackingarsenal dot pdf. Now this isn't just theory,
- 0:41Speaker 1: is it. Blog has real hands on experience.
- 0:44Speaker 2: He does real world security work, finding vulnerabilities, understanding the
- 0:48Speaker 2: threats that are actually out there right now. So the
- 0:50Speaker 2: book is a very practical look sort of under the
- 0:53Speaker 2: hood of web security. Okay, And what's really key to
- 0:56Speaker 2: grasp is that web security is always changing. I mean,
- 0:58Speaker 2: new vulnerabilities pop up constantly, attackers find new tricks.
- 1:02Speaker 1: Yeah, it never stands still not at all.
- 1:04Speaker 2: So Block's work gives us a valuable, pretty up to
- 1:07Speaker 2: date view on these challenges.
- 1:09Speaker 1: So our mission today really is to pull out the
- 1:12Speaker 1: essential ideas and techniques from Block's book. We want to
- 1:16Speaker 1: give you the listener a clearer picture of these vulnerabilities
- 1:19Speaker 1: and how security pros the ethical hackers actually find them. Yeah, okay,
- 1:24Speaker 1: let's get into it.
- 1:25Speaker 2: Let's do it. Let's maybe start with the absolute basics.
- 1:28Speaker 2: How does the web actually work? Block begins there explaining HTTP.
- 1:33Speaker 1: That's the foundation, right HGTP. You see it HTTP at
- 1:36Speaker 1: the start of web addresses. Now, one fundamental thing Block
- 1:40Speaker 1: points out is that HTTP is stateless. What does that
- 1:44Speaker 1: mean exactly?
- 1:45Speaker 2: Imagine you're talking to a waiter, but each time you speak,
- 1:48Speaker 2: it's like they've never met you before. The server doesn't
- 1:50Speaker 2: automatically remember your previous request.
- 1:52Speaker 1: Ah okay, so each request is independent.
- 1:55Speaker 2: Exactly, And because it's stateless, websites need a way to
- 1:57Speaker 2: keep track of you, right, Like when you log in.
- 1:59Speaker 2: That's where cookie. When you log in, the server sends
- 2:02Speaker 2: this tiny piece of data, the cookie, to your browser.
- 2:05Speaker 2: Your browser then sends it back with every request after that.
- 2:08Speaker 1: So the server knows, ah, it's still.
- 2:10Speaker 2: You exactly, it maintains that state.
- 2:13Speaker 1: Belloch also stresses though that standard HTTP isn't encrypted.
- 2:17Speaker 2: That's a huge point. It's like sending a postcard. Anyone
- 2:20Speaker 2: who intercepts it can potentially read it.
- 2:23Speaker 1: No ideal for logins or credit cards, definitely not.
- 2:26Speaker 2: That's why we have HTTPS. The S means secure. It
- 2:29Speaker 2: adds that layer of encryption, usually TLS or SSL, to
- 2:32Speaker 2: make the communication private.
- 2:34Speaker 1: Okay, so HTTP is the basic protocol, maybe insecure HDPS
- 2:39Speaker 1: adds the security layer. What about get, GETEE and post requests?
- 2:44Speaker 1: Block clarifies those.
- 2:45Speaker 2: Two right, So when you click a link or type
- 2:47Speaker 2: a URL, your browser usually sends a GETTT request. Any
- 2:51Speaker 2: extra bits of information like search terms often end up
- 2:54Speaker 2: right in the URL.
- 2:54Speaker 1: Itself visible in the address bar.
- 2:56Speaker 2: Yep visible, potentially saved in your history server logs that
- 3:00Speaker 2: can have privacy implications. Think about sharing a link that
- 3:03Speaker 2: has sensitive search terms in it.
- 3:05Speaker 1: Good point. You might share more than you intend. So
- 3:08Speaker 1: what's post Then?
- 3:09Speaker 2: PST sends data differently. It's in the background, in the
- 3:13Speaker 2: body of the request, not usually visible in the URL.
- 3:16Speaker 2: This is typically used for submitting forms, login details, comments,
- 3:21Speaker 2: that kind of thing.
- 3:21Speaker 1: Okay, So get shows parameters in the url PST hinds
- 3:26Speaker 1: them in the request body makes sense. Now, you mentioned
- 3:29Speaker 1: the tech behind websites is evolving beyond the classic LMP stack.
- 3:34Speaker 2: Yeah. Absolutely, the traditional L ANDP stack, Linux, Apache, Myseql, PHP,
- 3:39Speaker 2: it's still around, definitely, But Block points out the rise
- 3:43Speaker 2: of newer things like micro services, breaking.
- 3:45Speaker 1: Big applications into smaller.
- 3:47Speaker 2: Pieces exactly, and serverlest computing where you don't manage servers directly.
- 3:51Speaker 2: Plus different databases no suite types like Mango dB.
- 3:54Speaker 1: And these new technologies bring new security challenges.
- 3:57Speaker 2: They definitely change the landscape. Different potential weaknesses can emerge.
- 4:00Speaker 1: Okay, so we've got a basic picture of web communication.
- 4:03Speaker 1: Now how do people actually start looking for vulnerabilities?
- 4:05Speaker 2: You mentioned reconnaissance, right, intelligence gathering and enumeration. It's the
- 4:09Speaker 2: recon phase. Block really emphasizes how critical this is, especially.
- 4:13Speaker 1: You said in things like bug bounty programs where speed matters.
- 4:17Speaker 2: Absolutely, you need to map out the target thoroughly and quickly.
- 4:21Speaker 2: He breaks it down into active and passive subdomain enumeration.
- 4:25Speaker 1: Active versus passive. What's the difference there?
- 4:27Speaker 2: Active means you're directly probing the target, sending requests, trying
- 4:32Speaker 2: things out to see what subdomains exist.
- 4:34Speaker 1: Like knocking on doors kind of Yeah.
- 4:37Speaker 2: Passive is more about gathering info that's already out there,
- 4:40Speaker 2: publicly available without directly touching the target systems.
- 4:44Speaker 1: Like looking at public records or maps instead of knocking.
- 4:47Speaker 2: Precisely, and blog runs through a whole toolkit for this.
- 4:50Speaker 2: One of the first techniques is reverse IP lookup.
- 4:53Speaker 1: So you have the server's IP address, and.
- 4:55Speaker 2: This lookup tries to find all the domain names hosted
- 4:58Speaker 2: on that same server uncover hidden parts of an organization's
- 5:02Speaker 2: online footprint.
- 5:03Speaker 1: Interesting, okay, what else?
- 5:05Speaker 2: Port scanning yep n map is common, but Block mentions
- 5:09Speaker 2: masscans specifically for its speed. It rapidly checks which communication
- 5:13Speaker 2: ports are open on a.
- 5:14Speaker 1: Server, and open ports might mean running services.
- 5:18Speaker 2: Potentially vulnerable services. Yeah, things that might have been overlooked.
- 5:22Speaker 1: But an open port isn't always a web server.
- 5:24Speaker 2: Right, Good point. That's where a tool like httpx comes in.
- 5:28Speaker 2: Block explains it takes the open ports found by masscan,
- 5:30Speaker 2: for example, and checks which ones are actually running web
- 5:33Speaker 2: services HTTP or HTTPS.
- 5:36Speaker 1: Got it, So find open poorts quickly, then verify which
- 5:39Speaker 1: are web related? What about finding subdomains specifically?
- 5:43Speaker 2: He mentions shuffles. It uses big lists of common subdomain
- 5:47Speaker 2: names like blog shop dev and checks if they exist
- 5:50Speaker 2: for the target domain using various DNS servers.
- 5:53Speaker 1: Okay, trying common names, Yeah, makes sense.
- 5:56Speaker 2: Now here's where it gets really clever. I think passive
- 5:59Speaker 2: enumeration using showdown.
- 6:00Speaker 1: Showdown the search engine for Internet connected devices exactly.
- 6:04Speaker 2: Block explains how you can use the unique hash of
- 6:07Speaker 2: a website's fabcon.
- 6:08Speaker 1: The little icon in the browser tab that's the.
- 6:10Speaker 2: One it's unique identifier. It's hash can sometimes be used
- 6:14Speaker 2: to find other related subdomains that use the same icon.
- 6:17Speaker 1: Wow, like a digital fingerprint pretty much.
- 6:21Speaker 2: If two sites share that specific fabcon hash, it's a
- 6:25Speaker 2: decent clue they might be related. Block even shows how
- 6:28Speaker 2: to automate finding this with tools like CURL and Showdown's
- 6:31Speaker 2: own command line tool.
- 6:33Speaker 1: That's neat. What other passive methods?
- 6:35Speaker 2: Certificate transparency logs. These are public records of all SSLTLS
- 6:40Speaker 2: certificates issued. They list domain and subdomain names, so they're
- 6:43Speaker 2: a gold mine for passive discovery.
- 6:45Speaker 1: Ah Okay, and web archives like the Wayback Machine YEP.
- 6:49Speaker 2: Looking at historical versions of a site can reveal subdomains
- 6:52Speaker 2: that existed in the past, even if they're not live now,
- 6:55Speaker 2: sometimes they come back online or point to interesting things.
- 6:58Speaker 1: So digging through history and then there's a mass. You
- 7:01Speaker 1: said it's comprehensive.
- 7:02Speaker 2: Yeah, a mass pulls together a lot of techniques, both
- 7:05Speaker 2: active and passive. Block highlights its different modules, Intel for
- 7:09Speaker 2: gathering initial info and for the actual subdomain, searching, dB
- 7:13Speaker 2: for storing results.
- 7:15Speaker 1: VIZ for visualizing, and track right viz helps you see
- 7:18Speaker 1: the relationships, and track is great for monitoring changes over time.
- 7:21Speaker 1: Did a new subdomain appear? Did one disappear? Very useful?
- 7:25Speaker 1: What about finding hidden files or directories?
- 7:28Speaker 2: That's directory fuzzing tools like FFUF or deerbuster use wordless
- 7:33Speaker 2: lists of common directory and file names to guess paths
- 7:36Speaker 2: on the server.
- 7:37Speaker 1: Trying to find pages that aren't linked publicly exactly.
- 7:39Speaker 2: Maybe configuration files, old backups, adamin interfaces, things that could
- 7:44Speaker 2: hold sensitive info or vulnerabilities.
- 7:46Speaker 1: Okay, and you mentioned gaffer finding known URLs.
- 7:50Speaker 2: Yeah, gaff etches URLs for a domain from various public
- 7:53Speaker 2: sources like the Wayback Machine, Common crawl, etc. It's passive
- 7:57Speaker 2: gathering of known paths.
- 7:59Speaker 1: And JavaScript files. You said they can leak.
- 8:01Speaker 2: Info, Oh, definitely. Block stresses looking inside JavaScript developers sometimes
- 8:06Speaker 2: accidentally leave comments, internal API en points, maybe even secret
- 8:10Speaker 2: keys or subdomain names in the code. He uses a
- 8:13Speaker 2: PayPal example to show how this can happen.
- 8:15Speaker 1: Wow, just hiding in plain sight in the code.
- 8:17Speaker 2: Sometimes Yeah, then there's crawling or spidering. Tools like gospeitter
- 8:21Speaker 2: automatically follow links on a website to map out its structure.
- 8:24Speaker 1: Building a site map automatically.
- 8:26Speaker 2: Right and Bolock notes gospitter is good at parsing JavaScript too,
- 8:30Speaker 2: and even finding things like AWSS three buckets mentioned in the.
- 8:33Speaker 1: Code, which brings us to cloud stuff s three.
- 8:36Speaker 2: Buckets, Yeah, Amazon s three storage buckets. Block discusses how
- 8:41Speaker 2: misconfigured cloud storage is a common problem. If a bucket
- 8:45Speaker 2: is accidentally made public, it can expose huge amounts of data.
- 8:49Speaker 2: He points to resources like buckets dot grayhtwarfare dot com
- 8:53Speaker 2: for finding these leaky buckets across different cloud providers.
- 8:56Speaker 1: Okay, so that's the recon A lot goes into just
- 8:58Speaker 1: mapping things out. Now, what weaknesses are they actually looking
- 9:02Speaker 1: for once they have this map? Server side injection attacks.
- 9:05Speaker 2: Right, These are really serious because they let an attacker
- 9:08Speaker 2: inject code that runs on the web server itself. SQL
- 9:11Speaker 2: injection is the classic example.
- 9:12Speaker 1: SQL injection heard of. It seems bad. How does it work?
- 9:16Speaker 2: Basically, you inject malicious SQL database commands into input fields,
- 9:20Speaker 2: search boxes, log informs, even URL parameter. Sometimes, if the
- 9:24Speaker 2: application doesn't clean that input properly, the database might run
- 9:27Speaker 2: your malicious command.
- 9:28Speaker 1: And that lets you do what steal data.
- 9:30Speaker 2: Steal data, modify data, sometimes even take control of the database.
- 9:34Speaker 2: Server block covers different ways to exploit it. Error based,
- 9:38Speaker 2: where you cause errors that leak info, boolean base asking
- 9:41Speaker 2: true false questions, time based, making the database pause to infer.
- 9:46Speaker 1: Things clever, and tools like sql map help automate this massively.
- 9:50Speaker 2: Sql map is a powerful tool for finding and exploiting
- 9:53Speaker 2: sqal injection. Block also mentions an interesting angle SQL injection
- 9:57Speaker 2: via jawts JWTs.
- 10:00Speaker 1: Yeah, those json web tokens for sessions. Yeah.
- 10:02Speaker 2: Sometimes if the application decodes a GENWT and uses a
- 10:05Speaker 2: value from it directly in a database query without proper checks,
- 10:08Speaker 2: you could inject SQL through the jatabt payload.
- 10:11Speaker 1: Wow. Okay, And it's not just secle databases right no.
- 10:13Speaker 2: Sql right Block covers no seqal injection too, using Mango
- 10:17Speaker 2: dB as an example. You can use special operators like
- 10:19Speaker 2: two dollars for greater than in your input to trick
- 10:22Speaker 2: the database logic, maybe bypass a log.
- 10:24Speaker 1: In okay, beyond databases. Command injection.
- 10:27Speaker 2: This is injecting operating system commands if an application takes
- 10:31Speaker 2: user input and passes it directly to a system function.
- 10:34Speaker 1: Like exec like in no JS you mentioned.
- 10:36Speaker 2: Yeah, no JS exec is a common example if that
- 10:39Speaker 2: input isn't sanitized and to tacker could run commands directly
- 10:42Speaker 2: on the server's operating system. Block even quotes the official
- 10:46Speaker 2: no JS stocks warning against this.
- 10:48Speaker 1: That sounds really dangerous full server takeover.
- 10:51Speaker 2: Potential potentially Yes. Then there's SSTI server side.
- 10:55Speaker 1: Template injection gumplet injection.
- 10:57Speaker 2: Web frameworks often use template engines to generate HTML dynamically.
- 11:02Speaker 2: Think of placeholders filled with data. If an attacker can
- 11:05Speaker 2: inject template syntax itself.
- 11:07Speaker 1: Like the special characters the template engine.
- 11:09Speaker 2: Uses exactly, they might be able to escape the intended
- 11:12Speaker 2: context and run code. Block gives examples for ginga TOO
- 11:15Speaker 2: and MECO templates showing how you can achieve remote code
- 11:18Speaker 2: execution RCE.
- 11:20Speaker 1: RCE again seems like the ultimate goal.
- 11:23Speaker 2: Often it's definitely a high impact finding.
- 11:25Speaker 1: Okay, so those are server side. What about attacks that
- 11:27Speaker 1: happened in my browser? Cross site SCRIPTINGXSS. Right.
- 11:30Speaker 2: XSS is about injecting malicious client side scripts, usually JavaScript,
- 11:34Speaker 2: into a web page, which then gets executed by other
- 11:37Speaker 2: users browsers, so.
- 11:38Speaker 1: The bad code runs in the victims browser, not the server.
- 11:41Speaker 2: Correct block explains DOM based XSS, where the vulnerability lies
- 11:46Speaker 2: in the page's own JavaScript code rather than the server code.
- 11:49Speaker 2: He talked about sources where malicious data comes from, like
- 11:52Speaker 2: the URL and syncs where that data is used on
- 11:55Speaker 2: safely causing script execution.
- 11:57Speaker 1: Okay, sources and sinks in the browser's dom.
- 12:00Speaker 2: He also touches on client side template injections similar to SSTI,
- 12:03Speaker 2: but happening in JavaScript frameworks in the browser, and he
- 12:06Speaker 2: details XSS risks in frameworks like Angular JS and React JS.
- 12:11Speaker 1: Seems like XSS can pop up in unexpected places too.
- 12:14Speaker 2: File uploads, yeah, block mentions uploading files like SVG scalable
- 12:18Speaker 2: vector graphics. They look like images, but they're XML based
- 12:21Speaker 2: and can contain executable script content or even hiding scripts
- 12:25Speaker 2: and image metadata.
- 12:27Speaker 1: Sneaky and what can attackers do with EXSS?
- 12:30Speaker 2: A lot? Unfortunately, steal session cookies to hijack accounts, readerupt
- 12:33Speaker 2: users to fit login pages, phishing, capture keystrokes.
- 12:36Speaker 1: To pretty serious consequences. Are their defenses.
- 12:39Speaker 2: CSP Content Security policy. Yes, CSP is a browser mechanism
- 12:43Speaker 2: to control what resources, scripts, styles, etc. Page is allowed
- 12:46Speaker 2: to load. It's a major.
- 12:47Speaker 1: Defense, but attackers try to bypass it.
- 12:50Speaker 2: Always block lists, common bypasses, exploiting unsafe inline or unsafe
- 12:55Speaker 2: evil directives, finding vulnerable third party end points allowed by
- 12:59Speaker 2: the CSP, using data ris if allowed XSS via JavaScript
- 13:03Speaker 2: file uploads again, even exploiting browser bugs. Sometimes it's a
- 13:07Speaker 2: cat and mouse game.
- 13:08Speaker 1: He also mentions the same Origin policy SOP.
- 13:10Speaker 2: SOP is fundamental. It stops scripts from one website accessing
- 13:14Speaker 2: data or properties of another website a different origin, but
- 13:18Speaker 2: block notes ways. It can sometimes be relapsed or bypassed,
- 13:21Speaker 2: like using document dot domain.
- 13:23Speaker 1: Okay, now this next one sounds really interesting dom clobbering.
- 13:26Speaker 2: Yeah, this is clever. You use HTML elements, specifically their
- 13:30Speaker 2: ID or name attributes, to create global JavaScript variables on
- 13:33Speaker 2: the page that can overwrite existing legitimate variables or functions.
- 13:36Speaker 1: How does that work?
- 13:37Speaker 2: If you have an element like input eyed some variable
- 13:40Speaker 2: and some browsers window dot some variable might now refer
- 13:43Speaker 2: to that input element. Attackers use this to break security
- 13:46Speaker 2: checks or manipulate page logic Block gives examples of bypassing
- 13:50Speaker 2: filters or even changing document dot cookie.
- 13:53Speaker 1: Wow overwriting variables with HTML tags and mutation.
- 13:58Speaker 2: XSS MXSS is another advanced one. It happens when the
- 14:02Speaker 2: browser tries to fix broken or weird HTML, and in
- 14:05Speaker 2: the process of mutating it accidentally creates an EXSS vulnerability
- 14:09Speaker 2: that wasn't in the original markup. He mentions Mozilla's Bleach
- 14:13Speaker 2: library for sanitizing HTML to prevent this.
- 14:15Speaker 1: Okay, lots of ways to attack the client side. What
- 14:18Speaker 1: about CSRF Cross site request forgery.
- 14:21Speaker 2: CSRF tricks your logged in browser into sending a request
- 14:24Speaker 2: to a website you're authenticated to, but without your intention,
- 14:27Speaker 2: like making you unknowingly change your email address or transfer funds.
- 14:31Speaker 1: How did that happen?
- 14:32Speaker 2: An attacker might embed a hidden image, tag or form
- 14:35Speaker 2: on a malicious site or in an email that points
- 14:37Speaker 2: to an action you arel on the target site. When
- 14:39Speaker 2: your browser loads it, it automatically includes your cookies, making the
- 14:42Speaker 2: request seem legitimate.
- 14:44Speaker 1: Yikes, so the site thinks I wanted to do that
- 14:46Speaker 1: action exactly.
- 14:47Speaker 2: Bollock mentions tools like oh ask, ZAPPP which can help
- 14:50Speaker 2: generate proof of concepts CSRF attacks for testing.
- 14:53Speaker 1: Are the defenses tokens.
- 14:55Speaker 2: Yes, the main defense is using unpredictable unique tokens. For
- 14:58Speaker 2: each session or request, the server checks for this token
- 15:02Speaker 2: to ensure the request was intentionally initiated by the user
- 15:06Speaker 2: on the site itself.
- 15:07Speaker 1: But attackers try to bypass these tokens too.
- 15:09Speaker 2: He do maybe by exploiting how the site checks the
- 15:12Speaker 2: referra or origin headers, or if token validation is inconsistent.
- 15:16Speaker 2: Block also discusses the same site cookie attribute another defense layer,
- 15:21Speaker 2: in ways it might be bypassed, perhaps through XSS or
- 15:24Speaker 2: clever subdomain tricks.
- 15:25Speaker 1: Okay, let's move to attacking the file system itself directory traversal.
- 15:30Speaker 2: This is about accessing files outside of the intended web
- 15:33Speaker 2: route directory by manipulating filepaths, often using sequences.
- 15:38Speaker 1: The go up one directory command right.
- 15:40Speaker 2: An attacker might try to read sensitive files like EXCTA
- 15:42Speaker 2: pass on Linux or configuration files. Block mentions using curl
- 15:46Speaker 2: path as is to make sure the debt isn't normalized
- 15:49Speaker 2: away by the tool itself and it's much worse if
- 15:52Speaker 2: the web app runs with high privileges.
- 15:53Speaker 1: Okay, reading files, what about creating files?
- 15:56Speaker 2: Arbitrary file creation? If a vulnerability allows an attack to
- 16:00Speaker 2: specify the name and content of a file that gets
- 16:02Speaker 2: saved on the server, that's really bad. They could write
- 16:05Speaker 2: webshells or other malicious code.
- 16:07Speaker 1: And local file inclusion LFI.
- 16:09Speaker 2: LiFi is similar to traversal, but instead of just reading
- 16:12Speaker 2: a file, the attacker tricks the application into including and
- 16:15Speaker 2: potentially executing a local files content block uses PHP's read
- 16:20Speaker 2: file function as an example, but include a require functions
- 16:23Speaker 2: can sometimes lead to code execution too.
- 16:25Speaker 1: Okay, filesystem access is clearly bad. What about file uploads?
- 16:29Speaker 1: We touched on SPGs, but are there other risks?
- 16:32Speaker 2: Huge risks. Applications often try to restrict uploads to certain
- 16:35Speaker 2: file types like images only, but attackers try to bypass
- 16:38Speaker 2: these checks by manipulating the mie type reported by the
- 16:42Speaker 2: browser or the magic bytes, the first few bytes that
- 16:45Speaker 2: identify a file type. The block gives a great example
- 16:48Speaker 2: embedding PHP code into an image's metadata using exit tool.
- 16:52Speaker 1: So if file looks like a normal jpeg, passes.
- 16:54Speaker 2: The checks exactly, but if the attacker can later get
- 16:57Speaker 2: the server to execute that file somehow, maybe through a
- 17:00Speaker 2: LFI vulnerability, or if the server misconfigures how it handles
- 17:03Speaker 2: certain image types, the embedded PHP code.
- 17:06Speaker 1: Runs GOTE execution via image upload clever. Okay, let's switch
- 17:11Speaker 1: to authentication and authorization.
- 17:13Speaker 2: Big area, absolutely critical. Authentication is who are you? Authorization
- 17:18Speaker 2: is what are you allowed to do?
- 17:20Speaker 1: So? Authentication attacks first username enumeration, trying.
- 17:23Speaker 2: To figure out valid usernames. Sometimes applications give slightly different
- 17:27Speaker 2: error messages for user not found versus wrong password, or
- 17:31Speaker 2: maybe the response time is subtly different. Attackers use these clues.
- 17:34Speaker 1: Okay, then brute force and dictionary.
- 17:36Speaker 2: Attacks just trying lots of passwords against known or guest usernames.
- 17:40Speaker 2: Block mentions using tools like wifas, especially against things like
- 17:44Speaker 2: HTTP basic authentication pop.
- 17:46Speaker 1: Up boxes, and bypassing log informs like using PUT instead
- 17:50Speaker 1: of PSD.
- 17:51Speaker 2: Yeah, sometimes developers only protect against the expected post request,
- 17:55Speaker 2: leaving other HTTP methods like put potentially vulnerable to bypass
- 18:00Speaker 2: log in checks. He also mentions attacking account lockout policies,
- 18:03Speaker 2: trying to bypass them or maybe even use them to
- 18:06Speaker 2: lock out legitimate users.
- 18:08Speaker 1: And kpchas those prove your human.
- 18:10Speaker 2: Tests they can sometimes be beaten. A lock provides a
- 18:13Speaker 2: whole process using ocr optical character recognition with Tesseract. He
- 18:18Speaker 2: shows how to use Selenium to automate grabbing the keytcch
- 18:22Speaker 2: image and feeding it to Tesseract to read the characters.
- 18:25Speaker 1: So automating the kptchase solving. Wow. What about password resets?
- 18:30Speaker 2: Abusing forgot password functionality is common? Maybe the reset tokens
- 18:34Speaker 2: sent via email are predictable or password reset link poisoning
- 18:37Speaker 2: tricking the application into generating a reset link that points
- 18:40Speaker 2: to an attacker controlled server by manipulating the host header
- 18:43Speaker 2: in the request.
- 18:44Speaker 1: Okay, so lots of ways to attack the login process.
- 18:46Speaker 1: What about after log in authorization attacks?
- 18:48Speaker 2: This is about doing things you shouldn't be allowed to do.
- 18:51Speaker 2: Privileged escalation is the big one. A normal user gaining
- 18:54Speaker 2: admin power is due to weak access controls.
- 18:56Speaker 1: Or idoor insecure direct object.
- 18:58Speaker 2: References right where you can act as someone else's data
- 19:01Speaker 2: just by changing an ID number in the URL like
- 19:03Speaker 2: viewprofile dot PHP, dot user AD one two three to
- 19:06Speaker 2: user AD one to four. Also general web parameter tampering,
- 19:10Speaker 2: changing hidden form fields or other parameters to gain advantages.
- 19:13Speaker 1: You mentioned attacking JWTs earlier with c clay, but other
- 19:17Speaker 1: attacks too.
- 19:17Speaker 2: Yes, trying to crack the secret key used to sign
- 19:20Speaker 2: the JWT using tools like hashcat or the alg none attack,
- 19:25Speaker 2: changing the algorithm header to none and removing the signature,
- 19:29Speaker 2: hoping the server blindly trusts the payload if it sees none.
- 19:32Speaker 1: This seems like a bad oversight.
- 19:33Speaker 2: If that works, it definitely is. He also covers attacking
- 19:36Speaker 2: o F two point zero, often used for login with
- 19:38Speaker 2: Google Facebook. Attackers might try to steal access tokens by
- 19:42Speaker 2: manipulating the redirectory parameter to send the token to their
- 19:45Speaker 2: own site.
- 19:45Speaker 1: Okay and salmonel another login standard.
- 19:49Speaker 2: Similar issues tampering with the samuel response sent from the
- 19:52Speaker 2: identity provider back to the application, or signature exclusion attacks
- 19:56Speaker 2: similar to the JWT nun attack.
- 19:58Speaker 1: What about multi factor authentication MFA.
- 20:00Speaker 2: Can sometimes be bypassed, maybe the one time password OTP
- 20:04Speaker 2: system doesn't have rate limiting, allowing an attacker to quickly
- 20:07Speaker 2: brute force the code. And webcache deception is another interesting one,
- 20:12Speaker 2: tricking a webcache like a CDN into storing a sensitive
- 20:16Speaker 2: user specific page under a generic URL. The next user
- 20:20Speaker 2: who requests that generic URL gets served the previous user's
- 20:23Speaker 2: sensitive page from the cash ouch.
- 20:26Speaker 1: Okay, moving into a release specific area. Business logic flaws.
- 20:30Speaker 2: Yeah, these aren't standard technical bugs like SQL or XSS.
- 20:34Speaker 2: Their flaws in the application's intended logic how it's supposed
- 20:37Speaker 2: to work, but in a way that can be abused.
- 20:40Speaker 1: Examples the blow.
- 20:41Speaker 2: Gives several, maybe reusing a session id to manipulate a
- 20:44Speaker 2: digital wallet balance, or finding ways to duplicate transactions, exploiting
- 20:49Speaker 2: badly designed validation rules like getting infinite bonuses from a
- 20:52Speaker 2: self referral program.
- 20:53Speaker 1: So gaming this system's own rules exactly.
- 20:56Speaker 2: Or exploiting top up features to steal other user's balances
- 21:00Speaker 2: bypassing credit limits, changing shopping card items or prices, improperly
- 21:03Speaker 2: getting around loan amount restrictions, finding ways to get unlimited
- 21:07Speaker 2: wallet balances.
- 21:08Speaker 1: Again, it seems wallet balances are a recurring theme.
- 21:11Speaker 2: Money is always a target. He also covers race conditions.
- 21:14Speaker 1: Race conditions we're timing matters right.
- 21:16Speaker 2: When the outcome depends on the sequence or timing of
- 21:18Speaker 2: multiple threads or processes, for example, adding multiple items to
- 21:23Speaker 2: a cart simultaneously to exploit a pricing calculation bug, or
- 21:26Speaker 2: abusing an invitation system by sending multiple requests at once.
- 21:30Speaker 2: The lock even includes a Python script to help test
- 21:33Speaker 2: for these.
- 21:34Speaker 1: Okay, very application specific flaws. Next up, xx SSRF and
- 21:39Speaker 1: request smuggling.
- 21:40Speaker 2: Three more heavy hitters. XXSE is XML external.
- 21:44Speaker 1: Entity injection XML data processing. Right.
- 21:47Speaker 2: If an application parses XML input from users and allows
- 21:50Speaker 2: external entities, an attacker can define an entity that points
- 21:52Speaker 2: to a local file on the server like etc exps route.
- 21:56Speaker 2: When the XML parser resolves this entity, it reads the file.
- 22:00Speaker 1: So reading server files via XML can lead.
- 22:02Speaker 2: To RCE, sometimes yes, depending on the parser and server configuration.
- 22:06Speaker 1: SSRF server side request forgery.
- 22:08Speaker 2: This is where you trick the server into making requests
- 22:11Speaker 2: on your behalf. The vulnerable application makes a request to
- 22:14Speaker 2: an internal service within the network, or even an external
- 22:17Speaker 2: site that the attacker couldn't reach directly.
- 22:19Speaker 1: Why is that bad?
- 22:20Speaker 2: You can scan internal networks, access internal admin panels, or
- 22:24Speaker 2: even chain it with other vulnerabilities. Bulock gives an example
- 22:28Speaker 2: of using SSRF to talk to an internal REDTIS service
- 22:30Speaker 2: and gain RCE. He includes a Python payload script for that.
- 22:35Speaker 1: Okay, making the server attack itself or its neighbors and
- 22:39Speaker 1: request smuggling.
- 22:40Speaker 2: This one's complex. It exploits inconsistencies in how different servers
- 22:44Speaker 2: like a front end proxy and a back end application
- 22:47Speaker 2: server interpret HTTP request boundaries, especially with content length and
- 22:51Speaker 2: transfer encoding headers. It allows attackers to smuggle a second
- 22:55Speaker 2: malicious request hidden inside a seemingly normal one.
- 22:58Speaker 1: Tricky stuff. How about insecure de serialization.
- 23:01Speaker 2: This happens when an application takes serialized data data converted
- 23:05Speaker 2: into a format for storage or transmission, and converts it
- 23:08Speaker 2: back into an object in memory without proper safety checks.
- 23:11Speaker 1: Serialized data from where user input often yeah, or.
- 23:16Speaker 2: From cookies parameters. If an attacker controls that serialized data,
- 23:21Speaker 2: they can potentially craft malicious objects that execute code when
- 23:24Speaker 2: they're de serialized. Example, a Lock dives deep into PHP
- 23:28Speaker 2: object injection, explaining serialize and unserialized and PHP's magic methods
- 23:33Speaker 2: that run automatically during object creation or destruction. He gives
- 23:37Speaker 2: a file creator class example and mentions a real sugar
- 23:40Speaker 2: CRM vulnerability.
- 23:41Speaker 1: No get Php. What about other languages?
- 23:43Speaker 2: He briefly covers dot Net, mentioning binary formatter and ASP,
- 23:47Speaker 2: dot Net view state, and tools like whyso serial and
- 23:50Speaker 2: blacklist three and Java insecurity serialization Java do big time.
- 23:55Speaker 2: He explains Java's read object and write object, the concept
- 23:58Speaker 2: of gadget chains, sequences of classes that can be abused
- 24:01Speaker 2: during the serialization, libraries like Apache Commons collections that often
- 24:04Speaker 2: contain useful gadgets, and again the y serial tool for
- 24:07Speaker 2: generating payloads.
- 24:09Speaker 1: So de serializing untrusted data is dangerous across.
- 24:12Speaker 2: Languages, very dangerous. Always validate or avoid it if possible.
- 24:15Speaker 1: Okay. Let's pivot to testing specific types of services, web
- 24:19Speaker 1: services and cloud services.
- 24:21Speaker 2: Right Block covers SOAP first, simple object access protocol, older style.
- 24:26Speaker 1: Web service REXML based right YEP.
- 24:29Speaker 2: Envelope header body structure. He talks about finding the WSDL
- 24:33Speaker 2: file which describes the service and potentially invoking hidden methods
- 24:36Speaker 2: not listed in the WSDL and.
- 24:38Speaker 1: Rest APIs more common now.
- 24:40Speaker 2: Much more common, representational state transfer, more of an architectural
- 24:45Speaker 2: style than a strict protocol. Block discusses finding endpoints using
- 24:49Speaker 2: tools and looking for common descriptor files like swagger, dot
- 24:52Speaker 2: json or open api specs.
- 24:55Speaker 1: GRAPHQL. The query language for.
- 24:57Speaker 2: APIs yeah, graph cuil is different again, usually just a
- 24:59Speaker 2: single graphere endpoint where you send queries. He mentions tools
- 25:02Speaker 2: like all tear for crafting queries and the importance of
- 25:04Speaker 2: introspection queries which ask the API to describe its own
- 25:07Speaker 2: structure or schema.
- 25:08Speaker 1: Okay, and serverless functions as a service.
- 25:11Speaker 2: Like AWS lambda or azure functions. Block explains key features,
- 25:15Speaker 2: ATI Gateway's routing, requests, the event driven nature, cost savings.
- 25:19Speaker 2: He gives a no JS lambda example and then shows
- 25:21Speaker 2: a vulnerable one that accidentally exposes AWS credential ouch.
- 25:25Speaker 1: Can they have standard vulnerabilities too?
- 25:27Speaker 2: Absolutely? He highlights command injection in serverleist functions using OOS
- 25:31Speaker 2: serveralist code as a learning resource. Just because it's serveralist
- 25:34Speaker 2: doesn't mean it's automatically secure.
- 25:36Speaker 1: Good point. Now, what about newer HTML five features? Do
- 25:39Speaker 1: they introduce risks?
- 25:40Speaker 2: They can? Yeah? The block covers cores, cross origin resource sharing,
- 25:45Speaker 2: misconfiguring cores headers can weaken the same origin policy, potentially
- 25:49Speaker 2: enabling attacks like DOMXSS.
- 25:51Speaker 1: Okay. Web storage global storage session.
- 25:54Speaker 2: Storage convenient for storing data in the browser, but risky
- 25:57Speaker 2: if you store sensitive info there. Unlike cookies, there's no
- 26:01Speaker 2: built in HTTP only flag, so if an attacker gets EXSS,
- 26:04Speaker 2: they can easily read anything in web storage, potentially stealing
- 26:07Speaker 2: session data stored there.
- 26:08Speaker 1: Index DP the browser database.
- 26:10Speaker 2: Similar risks it's a client side database. If an attacker
- 26:13Speaker 2: can inject malicious data into it, maybe via EXSS, and
- 26:16Speaker 2: that data is later read and used unsafely by the application,
- 26:19Speaker 2: it can lead to stored DOM EXSS or second order EXSS.
- 26:23Speaker 1: Web messaging post message.
- 26:24Speaker 2: Use for communication between different windows or frames. The key
- 26:28Speaker 2: vulnerability here is failing to validate the origin of the
- 26:31Speaker 2: message center. If you accept messages from anywhere, an attacker's
- 26:35Speaker 2: malicious page could send messages to your app, potentially triggering
- 26:39Speaker 2: DOM EXSS web workers for background JavaScript they run scripts
- 26:44Speaker 2: in the background. Baylock notes potential for denial of service
- 26:48Speaker 2: don DOM by spawning too many workers or even using
- 26:51Speaker 2: them for distributed tasks like password cracking, offloading work to
- 26:54Speaker 2: the user's.
- 26:55Speaker 1: Browser, and clickjacking.
- 26:56Speaker 2: That's tricking a user into clicking something they didn't intend to,
- 27:00Speaker 2: often by loading the target site in a transparent iframe
- 27:02Speaker 2: overlaid on top of something else. Defenses include the x
- 27:06Speaker 2: frame options header or the frame ancestors directive. In csp
- 27:09Speaker 2: UI redressing is a similar concept.
- 27:11Speaker 1: Okay, a lot of potential pitfalls with HTML five now
- 27:14Speaker 1: Web application firewalls low BFS. They're meant to stop attacks.
- 27:18Speaker 2: Right they are dallyfs sit in front of web apps
- 27:21Speaker 2: and try to filter out malicious requests based on known
- 27:23Speaker 2: patterns for attacks like cqixss, etc.
- 27:26Speaker 1: But pentesters need to get around them first.
- 27:29Speaker 2: You try to figure out which WF is being used, fingerprinting,
- 27:33Speaker 2: block mentions, looking at HTTP headers, cookie values, specific cookie
- 27:37Speaker 2: set by products like Citrix, NetScaler or Barracuda.
- 27:40Speaker 1: Okay, identify the enemy then bypass it. He gives lots
- 27:43Speaker 1: of exss bypass examples a ton.
- 27:45Speaker 2: It shows how complex evasion can be. Things like changing
- 27:50Speaker 2: character case script instead of script, injecting white space or
- 27:54Speaker 2: comments using alternative tags like SVG or iframe, src doc,
- 27:59Speaker 2: different event hands form action on input on drag using
- 28:03Speaker 2: data urs wow using lesser known event handlers, manipulating the
- 28:07Speaker 2: location object in JavaScript, unicode separators, various encoding or obfustation tricks,
- 28:13Speaker 2: using alternative execution sinks like set time out or set
- 28:16Speaker 2: interval or the function constructor instead of direct script tags.
- 28:19Speaker 2: It's an arms race.
- 28:20Speaker 1: Definitely sounds like it. Finally, after finding all these vulnerabilities,
- 28:23Speaker 1: you have to report them right.
- 28:25Speaker 2: Report writing absolutely crucial. A finding is useless if you
- 28:28Speaker 2: can't communicate it effectively. Block stress is understanding your audience.
- 28:32Speaker 2: Are you writing for technical staff who need details or
- 28:34Speaker 2: executives who need the business impact?
- 28:36Speaker 1: So tailor the report. What are the key parts?
- 28:38Speaker 2: An executive summary, high level business language, a finding summary,
- 28:43Speaker 2: maybe a historical comparison if it's a repeat test. The
- 28:46Speaker 2: methodology used a narrative of the testing risk assessment CBSS scores,
- 28:52Speaker 2: but also considering business context, maybe a risk matrix.
- 28:55Speaker 1: And the technical details, yes.
- 28:56Speaker 2: The detailed technical report. Each finding needs clear, evident steps
- 29:00Speaker 2: to reproduce it and recommendations for fixing it. He also
- 29:03Speaker 2: mentions organizing the report logically and tools that can help
- 29:07Speaker 2: like Dratus, attack Forge or even using AI like chat
- 29:10Speaker 2: GPT to assist with drafting.
- 29:12Speaker 1: Any final tips on writing good reports clearly convey the impact.
- 29:16Speaker 2: Why should the business care about this vulnerability? Use real
- 29:19Speaker 2: world examples if possible, make it easy for them to
- 29:22Speaker 2: understand the risk and prioritize fixes.
- 29:24Speaker 1: Okay, that was a lot a comprehensive tour.
- 29:27Speaker 2: It really covers the breadth of modern web haacking. We've
- 29:29Speaker 2: gone from the basics of HTP through detailed recon server
- 29:33Speaker 2: side flaws like SEQY and SSTI, client side like EXSS and.
- 29:37Speaker 1: CSRF filesystem attacks, off issues, business logic flaws xx E,
- 29:42Speaker 1: SSRF de serialization, attacking APIs and serverlests.
- 29:46Speaker 2: HTML five issues, WAF bypasses, and finally reporting. It really
- 29:52Speaker 2: shows the multiple layers.
- 29:53Speaker 1: Involved and this is all drawn from that real world
- 29:56Speaker 1: perspective in rafe blotch web haacking arsenal. It's a look
- 30:01Speaker 1: at how the pros actually do it.
- 30:03Speaker 2: Absolutely, it highlights the practical techniques used to find weaknesses
- 30:07Speaker 2: and the applications we all rely on.
- 30:09Speaker 1: Which leads to maybe a final thought for you listening.
- 30:12Speaker 1: Given everything we've just discussed all these different types of vulnerabilities.
- 30:15Speaker 2: It's worth thinking about how these often invisible weaknesses might
- 30:19Speaker 2: be impacting the security and privacy of the websites and
- 30:21Speaker 2: apps you use every single day.
- 30:23Speaker 1: Yeah, security is this constant background process, this layer we
- 30:27Speaker 1: don't usually see, but it has potential failure points everywhere.
- 30:31Speaker 2: It really demands constant vigilance from developers and testers.
- 30:34Speaker 1: We definitely encourage you to explore these topics more if
- 30:36Speaker 1: you're interested, maybe even check out Block's book for the
- 30:39Speaker 1: full deep details. Web security is always.
- 30:42Speaker 2: Evolving, Continuous learning is essential in this field.
- 30:45Speaker 1: Well, thanks for taking this deep dive with US today