Latest / CyberCode Academy / Course 3 - Mastering Nuclei for Bug Bounty | Episode 6: Nuclei Fuzzing Techniques: Cluster Bomb, Pitchfork, and Battering Ram
Transcript
- 0:00Speaker 1: You know, the moment a news service or piece of
- 0:02Speaker 1: software goes online, the clock just starts ticking.
- 0:05Speaker 2: It absolutely does.
- 0:07Speaker 1: Someone some more is trying to find its weakest link.
- 0:10Speaker 1: We're talking about those critical security misconfigurations.
- 0:14Speaker 2: The fault usernames and passwords, yeah, or maybe some fuzzed
- 0:17Speaker 2: URL endpoint that a developer just forgot about.
- 0:20Speaker 1: Exactly. And for this deep dive, we're looking at structured
- 0:23Speaker 1: security testing, so not just brute force, but the more
- 0:28Speaker 1: calculated kind of.
- 0:29Speaker 2: Automation, right, something designed to find these flaws.
- 0:32Speaker 1: Fast and without you know, setting off all the alarms precisely.
- 0:35Speaker 2: I mean, when you have thousands of targets or even
- 0:38Speaker 2: one target with just hundreds of combinations to check, doing
- 0:41Speaker 2: it by hand is well, it's a recipe for failure.
- 0:45Speaker 1: And forgetting caught exactly.
- 0:47Speaker 2: The real trick here is that when basic defenses block
- 0:50Speaker 2: those massive, noisy brute force attempts, you can use these
- 0:53Speaker 2: structured template based.
- 0:55Speaker 1: Attacks to kind of fly under the radar.
- 0:57Speaker 2: By testing very specific non re combinations and doing it really,
- 1:02Speaker 2: really efficiently.
- 1:03Speaker 1: So we're basically building a precision instrument here, not a sledgehammer.
- 1:07Speaker 2: That's a great way to put it, and to do that,
- 1:09Speaker 2: you need a blueprint for the attack.
- 1:10Speaker 1: This is where the templates come in.
- 1:12Speaker 2: Correct. We use these templates to define exactly what word
- 1:14Speaker 2: lists to use and where in the HTTP request to
- 1:20Speaker 2: insert them, and the most important part, crucially the attack
- 1:23Speaker 2: type that defines how those lists interact with each other.
- 1:27Speaker 2: Do they combine exhaustively, do they match up one to.
- 1:30Speaker 1: One or do we maybe fix one variable and just
- 1:32Speaker 1: cycle through the other.
- 1:33Speaker 2: All of the above.
- 1:34Speaker 1: We have three powerful fuzzing strategies to look at today,
- 1:38Speaker 1: and each one is a different choice between what speed
- 1:41Speaker 1: versus certainty I'd see. So, yeah, okay, let's unpack this.
- 1:45Speaker 1: We're focusing on cluster bomb, pitchfork, and battering ram fuzzing,
- 1:51Speaker 1: and I think we should start with the most thorough
- 1:54Speaker 1: and probably the noisiest approach.
- 1:56Speaker 2: That would definitely be cluster bomb. Just think of a
- 1:58Speaker 2: standard log in form variables right, username and password right,
- 2:02Speaker 2: and you have two separate lists of known default credentials.
- 2:05Speaker 2: Your whole mission is just to find the one pair
- 2:07Speaker 2: that works.
- 2:08Speaker 1: So say I have my list of common usernames and
- 2:11Speaker 1: my list of common passwords. How does the cluster bomb
- 2:15Speaker 1: approach make sure it doesn't miss anything?
- 2:17Speaker 2: Well, the mechanism is just total exhaustive combination. Imagine you
- 2:22Speaker 2: have two massive keyrings. Okay, cluster Bomb takes the first
- 2:26Speaker 2: key from your username keyring and it tries it with
- 2:29Speaker 2: every single key on.
- 2:30Speaker 1: The password keering, every single one everyone.
- 2:33Speaker 2: So Username one gets tested with password A, password B,
- 2:37Speaker 2: password C all the way to the end.
- 2:39Speaker 1: So if my first username is admin, it's going to
- 2:42Speaker 1: test admin with every single entry and then an entire
- 2:44Speaker 1: password list.
- 2:45Speaker 2: Correct and only once that's done, Only then does it
- 2:48Speaker 2: move to the second username maybe guessed, and then it
- 2:51Speaker 2: does the whole thing all over again.
- 2:53Speaker 1: Wow. So that's every single mathematical pairing possible between the
- 2:56Speaker 1: two lists.
- 2:57Speaker 2: He guarantees discovery. Yeah, but that incredible thoroughness it comes
- 3:02Speaker 2: with a massive operational cost because if.
- 3:04Speaker 1: You have say one hundred usernames and one hundred passwords.
- 3:07Speaker 2: You are generating ten thousand separate requests. You're literally trying
- 3:11Speaker 2: every key in that giant keyring.
- 3:13Speaker 1: That immediately raises a huge red flag for me. If
- 3:16Speaker 1: cluster bomb is running ten thousand unique requests against one
- 3:19Speaker 1: login page, aren't you just guaranteeing you trip a firewall?
- 3:23Speaker 2: That's its core strategic limitation absolutely, so where would you
- 3:27Speaker 2: use it. It's fantastic for internal network scans or testing
- 3:31Speaker 2: specific applications that you know are poorly protected. But in
- 3:35Speaker 2: a production environment the noise factor is very, very high.
- 3:39Speaker 1: And in the template you just set it up by
- 3:41Speaker 1: defining the two parameters YEP.
- 3:43Speaker 2: Parameter A points to usernames dot txt, parameter B points
- 3:47Speaker 2: to passwords dot txt, and then you add that crucial
- 3:50Speaker 2: line attack type dot.
- 3:52Speaker 1: Cluster bomb, and it knows it's successful because of a matcher. Right,
- 3:55Speaker 1: it's looking for something specific exactly.
- 3:57Speaker 2: It might look for the word success and the response body,
- 4:01Speaker 2: and just as important, an HTTPS status code of two
- 4:03Speaker 2: hundred to.
- 4:04Speaker 1: Confirm you actually landed on the authenticated page precisely.
- 4:07Speaker 2: If both of those conditions match, the tool stops and
- 4:10Speaker 2: tells you the winning combination.
- 4:11Speaker 1: Okay, so cluster bomb guarantees discovery, but it's high risk,
- 4:15Speaker 1: high resource. How do we get more surgical and save
- 4:17Speaker 1: some of those resources?
- 4:19Speaker 2: We move to the second technique, pitchfork fuzzing pitchfork. Yeah. See,
- 4:25Speaker 2: sometimes you're not looking for just any combination, you're looking
- 4:28Speaker 2: for corresponding combinations.
- 4:30Speaker 1: What do you mean by that?
- 4:31Speaker 2: This technique is designed for super high efficiency when you
- 4:35Speaker 2: suspect the credentials might be identical defaults, like you know,
- 4:38Speaker 2: the username tomcat has the password tomcat.
- 4:42Speaker 1: I see, So Pitchfork iterates the payloads simultaneously.
- 4:46Speaker 2: Correct Instead of fixing one and cycling the other, Pitchfork
- 4:49Speaker 2: takes the first entry from the username list and pairs
- 4:52Speaker 2: it only with the first entry from the password list,
- 4:55Speaker 2: and it moves on simultaneously. It moves to the second entries,
- 4:58Speaker 2: pairs them, and so on right down on the list.
- 5:00Speaker 1: To use your key analogy again, if the keys on
- 5:03Speaker 1: both rings are numbered, it only tries key number five
- 5:06Speaker 1: from the username list with key number five from the
- 5:09Speaker 1: password list exactly.
- 5:11Speaker 2: It avoids all those other irrelevant pairings.
- 5:13Speaker 1: That's the key difference. Then, if you suspect the username
- 5:16Speaker 1: tomcat has password Tomcat, Pitchfork tests that specific pair directly.
- 5:21Speaker 2: And you avoid the ninety nine other irrelevant combinations that
- 5:26Speaker 2: cluster bomb would have wasted its time on for that
- 5:28Speaker 2: one username.
- 5:29Speaker 1: That changes the math completely. Our example of one hundred
- 5:33Speaker 1: usernames and one hundred passwords, cluster Bomb was ten thousand requests.
- 5:37Speaker 1: Right with Pitchfork assuming a list of the same link,
- 5:40Speaker 1: it's just one hundred requests one hundred.
- 5:44Speaker 2: It's a massive saving and time in network traffic, which
- 5:47Speaker 2: is critical whether you're you know, a pen tester or
- 5:50Speaker 2: running a defensive scan.
- 5:51Speaker 1: So this is really the best choice for checking for
- 5:54Speaker 1: known default accounts where the username often just matches the password.
- 5:58Speaker 2: It's the optimal choice for that scenario. Yes, and the
- 6:00Speaker 2: template configuration is almost identical to cluster bomb. You still
- 6:04Speaker 2: define your two parameters.
- 6:05Speaker 1: Parameter A and parameter B reading from their.
- 6:08Speaker 2: Lists, but the only real change is setting the attack pitchfork.
- 6:13Speaker 2: That's it.
- 6:13Speaker 1: We've covered the scenario where everything is unknown with cluster
- 6:16Speaker 1: bomb and where we suspect matching pairs with Pitchfork. Okay,
- 6:20Speaker 1: here's where it gets really interesting. What happens when we've
- 6:22Speaker 1: already done some recon we've gathered some intelligence. Say we
- 6:27Speaker 1: know the default username for a service is hard coded.
- 6:31Speaker 2: That intelligence immediately makes the attack laser focused, and that
- 6:35Speaker 2: is the perfect scenario for our third technique, battering ram Fuzzing.
- 6:39Speaker 1: Battering Ram sounds powerful, but the descriptions I've seen say
- 6:43Speaker 1: it only supports a single payload set. How does that
- 6:47Speaker 1: help if we still have two fields user name and password.
- 6:50Speaker 2: We'll think of it like a combination lock where you
- 6:52Speaker 2: already know the first two numbers. Okay, you only need
- 6:54Speaker 2: to cycle through that last number. We don't need two
- 6:56Speaker 2: lists because one of our variables is already known.
- 6:58Speaker 1: It's fixed, and how we set that up in the
- 7:01Speaker 1: template is the key.
- 7:02Speaker 2: I'm guessing it's everything. Let's say we know for a
- 7:05Speaker 2: fact the username is admin. We hardcode that value directly
- 7:09Speaker 2: into the raw request block of our template.
- 7:11Speaker 1: So the request itself literally says username admin exactly.
- 7:14Speaker 2: That part of the request never changes during the entire run.
- 7:17Speaker 1: Got it.
- 7:18Speaker 2: Then for the password field, we designate it as our
- 7:21Speaker 2: single fuzzing target. We might say password parameter A, So.
- 7:25Speaker 1: You only define one payload block.
- 7:27Speaker 2: Just one parameter a, which reads from our passwords dot
- 7:30Speaker 2: txt file and that's it.
- 7:32Speaker 1: Ah. Okay, so we're using battering rams ability to manage
- 7:36Speaker 1: just one list of payloads, right, and we're applying it
- 7:38Speaker 1: sequentially to just that one spot the password field until
- 7:42Speaker 1: the success condition is met.
- 7:43Speaker 2: It's incredibly efficient because we don't waste any time defining
- 7:47Speaker 2: or loading a username list we know we don't need
- 7:50Speaker 2: to cycle through.
- 7:51Speaker 1: It's the definition of precision, really.
- 7:53Speaker 2: It is you use the intelligence you already have to
- 7:56Speaker 2: completely bypass the need for an exhaustive search. The tool
- 8:00Speaker 2: focuses one hundred percent of its resources on cracking that
- 8:03Speaker 2: single unknown variable.
- 8:05Speaker 1: So what does this all mean. We've looked at three
- 8:08Speaker 1: really distinct approaches, all based on intelligence and strategic need.
- 8:12Speaker 1: Cluster Bomb gives you that exhaustive check. It's ideal when
- 8:15Speaker 1: you absolutely cannot miss a single pairing, but it is
- 8:18Speaker 1: loud and costly, very loud. Then there's pitchfork, which is
- 8:21Speaker 1: so much more efficient for testing corresponding pairs, saving huge
- 8:24Speaker 1: resources when you suspect those common default settings right.
- 8:27Speaker 2: The username equals password scenario.
- 8:30Speaker 1: And finally, battering ram is perfect for when you have
- 8:32Speaker 1: those fixed variables and you only need to hit one
- 8:35Speaker 1: or two specific points with a single payload list.
- 8:37Speaker 2: At the end of the day, choosing the correct attack
- 8:40Speaker 2: type based on the target structure and your own operational
- 8:44Speaker 2: risk tolerance. That's the real skill here.
- 8:47Speaker 1: It's not just about running the tool, not at all.
- 8:49Speaker 2: These templates let you define, run and scale these very
- 8:53Speaker 2: sophisticated attacks that can find weak links incredibly quickly, Which
- 8:57Speaker 2: brings us to.
- 8:58Speaker 1: A final thought for you to take away, is you
- 9:00Speaker 1: consider structured fuzzing Let's say you have two lists, one
- 9:03Speaker 1: with twenty five usernames, another with twenty five passwords. Okay,
- 9:07Speaker 1: how many total HDTP requests would the cluster bomb technique generate.
- 9:11Speaker 1: Now compare that to the total requests from the Pitchfork technique.
- 9:15Speaker 1: Think about the difference and what it means for a
- 9:17Speaker 1: defender trying to spot your activity.