HackTheBox - Gavel

HackTheBox - Gavel

Source: YouTube · IppSec · published Mar 14, 2026 · 57:14

Penetration Testing
No ratings yet Log in to rate
Transcript Available
Description

This video demonstrates the exploitation of Hack The Box machine "Gavel," focusing on a unique SQL injection technique by manipulating column names within prepared statements to bypass standard protections and gain initial access 0:04.

Key Takeaways:
• The machine features a novel SQL injection vector where the attacker controls the column name in a prepared statement, allowing for significant manipulation of the SQL query structure 0:08.
• Initial enumeration involves running Nmap with default scripts, version detection, and verbose output to identify open ports and service versions 0:27.
• The core exploitation relies on source code analysis of the PHP web application to understand how the input is processed and how the injection can be leveraged effectively 0:19.
• Post-exploitation requires reversing a binary to understand its behavior, which is crucial for escalating privileges and completing the challenge 0:21.

The summary highlights how creative SQL injection techniques can simplify subsequent stages of a penetration test by revealing critical vulnerabilities in the application logic.

Sources:

  • 0:04 Introduction to the Gavel machine and its unique SQLi vector
  • 0:08 Explanation of injecting into column names in prepared statements
  • 0:19 Importance of PHP source code analysis
  • 0:21 Need for binary reversing for privilege escalation
  • 0:27 Initial Nmap scanning strategy

Generate CPE Credits

Generate a professional CPE document from this video's transcript.

Estimated credit: 1 CPE hours

Estimate uses the video runtime (1 hour ≈ 1 CPE, rounded to the nearest 0.5, minimum 0.5, maximum 2.0). The final amount can be lower after review, never higher.

Topic: Penetration Testing. Commonly maps to: Security Assessment and Testing, Security Operations. Exact CISSP domains are assigned during generation.

CISSP Domain Mapping
Learning Objectives
Self-Assessment Questions
PDF Export Ready

Free account. One generation at a time, with a daily limit.

CPEBuddy is independent and not affiliated with or endorsed by ISC2, ISACA, or any certification body. Exports are formatted for common CPE submissions; acceptance is at your certification body's discretion.

Watch on YouTube

Transcript Preview

First 800 characters of the transcript

What's going on YouTube? This is Ippsec, and today we'll be doing Gavel from Hack The Box, which starts off with a wickedly cool and unique SQL injection as we'll be injecting into a prepared statement because we have control over the column name. This lets us radically change the SQL query and do some really odd things to get SQL injection. Once we do this, the box becomes so much straightforward with further source code analysis of the PHP web app and some reversing on a binary to understand what it is doing. But with all that being said, let's just jump in. As always, we're going to start off with an Nmap. So, -sC for default scripts, -sV for enumerate versions, -v for double verbose. This gives us things like the TTL, -oA output all formats plainly in Nmap directory and call it gavel. …