Nostalgia
Nostalgia is a sanitized challenge note from the local HTB archive, organized for quick review by category, difficulty, evidence flow, and reusable operator
Scenario
Nostalgia attack path
Nostalgia is a sanitized challenge note from the local HTB archive, organized for quick review by category, difficulty, evidence flow, and reusable operator
Objective
Challenge walkthrough focused on GamePwn evidence, validation, and reusable operator lessons.
Walkthrough flow
Extract the GBA ROM from the HTB archive and inspect...
Identify that Start submits the accumulated input...
Recover the relevant button weights and produce a...
Follow the success branch to the image renderer...
Decode the 240x160 row-RLE indexed success bitmap and...
Source coverage
High source coverage
Status: complete. This article is generated from 4 sanitized Markdown sources and keeps raw flags, credentials, keys, cookies, and reusable secrets out of the rendered blog.
High confidence: the page is reconstructed from a primary walkthrough plus multiple supporting notes or evidence sources. Treat the chain as source-backed, while still checking the listed source files for sensitive values.
- GamePwn/Nostalgia/writeup.md
- htb-challenge/GamePwn/Nostalgia/notes.md
- htb-challenge/GamePwn/Nostalgia/memory-summary.md
- htb-challenge/GamePwn/Nostalgia/hypothesis-board.md
Technical Walkthrough
Writeup
Challenge
- Name: Nostalgia
- Category: GamePwn
- Difficulty: Medium
- Mode: file
Summary
The ROM accepts a GBA-button cheatcode that is validated as a weighted sum. Static analysis found the submit check, a valid short input sequence, and the renderer call used on success. I decoded the success-screen image asset directly from the ROM and used OCR to place the flag candidate in loot/, then captured it through the harness.
Artifact Inventory
files/a12c734f-8659-4963-893f-2ddff73eea4d.zip: original HTB archive.analysis/extracted/Nostalgia.gba: extracted GBA ROM.analysis/extracted/instructions.txt: states thatSelectclears input andStartsubmits the cheatcode.- No remote service was involved.
Analysis
- RAG did not return useful Nostalgia-specific guidance, so the solve relied on local ROM analysis.
- The ROM polls the GBA keypad register at
0x04000130; the relevant disassembly is recorded inanalysis/keyinput-function-disasm.txt. - The
Startsubmit path compares the accumulated score with0xf3. - The input handler allows up to eight normal button presses before submit.
- Recovered button weights include
A=0x03,B=0x0e,Left=0x6e,Right=0x3a,Up=0x28, andDown=0x0c. - A valid short cheatcode is
A, B, Left, Right, Right, which sums to0xf3. - On success, the ROM calls the image renderer with source
0x02008aac, corresponding to ROM file offset0x8aac. - The success asset is a 240x160 indexed bitmap using per-row RLE and an embedded 256-color RGB palette. The rendered success screen contains the flag.
Solve
Run:
cd <local workspace>
python3 solve/decode_success_screen.pyThe script decodes the success-screen asset and writes the rendered image to loot/success-screen.png. OCR of the rendered image produced an HTB-format candidate in loot/flag-candidate.txt; manual pixel-crop review was used to correct the ambiguous middle glyph before capture.
python3 <local workspace> capture-flag <local workspace> --from loot/flag-candidate.txtRaw flag material is kept in loot/ only.
Flag
Raw flag is stored in loot/flag.txt and intentionally not reproduced here.
Lessons
- For small GBA homebrew challenges, static Thumb disassembly around
<secret redacted>can be faster than emulator-driven guessing. - A submit check may validate a numeric accumulator rather than a single literal string.
- Rendered success assets can contain the flag even when no plaintext
HTB{string exists in the ROM. - Keep rendered flag-bearing screenshots in
loot/, notanalysis/.
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: Nostalgia
- Category: GamePwn
- Difficulty: Medium
- Mode: file
- Remote instance: none
- Start time: 2026-06-15T04:10:00Z
- Operator: harness
- State file:
challenge-state.json
Harness Status
- Current phase: see
challenge-state.json - Next allowed actions: see
next-action.json - Raw flags and sensitive material stay in
loot/only. Do not paste them here.
Artifact Inventory
| File | Size | SHA256 | Type | Notes |
|---|---|---|---|---|
files/a12c734f-8659-4963-893f-2ddff73eea4d.zip | 44175 | <hash redacted> | Zip archive data, at least v2.0 to extract, compression method=deflate | zip entries: 2 shown in artifact inventory JSON |
Evidence Ledger
| Time | Action | Output/File | Finding | Confidence | Next |
|---|---|---|---|---|---|
| 2026-06-15T04:10:00Z | harness init | challenge-state.json | Workspace initialized with deterministic state file | High | Inventory artifacts |
| 2026-06-15T04:10:12Z | artifact inventory | analysis/artifact-inventory.json | 1 artifact(s) inventoried | High | Build or update hypotheses |
| 2026-06-15T04:10:28Z | hypothesis recorded | hypothesis-board.md | Reverse the GBA ROM cheat-code validation path and recover the expected cheatcode/flag from constants or comparison logic. | Medium | Extract ROM metadata and strings, then search for input/check/flag text and inspect ARM/Thumb code around referenced strings. |
| 2026-06-15T04:10:28Z | checkpoint recorded | analysis/checkpoint-triage-20260615T041028744514Z-4ba0aa5c.md | Checkpoint for TRIAGE | High | Use checkpoint to drive next decision |
| 2026-06-15T04:10:51Z | RAG query | analysis/rag/rag-query-20260615T041038367909Z-d7bbe3b2.txt | RAG helper exited 0; output saved | Medium | Record retrieval tag and validation |
| 2026-06-15T04:11:56Z | RAG record | analysis/rag-records.md | Retrieved memory tagged MISSING | Medium | Validate or reject with live evidence |
| 2026-06-15T04:11:56Z | instrumentation plan | analysis/instrumentation-plan.md | Recover the cheatcode accepted by the GBA ROM without manual guessing. | High | After static analysis identifies two conflicting candidate codes or no validation path after bounded disassembly, checkpoint and request emulator/debugger tooling instead of blind guessing. |
| 2026-06-15T04:19:46Z | research record | analysis/research/research-records.md | Research tagged MATCHED | Medium | Validate against current evidence |
| 2026-06-15T04:19:46Z | evaluator | analysis/evaluator-20260615T041946126418Z-bcd2eb32.md | Proceed | High | capture-flag from loot/flag-candidate.txt |
| 2026-06-15T04:19:46Z | flag capture | loot/flag.txt | HTB-format flag captured; raw value kept in loot only | High | Write solution and run completion gate |
| 2026-06-15T04:21:38Z | completion gate | challenge-state.json | Completion gate passed; state marked COMPLETE | High | Optional sanitized memory summary approval |
| 2026-06-15T04:25:27Z | flag capture | loot/flag.txt | HTB-format flag captured; raw value kept in loot only | High | Write solution and run completion gate |
| 2026-06-15T04:25:27Z | completion gate | challenge-state.json | Completion gate passed; state marked COMPLETE | High | Optional sanitized memory summary approval |
Key Findings
- The GBA ROM validates submitted input by comparing a weighted button-score accumulator against
0xf3. - A valid short cheatcode is
A, B, Left, Right, Right. - The success path renders a 240x160 indexed bitmap asset from ROM file offset
0x8aac. solve/decode_success_screen.pydecodes that row-RLE success asset and writes flag-bearing rendered images underloot/.- Harness flag capture succeeded; raw flag value is stored only in
loot/flag.txt.
RAG / Advisory Memory
RAG output is advisory only. Record evaluated retrievals with:
scripts/challenge_harness.py rag-record <workspace> --query "..." --tag MATCHED|PARTIAL|MISSING|<secret redacted>|GENERIC --validation "..."Secrets/Flags
Raw flags and sensitive material stay in loot/ only. Use scripts/challenge_harness.py capture-flag to validate and record flag capture without printing the value.
Memory Summary
Metadata
- Platform: HackTheBox Challenges
- Category: GamePwn
- Challenge: Nostalgia
- Difficulty: Medium
- Source workspace:
<local workspace>
Validated Solve Chain
Concepts only. Do not include raw flags, reusable credentials, tokens, cookies, private keys, or live secrets.
- Extract the GBA ROM from the HTB archive and inspect the keypad handler around
<secret redacted>(0x04000130). - Identify that
Startsubmits the accumulated input score and compares it against0xf3. - Recover the relevant button weights and produce a valid short cheatcode whose weights sum to
0xf3. - Follow the success branch to the image renderer source pointer
0x02008aac, mapping to ROM file offset0x8aac. - Decode the 240x160 row-RLE indexed success bitmap and its embedded RGB palette.
- Extract the flag visually/OCR from the decoded success screen and capture it through the harness.
Reusable Lessons
- For GBA ROM challenges, keypad register xrefs are a strong first anchor when the prompt mentions button input.
- If
stringsdoes not reveal a plaintext flag marker, trace the success branch; the flag may be rendered as an image asset. - Row-RLE indexed image formats can be decoded directly from renderer logic, avoiding emulator setup.
- Flag-bearing screenshots should be stored in
loot/, notanalysis/.
Dead Ends
- Private CTF RAG had no useful Nostalgia-specific prior solve context.
- Plain string and XOR-prefix searches did not reveal a plaintext flag.
Tool Quirks
tesseractworked after point-resizing the 240x160 success screen.- The ImageMagick
convertcommand is available but warns thatmagickis preferred in IMv7.
Evidence Paths
analysis/keyinput-function-disasm.txtanalysis/input-weight-model.txtanalysis/static-validation.mdsolve/decode_success_screen.pyloot/success-screen.pngloot/flag.txt
Ingestion Decision
- Proposed for LightRAG: yes
- Requires user approval before ingestion: yes
Hypothesis Board
Keep no more than 3 active hypotheses on Easy/Medium and 5 on Hard unless the user explicitly asks for breadth.
| Rank | Path | Evidence | Missing Proof | Cheapest Validation | Confidence | Status |
|---|---|---|---|---|---|---|
| 1 | Reverse the GBA ROM cheat-code validation path and recover the expected cheatcode/flag from constants or comparison logic. | Archive contains Nostalgia.gba and instructions.txt; scenario says a Game Boy Advance flash card asks for a cheatcode. | Extract ROM metadata and strings, then search for input/check/flag text and inspect ARM/Thumb code around referenced strings. | Medium | Active |
Closed Branches
| Branch | Evidence Tested | Failure Output | Reason Closed | Revisit Condition |
|---|
Technical analogy
How to remember this solve
Think of the game like an arcade cabinet with a score counter behind the glass. The solve is finding where the game stores state and reading or changing it at the right moment.
For Nostalgia, 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.