Global Hyperlink Zone
Author: 0xIDA
Platform: HTB · Category: web · Difficulty: Very Easy
Platform: HTB | Category: Web | Difficulty: Very Easy
Target: 154.57.164.67:32358
Solvers
Summary
A Qiskit-based quantum circuit challenge where you must construct a 5-qubit gate sequence that produces specific measurement correlations across qubits to "initialize the hyperlink" and receive the flag.
Analysis
The server (server.py) accepts a semicolon-delimited string of quantum gate instructions in <gate>:<params> format, builds a 5-qubit circuit, runs 256 shots on the qasm_simulator, and checks the measurement outcomes ("shares"):
- Condition 1:
shares[0] == shares[1] == shares[3]— qubits 0, 1, and 3 must measure identically across all 256 shots - Condition 2:
shares[2] == shares[4]— qubits 2 and 4 must measure identically - Condition 3:
shares[4] != shares[0]— the two groups must produce different 256-bit strings - Condition 4: No share can be all-0x00 or all-0xFF bytes (rejects trivial all-|0⟩ or all-|1⟩ states)
Solution
Use H (Hadamard) gates to create superposition and CX (CNOT) gates to entangle/duplicate measurement outcomes:
H:0;CX:0,1;CX:0,3;H:2;CX:2,4
How it works:
- H:0 — puts qubit 0 into superposition (50% |0⟩, 50% |1⟩) — avoids all-0/all-255 trap
- CX:0,1 — CNOT copies qubit 0's state to qubit 1 (they always measure the same)
- CX:0,3 — CNOT copies qubit 0's state to qubit 3 (all three match)
- H:2 — puts qubit 2 into independent superposition
- CX:2,4 — copies qubit 2's state to qubit 4
Group A (0,1,3) and Group B (2,4) each have consistent in-group measurement patterns but differ from each other because their Hadamard gates produce independent random sequences.
Flag
HTB{4_57r4ng3_gr33nb3rg3r_h0rn3_z31L1ng3r_57473_1n1714L1z35_7h3_hyp3rL1nk!}
Tools Used
netcat— raw TCP to targetcurl— download challenge files
Key Takeaways
- CNOT entanglement = measurement correlation between control and target qubits
- H gate creates superposition → avoids all-0/all-255 byte traps
- The "shares" are the accumulated measurement bitstrings converted to bytes
- Chain of CX gates lets you broadcast one qubit's outcome to many qubits