Challenge / Quantum

Flagportation

Name: - Category: - Difficulty: Raw flag is stored in

Very EasyPublished 2025-05-11Sanitized local writeup

Scenario

Flagportation attack path

Name: - Category: - Difficulty: Raw proof is stored in

Objective

Challenge walkthrough focused on Quantum evidence, validation, and reusable operator lessons.

Flagportation sanitized attack graph

Walkthrough flow

01

Circuit constraints

02

State manipulation

03

Measurement strategy

04

Proof captured

Source coverage

Moderate source coverage

Status: partial. This article is generated from 5 sanitized Markdown sources and keeps raw flags, credentials, keys, cookies, and reusable secrets out of the rendered blog.

70% coverage
Evidence verdict

Moderate confidence: the page is useful for review, but it should be treated as partial because the available source material is thinner or less narrative-complete.

  • Quantum/Flagportation/writeup.md
  • htb-challenge/Quantum/Flagportation/notes.md
  • htb-challenge/Quantum/Flagportation/memory-summary.md
  • htb-challenge/Quantum/Flagportation/hypothesis-board.md
  • HTB/_knowledge/exports/ctf-lightrag-latest-203412/documents/challenge__Quantum__Flagportation__notes.md.388adaf3b7.md

Technical Walkthrough

Writeup

Challenge

  • Name:
  • Category:
  • Difficulty:

Summary

Artifact Inventory

Analysis

Solve

Flag

Raw flag is stored in loot/flag.txt.

Lessons

Source-Backed Dossier

The sections below are merged from companion Markdown notes for the same case. They are rendered after sanitization so the article stays precise without publishing raw flags, credentials, or target-specific secrets.

Notes

Scope

  • Challenge: Flagportation
  • Category: Quantum
  • Difficulty: Very Easy
  • Target: <TARGET>:32294
  • Started: 2026-05-07

Evidence Ledger

TimestampActionFindingNext
00:00Read server.pyQuantum teleportation protocol, 204 qubits (51 bytes), flag encoded as bit pairsWrite solver
00:02Debug banner204 qubits, first prompt includes qubit dataFix parsing
00:03Run solve.pyAll 204 qubits decoded, flag recoveredDone

Vulnerability

Standard quantum teleportation protocol — no authentication required.

Encoding: flag bytes → bit pairs → qubit states

  • "00" → |0⟩ (Z basis), "01" → |1⟩ (Z basis)
  • "10" → |+⟩ (X basis), "11" → |-⟩ (X basis)

Correction gates based on Alice's measurements (q0, q1):

  • q0=0, q1=0: identity (H;H cancels)
  • q0=0, q1=1: X gate on q2
  • q0=1, q1=0: Z gate on q2
  • q0=1, q1=1: Z then X on q2

Decoding: measure q2 in the given basis, map result to bit pair.

| 2026-05-27T23:35:17Z | backfill | challenge-state.json | Legacy workspace backfilled with deterministic state | High | Validate before further work |

Memory Summary

Metadata

  • Platform: HackTheBox Challenges
  • Category:
  • Challenge:
  • Difficulty:
  • Source workspace:

Validated Solve Chain

Concepts only. Do not include raw flags, reusable credentials, tokens, cookies, private keys, or live secrets.

1.

Reusable Lessons

-

Dead Ends

-

Tool Quirks

-

Evidence Paths

-

Ingestion Decision

  • Proposed for LightRAG: yes/no
  • Requires user approval before ingestion: yes

Hypothesis Board

RankPathEvidenceMissing ProofCheapest ValidationConfidenceStatus

Closed Branches

BranchEvidence TestedFailure OutputReason ClosedRevisit Condition

Notes

Scope

  • Challenge: Flagportation
  • Category: Quantum
  • Difficulty: Very Easy
  • Target: <TARGET>:32294
  • Started: 2026-05-07

Evidence Ledger

TimestampActionFindingNext
00: <REDACTED>, 204 qubits (51 bytes), flag encoded as bit pairsWrite solver
00:02Debug banner204 qubits, first prompt includes qubit dataFix parsing
00: <REDACTED>, flag recoveredDone

Vulnerability

Standard quantum teleportation protocol — no authentication required.

Encoding: <REDACTED>

  • "00" → |0⟩ (Z basis), "01" → |1⟩ (Z basis)
  • "10" → |+⟩ (X basis), "11" → |-⟩ (X basis)

Correction gates based on Alice's measurements (q0, q1):

  • q0=0, q1=0: identity (H;H cancels)
  • q0=0, q1=1: X gate on q2
  • q0=1, q1=0: Z gate on q2
  • q0=1, q1=1: Z then X on q2

Decoding: measure q2 in the given basis, map result to bit pair.

| 2026-05-27T23:35:17Z | backfill | challenge-state.json | Legacy workspace backfilled with deterministic state | High | Validate before further work |

Technical analogy

How to remember this solve

Think of the quantum circuit like a fragile sequence of switches. The solve is about arranging the switches so the final measurement lands in the one state that unlocks the flag.

For Flagportation, keep the mental model simple: identify the trusted assumption, prove it with the smallest safe test, then automate or repeat only the part that directly leads to the flag.