CubeMadness1
CubeMadness1 is a sanitized challenge note from the local HTB archive, organized for quick review by category, difficulty, evidence flow, and reusable operator
Scenario
CubeMadness1 attack path
CubeMadness1 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 Unity Texture2D / Sprite objects from...
OCR exported textures; CubeMadness1 contains the...
Store the raw proof only in loot/proof.txt; redact...
Source coverage
High source coverage
Status: complete. This article is generated from 6 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/CubeMadness1/writeup.md
- htb-challenge/GamePwn/CubeMadness1/notes.md
- htb-challenge/GamePwn/CubeMadness1/memory-summary.md
- htb-challenge/GamePwn/CubeMadness1/hypothesis-board.md
- HTB/_knowledge/exports/ctf-lightrag-latest-203412/documents/challenge__GamePwn__CubeMadness1__memory-summary.md.4e1284d4ea.md
- HTB/_knowledge/exports/ctf-lightrag-latest-203412/documents/challenge__GamePwn__CubeMadness1__notes.md.e3921f9bc0.md
Technical Walkthrough
Writeup
Challenge
- Name: CubeMadness1
- Category: GamePwn
- Difficulty: Very Easy
- Mode: file
Summary
The completed path is a Unity asset extraction, not the earlier live-memory branch. Runtime work proved the game launches and that the visible cube counter can be patched, but that only changed UI text and did not trigger the win condition.
The decisive step was to extract Unity textures from sharedassets0.assets. Two large black textures contained the flag rendered as green text. The final solver exports textures with UnityPy, OCRs them with Tesseract, writes the recovered raw flag only to loot/flag.txt, and leaves OCR transcripts redacted under analysis/.
Artifact Inventory
Reference analysis/artifact-inventory.json and summarize the relevant files or remote surface.
Analysis
- Public challenge-specific research had already suggested that CubeMadness1 is solved by editing a live cube counter rather than by recovering a flag purely from static IL2CPP artifacts.
- Runtime validation on the Pwnbox confirmed that the Windows Unity build can be launched under Wine/Xvfb without adding new tooling. See
<local workspace>and<local workspace>. - The first launch created
<local workspace> CubeMadness1/Player.logand a game-specific registry key atSoftware\\HackTheBox\\HackTheBox CubeMadness1, which confirms that the live runtime path is real and not just a static theory. - The first persisted-state review showed only display/session values in that registry key, so there is no verified cheap PlayerPrefs-only shortcut yet. See
<local workspace>. - Focused scene-string extraction proved that the scene contains
cubeCounterand the UI textCubes: 0 / 20, which validates the likely win threshold as 20. See<local workspace>. - Asset correlation also confirmed challenge-specific classes
CubeCounterandFlagCheckinAssembly-CSharp.dllmetadata context, supporting the live counter/win-gate theory. See<local workspace>and<local workspace>. - Live process-memory probing against the actual
HackTheBox CubeMadness1.exeprocess then surfaced writable runtime occurrences ofCubes: 0 / 20,CubeCounter, andFlagCheck. See<local workspace>. - A bounded runtime mutation successfully rewrote the live counter text buffers to
Cubes: 20 / 20, and a post-patch screenshot was captured back into the workspace. See<local workspace>,<local workspace>, and<local workspace>. - OCR of the post-patch screenshot did not produce a flag-shaped value, so the validated live patch appears to affect the UI/runtime-string layer rather than the underlying gameplay counter.
- After revisiting static assets,
solve/extract_flag_texture.pyused UnityPy to export 85 Unity textures from the extracted game assets. - The exported textures
analysis/texture-export/sharedassets0_35.pngandanalysis/texture-export/sharedassets0_120.pngcontain the same flag rendered as green text on a black background. - The solver uses Tesseract OCR to recover the flag-shaped value, writes the raw flag only to
loot/flag.txt, and redacts OCR transcripts inanalysis/texture-export/ocr/.
Solve
Run:
cd <local workspace>
.venv/bin/python solve/extract_flag_texture.pyThe script:
- Loads the Unity asset files from
files/extracted/gamepwn_cubemadness1. - Exports
Texture2DandSpriteobjects intoanalysis/texture-export/. - OCRs exported textures with Tesseract.
- Writes the recovered raw flag to
loot/flag.txt. - Keeps OCR artifacts redacted outside
loot/.
Flag
Captured through the harness. Raw flag is stored in loot/flag.txt only.
Lessons
- Runtime memory edits can prove a theory, but they are not always the shortest route.
- For Unity GamePwn challenges, asset extraction should run before deeper live-memory mutation if textures are present.
- Raw flags must stay in
loot/; OCR and other analysis outputs should be redacted.
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: CubeMadness1
- Category: GamePwn
- Difficulty: Very Easy
- Mode: file
- Remote instance: none
- Start time: 2026-06-07T12:52:32Z
- 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/a12c7365-d876-403c-9f84-7b447eadc52e.zip | 21574149 | <hash redacted> | Zip archive data, at least v1.0 to extract, compression method=store | zip entries: 52 shown in artifact inventory JSON |
files/extracted/gamepwn_cubemadness1/GameAssembly.dll | 14764544 | <hash redacted> | PE32+ executable (DLL) (GUI) x86-64, for MS Windows | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1.exe | 653824 | <hash redacted> | PE32+ executable (GUI) x86-64, for MS Windows | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/Resources/unity default resources | 4844872 | <hash redacted> | data | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/Resources/unity_builtin_extra | 390644 | <hash redacted> | data | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/RuntimeInitializeOnLoads.json | 1146 | <hash redacted> | JSON data | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/ScriptingAssemblies.json | 3052 | <hash redacted> | JSON data | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/app.info | 34 | <hash redacted> | ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/boot.config | 86 | <hash redacted> | ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/globalgamemanagers | 61868 | <hash redacted> | data | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/globalgamemanagers.assets | 118948 | <hash redacted> | DIY-Thermocam raw data (Lepton 3.x), scale 0-0, spot sensor temperature 0.000000, unit celsius, color scheme 0, calibration: offset 0.000000, slope 8.000000 | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/globalgamemanagers.assets.resS | 5748736 | <hash redacted> | International EBCDIC text, with very long lines (65536), with no line terminators | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/Metadata/global-metadata.dat | 3206324 | <hash redacted> | data | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/Resources/mscorlib.dll-resources.dat | 337563 | <hash redacted> | data | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/2.0/Browsers/Compat.browser | 1605 | <hash redacted> | exported SGML document text, ASCII text, with CRLF, LF line terminators | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/2.0/DefaultWsdlHelpGenerator.aspx | 60575 | <hash redacted> | HTML document text, ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/2.0/machine.config | 29116 | <hash redacted> | XML 1.0 document text, ASCII text, with very long lines (541) | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/2.0/settings.map | 2622 | <hash redacted> | XML 1.0 document text, ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/2.0/web.config | 11686 | <hash redacted> | XML 1.0 document text, ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.0/Browsers/Compat.browser | 1605 | <hash redacted> | exported SGML document text, ASCII text, with CRLF, LF line terminators | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.0/DefaultWsdlHelpGenerator.aspx | 60575 | <hash redacted> | HTML document text, ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.0/machine.config | 33648 | <hash redacted> | XML 1.0 document text, ASCII text, with very long lines (541) | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.0/settings.map | 2622 | <hash redacted> | XML 1.0 document text, ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.0/web.config | 18848 | <hash redacted> | XML 1.0 document text, ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.5/Browsers/Compat.browser | 1605 | <hash redacted> | exported SGML document text, ASCII text, with CRLF, LF line terminators | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.5/DefaultWsdlHelpGenerator.aspx | 60575 | <hash redacted> | HTML document text, ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.5/machine.config | 34106 | <hash redacted> | XML 1.0 document text, ASCII text, with very long lines (541) | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.5/settings.map | 2622 | <hash redacted> | XML 1.0 document text, ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.5/web.config | 18857 | <hash redacted> | XML 1.0 document text, ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/browscap.ini | 311984 | <hash redacted> | ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/config | 3276 | <hash redacted> | ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/mconfig/config.xml | 25817 | <hash redacted> | XML 1.0 document text, ASCII text, with very long lines (334) | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/level0 | 40100 | <hash redacted> | data | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/sharedassets0.assets | 1244732 | <hash redacted> | data | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/sharedassets0.assets.resS | 14648832 | <hash redacted> | data | |
files/extracted/gamepwn_cubemadness1/UnityCrashHandler64.exe | 1232984 | <hash redacted> | PE32+ executable (GUI) x86-64, for MS Windows | |
files/extracted/gamepwn_cubemadness1/UnityPlayer.dll | 28219992 | <hash redacted> | PE32+ executable (DLL) (console) x86-64, for MS Windows | |
files/extracted/gamepwn_cubemadness1/baselib.dll | 498776 | <hash redacted> | PE32+ executable (DLL) (console) x86-64, for MS Windows |
Evidence Ledger
| Time | Action | Output/File | Finding | Confidence | Next |
|---|---|---|---|---|---|
| 2026-06-07T12:52:32Z | harness init | challenge-state.json | Workspace initialized with deterministic state file | High | Inventory artifacts |
| 2026-06-07T12:52:54Z | artifact inventory | analysis/artifact-inventory.json | 38 artifact(s) inventoried | High | Build or update hypotheses |
| 2026-06-07T12:52:54Z | hypothesis recorded | hypothesis-board.md | Unity IL2CPP game challenge: recover or bypass the collection/win condition by analyzing GameAssembly.dll with global-metadata.dat and Unity assets. | Medium | Run strings/file triage, inspect Unity metadata/assets, then locate code or assets around cube collection and flag/win condition. |
| 2026-06-07T12:53:17Z | research task | analysis/research/task-20260607T125317563142Z-adbd4093.md | Research task created for advisory investigation | Medium | Record research output |
| 2026-06-07T12:53:17Z | checkpoint recorded | analysis/checkpoint-hypothesis_ready-20260607T125317564671Z-9d66af51.md | Checkpoint for <secret redacted> | High | Use checkpoint to drive next decision |
| 2026-06-07T12:56:26Z | research task | analysis/research/task-20260607T125626478811Z-c44436d7.md | Research task created for advisory investigation | Medium | Record research output |
| 2026-06-07T12:57:01Z | local memory record | analysis/local-memory-records.md | Prior local notes reviewed as fallback/advisory context | Medium | Validate against current evidence |
| 2026-06-07T13:09:48Z | research record | analysis/research/research-records.md | Research tagged MATCHED | Medium | Validate against current evidence |
| 2026-06-07T13:10:27Z | checkpoint recorded | analysis/checkpoint-analysis-20260607T131027937772Z-7b19ce16.md | Checkpoint for ANALYSIS | High | Use checkpoint to drive next decision |
| 2026-06-07T13:33:10Z | evaluator | analysis/evaluator-20260607T133310863524Z-d95534af.md | Proceed | High | Run the staged game under xvfb plus Wine on the Pwnbox and inspect generated state artifacts. |
| 2026-06-07T23:40:00Z | runtime preflight | analysis/runtime/runtime-preflight-20260607T234000Z.md | Pwnbox already had wine, xvfb-run, regedit, gdb, xwininfo, xwd/convert, and the extracted game was restaged without modifying originals. | High | Use isolated Wine prefix for bounded runtime validation. |
| 2026-06-07T23:42:24Z | first Wine launch | analysis/runtime/pwnbox-first-run.txt | Game created LocalLow/HackTheBox/HackTheBox CubeMadness1/Player.log and a game-specific Wine registry key; launch succeeded far enough to initialize Unity under Wine. | High | Pull prefix snapshot and inspect registry/file-backed state. |
| 2026-06-07T23:43:00Z | prefix snapshot review | analysis/runtime/pwnbox-prefix-snapshot/user.reg | The game-specific registry key only held screen/session values after first launch; no obvious persisted cube counter or flag value appeared there. | High | Pivot back toward live-memory or scene-object validation. |
| 2026-06-07T23:45:00Z | scene string correlation | analysis/static/scene-string-context.txt | level0 contains UI text Cubes: 0 / 20, confirming the likely win threshold is 20 and cubeCounter is a real scene object backed by CubeCounter in Assembly-CSharp.dll; FlagCheck is also present. | High | Inspect live scene/runtime state rather than broad static speculation. |
| 2026-06-07T23:52:23Z | visual runtime probe | analysis/runtime/pwnbox-screen-probe.txt | Wine/Xvfb produced a real HackTheBox CubeMadness1 window (1280x720), validating the live runtime path, but repeated capture attempts did not yet yield a reliable readable in-window scene/counter artifact. | Medium | Refine runtime capture or memory inspection around the live counter. |
| 2026-06-07T23:58:00Z | bounded memory probe | analysis/runtime/pwnbox-mem-probe.txt | Runtime-specific probing helper was prepared, but the current captured output did not yet surface the live Cubes: 0 / 20 string or a resolved mutable counter location. | Medium | Resume with tighter process-memory targeting or an approved minimal helper if needed. |
| 2026-06-08T00:01:00Z | live process-memory confirmation | analysis/runtime/pwnbox-mem-probe.txt | The actual HackTheBox CubeMadness1.exe process was resolved by GameAssembly.dll mapping and live memory now confirms writable occurrences of Cubes: 0 / 20, CubeCounter, and FlagCheck. | High | Use bounded runtime mutation rather than persisted-state editing. |
| 2026-06-08T00:12:00Z | Wine debugger attach validation | analysis/runtime/pwnbox-winedbg-symbol-probe.txt | winedbg can attach to the live Wine PID and enumerate loaded PE modules (gameassembly, unityplayer, main executable), but deferred module symbols do not directly expose GameAssembly!il2cpp_* for immediate symbol-based invocation. | High | Continue with bounded live memory mutation around validated runtime anchors. |
| 2026-06-08T00:21:00Z | live UI counter patch | analysis/runtime/pwnbox-mem-patch-ui20.txt | A bounded runtime mutation successfully rewrote the live Cubes: 0 / 20 buffers to Cubes: 20 / 20 in one UTF-8 and two UTF-16 locations inside the real game process. | High | Verify whether this reaches gameplay state or only the UI layer. |
| 2026-06-08T00:35:00Z | post-patch capture | analysis/runtime/pwnbox-patch-and-capture.txt, analysis/runtime/cubemadness1-root-postpatch.png, analysis/runtime/cubemadness1-root-postpatch-ocr.txt | Post-patch screenshot capture succeeded and OCR confirms the counter text changed, but the artifact did not contain a flag-shaped value, so the current patch likely affects the visible counter/UI layer only. | Medium | Isolate the underlying gameplay counter or perform a minimal runtime interaction after patching. |
| 2026-06-09T13:54:00Z | Unity texture extraction | solve/extract_flag_texture.py, analysis/texture-export-run.txt, analysis/texture-export/sharedassets0_35.png | Static asset extraction with UnityPy exported 85 textures; OCR of the large black/green flag texture recovered a valid flag-shaped value without needing further runtime mutation. | High | Capture through harness and complete. |
| 2026-06-08T00:44:00Z | remote connectivity blocker | local TCP/SSH check | The Pwnbox SSH service stopped responding (TCP22 timeout), blocking further live mutation, interaction, or harness flag capture in this session. | High | Resume from the current runtime artifacts once Pwnbox connectivity returns. |
| 2026-06-09T13:55:19Z | flag capture | loot/flag.txt | HTB-format flag captured; raw value kept in loot only | High | Write solution and run completion gate |
| 2026-06-09T13:57:39Z | completion gate | challenge-state.json | Completion gate passed; state marked COMPLETE | High | Optional sanitized memory summary approval |
| 2026-06-09T13:59:17Z | flag capture | loot/flag.txt | HTB-format flag captured; raw value kept in loot only | High | Write solution and run completion gate |
| 2026-06-09T13:59:17Z | completion gate | challenge-state.json | Completion gate passed; state marked COMPLETE | High | Optional sanitized memory summary approval |
Key Findings
- The public runtime-edit theory is validated enough to continue: the game launches in an isolated Wine/Xvfb environment on the Pwnbox and exposes a real window.
- The on-screen objective text is statically confirmed as
Cubes: 0 / 20, so the likely win threshold is 20 cubes. - Live process-memory probing against the real
HackTheBox CubeMadness1.exeprocess confirmed writable runtime occurrences ofCubes: 0 / 20,CubeCounter, andFlagCheck. - A bounded runtime mutation successfully changed the visible live counter text to
Cubes: 20 / 20, proving the runtime patch path works, but the post-patch screenshot/OCR did not yet surface a flag, which suggests the current patch is reaching the UI layer rather than the underlying gameplay counter. - The initial PlayerPrefs-style registry key only contains screen/session values after first launch, so the cheapest persisted-state shortcut was not confirmed.
- The remaining blocker in this session is environmental: the Pwnbox SSH port timed out before the next live mutation/interaction step could be completed.
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: CubeMadness1
- Difficulty: Very Easy
- Source workspace:
<local workspace>
Validated Solve Chain
Concepts only. Do not include raw flags, reusable credentials, tokens, cookies, private keys, or live secrets.
- Extract Unity
Texture2D/Spriteobjects fromglobalgamemanagers*andsharedassets0.assets. - OCR exported textures; CubeMadness1 contains the flag rendered as green text on black textures.
- Store the raw flag only in
loot/flag.txt; redact OCR transcripts and flag-bearing exported images inanalysis/.
Reusable Lessons
- For Unity GamePwn challenges, run asset extraction before spending time on deeper live-memory mutation.
- A live memory edit that changes UI text may not satisfy the underlying game state or win condition.
- If OCR is used, redact OCR artifacts outside
loot/.
Dead Ends
- Patching visible
Cubes: 0 / 20strings toCubes: 20 / 20proved runtime control but did not trigger flag display. - First-launch PlayerPrefs / Wine registry review did not expose a saved counter shortcut.
Tool Quirks
UnityPysuccessfully exported the relevant textures locally.tesseract --psm 6cleanly read the flag-shaped value from the exported texture.
Evidence Paths
solve/extract_flag_texture.pyanalysis/texture-export-run.txtanalysis/texture-export/ocr/loot/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 | Launch the Unity game live under Wine/Xvfb on the Pwnbox, identify the CubeCounter / FlagCheck runtime path, and mutate the live cube count until the 20-cube win condition triggers. | Runtime launch is validated; level0 contains Cubes: 0 / 20; assets/metadata expose cubeCounter, CubeCounter, and FlagCheck; first-launch registry state does not yet show a trivial persisted counter. | Exact live counter storage or mutable memory location still needs to be resolved. | Tighten runtime capture or process-memory targeting around the live Cubes: 0 / 20 counter and CubeCounter / FlagCheck objects. | High | Active |
Closed Branches
| Branch | Evidence Tested | Failure Output | Reason Closed | Revisit Condition |
|---|
Memory Summary
approval_required: true
Sanitized Memory Summary
Metadata
- Platform: HackTheBox Challenges
- Category: GamePwn
- Challenge: CubeMadness1
- Difficulty: Very Easy
- Source workspace:
<local workspace>
Validated Solve Chain
Concepts only. Do not include raw flags, reusable credentials, tokens, cookies, private keys, or live secrets.
- Extract Unity
Texture2D/Spriteobjects fromglobalgamemanagers*andsharedassets0.assets. - OCR exported textures; CubeMadness1 contains the flag rendered as green text on black textures.
- Store the raw flag only in
loot/flag.txt; redact OCR transcripts and flag-bearing exported images inanalysis/.
Reusable Lessons
- For Unity GamePwn challenges, run asset extraction before spending time on deeper live-memory mutation.
- A live memory edit that changes UI text may not satisfy the underlying game state or win condition.
- If OCR is used, redact OCR artifacts outside
loot/.
Dead Ends
- Patching visible `Cubes: <REDACTED>
- First-launch PlayerPrefs / Wine registry review did not expose a saved counter shortcut.
Tool Quirks
UnityPysuccessfully exported the relevant textures locally.tesseract --psm 6cleanly read the flag-shaped value from the exported texture.
Evidence Paths
solve/extract_flag_texture.pyanalysis/texture-export-run.txtanalysis/texture-export/ocr/loot/flag.txt
Ingestion Decision
- Proposed for LightRAG: yes
- Requires user approval before ingestion: yes
Notes
Notes
Scope
- Challenge: CubeMadness1
- Category: GamePwn
- Difficulty: Very Easy
- Mode: file
- Remote instance: none
- Start time: 2026-06-07T12:52:32Z
- 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/a12c7365-d876-403c-9f84-7b447eadc52e.zip | 21574149 | <hash redacted> | Zip archive data, at least v1.0 to extract, compression method=store | zip entries: 52 shown in artifact inventory JSON |
files/extracted/gamepwn_cubemadness1/GameAssembly.dll | 14764544 | <hash redacted> | PE32+ executable (DLL) (GUI) x86-64, for MS Windows | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1.exe | 653824 | <hash redacted> | PE32+ executable (GUI) x86-64, for MS Windows | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/Resources/unity default resources | 4844872 | <hash redacted> | data | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/Resources/unity_builtin_extra | 390644 | <hash redacted> | data | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/RuntimeInitializeOnLoads.json | 1146 | <hash redacted> | JSON data | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/ScriptingAssemblies.json | 3052 | <hash redacted> | JSON data | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/app.info | 34 | <hash redacted> | ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/boot.config | 86 | <hash redacted> | ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/globalgamemanagers | 61868 | <hash redacted> | data | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/globalgamemanagers.assets | 118948 | <hash redacted> | DIY-Thermocam raw data (Lepton 3.x), scale 0-0, spot sensor temperature 0.000000, unit celsius, color scheme 0, calibration: offset 0.000000, slope 8.000000 | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/globalgamemanagers.assets.resS | 5748736 | <hash redacted> | International EBCDIC text, with very long lines (65536), with no line terminators | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/Metadata/global-metadata.dat | 3206324 | <hash redacted> | data | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/Resources/mscorlib.dll-resources.dat | 337563 | <hash redacted> | data | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/2.0/Browsers/Compat.browser | 1605 | <hash redacted> | exported SGML document text, ASCII text, with CRLF, LF line terminators | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/2.0/DefaultWsdlHelpGenerator.aspx | 60575 | <hash redacted> | HTML document text, ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/2.0/machine.config | 29116 | <hash redacted> | XML 1.0 document text, ASCII text, with very long lines (541) | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/2.0/settings.map | 2622 | <hash redacted> | XML 1.0 document text, ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/2.0/web.config | 11686 | <hash redacted> | XML 1.0 document text, ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.0/Browsers/Compat.browser | 1605 | <hash redacted> | exported SGML document text, ASCII text, with CRLF, LF line terminators | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.0/DefaultWsdlHelpGenerator.aspx | 60575 | <hash redacted> | HTML document text, ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.0/machine.config | 33648 | <hash redacted> | XML 1.0 document text, ASCII text, with very long lines (541) | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.0/settings.map | 2622 | <hash redacted> | XML 1.0 document text, ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.0/web.config | 18848 | <hash redacted> | XML 1.0 document text, ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.5/Browsers/Compat.browser | 1605 | <hash redacted> | exported SGML document text, ASCII text, with CRLF, LF line terminators | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.5/DefaultWsdlHelpGenerator.aspx | 60575 | <hash redacted> | HTML document text, ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.5/machine.config | 34106 | <hash redacted> | XML 1.0 document text, ASCII text, with very long lines (541) | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.5/settings.map | 2622 | <hash redacted> | XML 1.0 document text, ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/4.5/web.config | 18857 | <hash redacted> | XML 1.0 document text, ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/browscap.ini | 311984 | <hash redacted> | ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/config | 3276 | <hash redacted> | ASCII text | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/il2cpp_data/etc/mono/mconfig/config.xml | 25817 | <hash redacted> | XML 1.0 document text, ASCII text, with very long lines (334) | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/level0 | 40100 | <hash redacted> | data | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/sharedassets0.assets | 1244732 | <hash redacted> | data | |
files/extracted/gamepwn_cubemadness1/HackTheBox CubeMadness1_Data/sharedassets0.assets.resS | 14648832 | <hash redacted> | data | |
files/extracted/gamepwn_cubemadness1/UnityCrashHandler64.exe | 1232984 | <hash redacted> | PE32+ executable (GUI) x86-64, for MS Windows | |
files/extracted/gamepwn_cubemadness1/UnityPlayer.dll | 28219992 | <hash redacted> | PE32+ executable (DLL) (console) x86-64, for MS Windows | |
files/extracted/gamepwn_cubemadness1/baselib.dll | 498776 | <hash redacted> | PE32+ executable (DLL) (console) x86-64, for MS Windows |
Evidence Ledger
| Time | Action | Output/File | Finding | Confidence | Next |
|---|---|---|---|---|---|
| 2026-06-07T12:52:32Z | harness init | challenge-state.json | Workspace initialized with deterministic state file | High | Inventory artifacts |
| 2026-06-07T12:52:54Z | artifact inventory | analysis/artifact-inventory.json | 38 artifact(s) inventoried | High | Build or update hypotheses |
| 2026-06-07T12: <REDACTED>, inspect Unity metadata/assets, then locate code or assets around cube collection and flag/win condition. | |||||
| 2026-06-07T12:53:17Z | research task | analysis/research/task-20260607T125317563142Z-adbd4093.md | Research task created for advisory investigation | Medium | Record research output |
| 2026-06-07T12:53:17Z | checkpoint recorded | analysis/checkpoint-hypothesis_ready-20260607T125317564671Z-9d66af51.md | Checkpoint for <secret redacted> | High | Use checkpoint to drive next decision |
| 2026-06-07T12:56:26Z | research task | analysis/research/task-20260607T125626478811Z-c44436d7.md | Research task created for advisory investigation | Medium | Record research output |
| 2026-06-07T12:57:01Z | local memory record | analysis/local-memory-records.md | Prior local notes reviewed as fallback/advisory context | Medium | Validate against current evidence |
| 2026-06-07T13:09:48Z | research record | analysis/research/research-records.md | Research tagged MATCHED | Medium | Validate against current evidence |
| 2026-06-07T13:10:27Z | checkpoint recorded | analysis/checkpoint-analysis-20260607T131027937772Z-7b19ce16.md | Checkpoint for ANALYSIS | High | Use checkpoint to drive next decision |
| 2026-06-07T13:33:10Z | evaluator | analysis/evaluator-20260607T133310863524Z-d95534af.md | Proceed | High | Run the staged game under xvfb plus Wine on the Pwnbox and inspect generated state artifacts. |
| 2026-06-07T23:40:00Z | runtime preflight | analysis/runtime/runtime-preflight-20260607T234000Z.md | Pwnbox already had wine, xvfb-run, regedit, gdb, xwininfo, xwd/convert, and the extracted game was restaged without modifying originals. | High | Use isolated Wine prefix for bounded runtime validation. |
| 2026-06-07T23:42:24Z | first Wine launch | analysis/runtime/pwnbox-first-run.txt | Game created LocalLow/HackTheBox/HackTheBox CubeMadness1/Player.log and a game-specific Wine registry key; launch succeeded far enough to initialize Unity under Wine. | High | Pull prefix snapshot and inspect registry/file-backed state. |
| 2026-06-07T23: <REDACTED> | |||||
| 2026-06-07T23:45:00Z | scene string correlation | analysis/static/scene-string-context.txt | level0 contains UI text Cubes: 0 / 20, confirming the likely win threshold is 20 and cubeCounter is a real scene object backed by CubeCounter in Assembly-CSharp.dll; FlagCheck is also present. | High | Inspect live scene/runtime state rather than broad static speculation. |
| 2026-06-07T23:52:23Z | visual runtime probe | analysis/runtime/pwnbox-screen-probe.txt | Wine/Xvfb produced a real HackTheBox CubeMadness1 window (1280x720), validating the live runtime path, but repeated capture attempts did not yet yield a reliable readable in-window scene/counter artifact. | Medium | Refine runtime capture or memory inspection around the live counter. |
| 2026-06-07T23:58:00Z | bounded memory probe | analysis/runtime/pwnbox-mem-probe.txt | Runtime-specific probing helper was prepared, but the current captured output did not yet surface the live Cubes: 0 / 20 string or a resolved mutable counter location. | Medium | Resume with tighter process-memory targeting or an approved minimal helper if needed. |
| 2026-06-08T00:01:00Z | live process-memory confirmation | analysis/runtime/pwnbox-mem-probe.txt | The actual HackTheBox CubeMadness1.exe process was resolved by GameAssembly.dll mapping and live memory now confirms writable occurrences of Cubes: 0 / 20, CubeCounter, and FlagCheck. | High | Use bounded runtime mutation rather than persisted-state editing. |
| 2026-06-08T00:12:00Z | Wine debugger attach validation | analysis/runtime/pwnbox-winedbg-symbol-probe.txt | winedbg can attach to the live Wine PID and enumerate loaded PE modules (gameassembly, unityplayer, main executable), but deferred module symbols do not directly expose GameAssembly!il2cpp_* for immediate symbol-based invocation. | High | Continue with bounded live memory mutation around validated runtime anchors. |
| 2026-06-08T00:21:00Z | live UI counter patch | analysis/runtime/pwnbox-mem-patch-ui20.txt | A bounded runtime mutation successfully rewrote the live Cubes: 0 / 20 buffers to Cubes: 20 / 20 in one UTF-8 and two UTF-16 locations inside the real game process. | High | Verify whether this reaches gameplay state or only the UI layer. |
2026-06-08T00: <REDACTED>, analysis/runtime/cubemadness1-root-postpatch.png, analysis/runtime/cubemadness1-root-postpatch-ocr.txt | Post-patch screenshot capture succeeded and OCR confirms the counter text changed, but the artifact did not contain a flag-shaped value, so the current patch likely affects the visible counter/UI layer only. | Medium | Isolate the underlying gameplay counter or perform a minimal runtime interaction after patching. | ||
2026-06-09T13: <REDACTED>, analysis/texture-export-run.txt, analysis/texture-export/sharedassets0_35.png | Static asset extraction with UnityPy exported 85 textures; OCR of the large black/green flag texture recovered a valid flag-shaped value without needing further runtime mutation. | High | Capture through harness and complete. | ||
| 2026-06-08T00: <REDACTED>, blocking further live mutation, interaction, or harness flag capture in this session. | High | Resume from the current runtime artifacts once Pwnbox connectivity returns. | |||
| 2026-06-09T13: <REDACTED> | |||||
| 2026-06-09T13:57:39Z | completion gate | challenge-state.json | Completion gate passed; state marked COMPLETE | High | Optional sanitized memory summary approval |
| 2026-06-09T13: <REDACTED> | |||||
| 2026-06-09T13:59:17Z | completion gate | challenge-state.json | Completion gate passed; state marked COMPLETE | High | Optional sanitized memory summary approval |
Key Findings
- The public runtime-edit theory is validated enough to continue: the game launches in an isolated Wine/Xvfb environment on the Pwnbox and exposes a real window.
- The on-screen objective text is statically confirmed as
Cubes: 0 / 20, so the likely win threshold is 20 cubes. - Live process-memory probing against the real
HackTheBox CubeMadness1.exeprocess confirmed writable runtime occurrences ofCubes: 0 / 20,CubeCounter, andFlagCheck. - A bounded runtime mutation successfully changed the visible live counter text to `Cubes: <REDACTED>, proving the runtime patch path works, but the post-patch screenshot/OCR did not yet surface a flag, which suggests the current patch is reaching the UI layer rather than the underlying gameplay counter.
- The initial PlayerPrefs-style registry key only contains screen/session values after first launch, so the cheapest persisted-state shortcut was not confirmed.
- The remaining blocker in this session is environmental: the Pwnbox SSH port timed out before the next live mutation/interaction step could be completed.
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.
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 CubeMadness1, 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.