$ cat writeup.md…
$ cat writeup.md…
HackTheBox
Server: 83.136.251.105:37930
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
"Qubitrix doesn't store data the way others do. Deep within its core, every secret stays in a silent quantum spiral, beyond classical reach. Engineers swore it was flawless — yet something in its design hums and breathes. To them, madness. To us, clarity."
Server: 83.136.251.105:37930
The server uses Qiskit to encode the flag into quantum states. Each byte of the flag is converted to a rotation angle (byte * π/180 radians) and applied to the corresponding qubit:
i % 3 == 0: RX(θ) — rotation around X axisi % 3 == 1: RY(θ) — rotation around Y axisi % 3 == 2: H then RZ(θ) — Hadamard + rotation around Z axisThe server allows:
For RX and RY gates: After applying RX(θ) or RY(θ) to |0⟩:
cos(θ/2)|0⟩ ± sin(θ/2)|1⟩P(1) = sin²(θ/2)θ = 2·arcsin(√P(1)), then byte = θ × 180/πFor RZ gates (after H): After H·RZ(θ)|0⟩:
(e^{-iθ/2}|0⟩ + e^{iθ/2}|1⟩)/√2P(1) = sin²(θ/2)#!/usr/bin/env python3 """ Phase Madness Solver - HackTheBox Quantum state tomography attack on phase-encoded flag """ from pwn import * import json import math HOST = "83.136.251.105" PORT = 37930 def get_measurement(r, qubit, instructions=""): """Send measurement request and get results""" r.recvuntil(b"Specify the qubit index you want to measure : ") r.sendline(str(qubit).encode()) r.recvuntil(b"Specify the instructions : ") r.sendline(instructions.encode()) return json.loads(r.recvline().decode().strip()) ...
$ grep --similar