Global-Hyperlink-Zone
HackTheBox Global-Hyperlink-Zone machine writeup — reconnaissance and enumeration walkthrough.
Challenge Overview
The Global Hyperlink Zone is a quantum computing challenge that simulates a 5-qubit quantum circuit over multiple measurement shots. The challenge server reads gate instructions, builds and executes the circuit, then verifies if the measurement results satisfy a specific pattern. Understanding quantum gates and their behavior is essential to craft the correct payload and retrieve the flag.
What Makes This Challenge Interesting
This challenge elegantly combines three concepts:
- Quantum Gate Operations - understanding how H (Hadamard) and CX (CNOT) gates transform qubit states
- Measurement & Probabilistic Outcomes - how repeated measurements create bit-strings (shares)
- Constraint Satisfaction - satisfying three specific equality/inequality conditions simultaneously
Understanding the Challenge Mechanics
The Server’s Workflow
The Global Hyperlink Zone service operates in the following sequence:
- Accept Instructions - The server prompts for a gate instruction string formatted as
GATE:QUBIT[,QUBIT];GATE:QUBIT[,QUBIT];... - Build Circuit - Constructs a 5-qubit quantum circuit and applies gates in the specified order
- Execute & Measure - Runs the circuit for many shots (measurement iterations) and records outcomes
- Extract Shares - For each qubit (0-4), concatenates all measured bits into a binary string called a “share”
- Validate Constraints - Checks three conditions:
share0 == share1 == share3(three qubits must have identical measurement patterns)share2 == share4(two qubits must have identical measurement patterns)share2/4 != share0/1/3(the two groups must differ)
- Return Flag - If all conditions pass, outputs the flag from
flag.txt
The Constraint Pattern Visualized
1
2
3
4
5
6
7
8
9
10
Required Pattern:
┌─────────────────────────┐
│ Qubits: 0, 1, 3 │ ← Must all be identical (Group A)
│ Pattern: share0 │
└─────────────────────────┘
≠
┌─────────────────────────┐
│ Qubits: 2, 4 │ ← Must all be identical (Group B)
│ Pattern: share2 │
└─────────────────────────┘
Quantum Gate Fundamentals
The Hadamard (H) Gate
The Hadamard gate is the quantum equivalent of flipping a fair coin:
Initial State: Qubit starts at 0⟩ - Operation: Places the qubit in superposition
- Measurement Result: 50% chance of measuring 0, 50% chance of measuring 1
- Across Multiple Shots: Produces a random bit-string where each bit is independently 0 or 1
Key Insight: Two independently applied H gates on different qubits will produce almost completely different bit-strings across many measurements.
The CNOT (CX) Gate
The CNOT gate is a controlled operation:
- Parameters: Requires a control qubit and target qubit (e.g.,
CX:0,1) - Operation: Flips the target qubit’s state only if control qubit is 1
- Practical Effect: Copies the measured bit from control to target across all shots
Constraint: Target qubit should start in 0⟩ state for predictable copying
Key Insight: Applying CX:0,1 means every time qubit 0 measures as 0, qubit 1 will measure as 0; every time qubit 0 measures as 1, qubit 1 will also measure as 1.
Premium Content
The full exploitation walkthrough, privilege escalation, and flags are available exclusively for members.
Unlock Full Writeup →