Challenge / Reversing

ARMs Race

ARMs Race is a sanitized challenge note from the local HTB archive, organized for quick review by category, difficulty, evidence flow, and reusable operator

EasyPublished 2025-06-07Sanitized local writeup

Scenario

ARMs Race attack path

ARMs Race 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 Reversing evidence, validation, and reusable operator lessons.

ARMs Race sanitized attack graph

Walkthrough flow

01

Binary triage

02

Control-flow recovery

03

Key logic reconstruction

04

Proof captured

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.

100% coverage
Evidence verdict

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.

  • Reversing/ARMs-Race/writeup.md
  • htb-challenge/Reversing/ARMs-Race/notes.md
  • htb-challenge/Reversing/ARMs-Race/memory-summary.md
  • htb-challenge/Reversing/ARMs-Race/hypothesis-board.md
  • HTB/_knowledge/exports/ctf-lightrag-latest-203412/documents/challenge__Reversing__ARMs-Race__memory-summary.md.e9168d5260.md
  • HTB/_knowledge/exports/ctf-lightrag-latest-203412/documents/challenge__Reversing__ARMs-Race__notes.md.f4a65df5e4.md

Technical Walkthrough

Writeup

Challenge

  • Name: ARMs-Race
  • Category: Reversing
  • Difficulty: Easy
  • Mode: remote

Summary

The remote service sends 50 levels of ARM machine-code snippets. For each level it asks for the final value of a named ARM register. The solve is to parse the hex blob, emulate it in ARM mode, read the requested register, and submit the unsigned decimal value.

Artifact Inventory

  • Remote service: <TARGET>:32727.
  • No local archive was provided for this challenge.
  • Initial remote probe: analysis/remote/initial-probe.bin.
  • Redacted solver transcript: analysis/remote/solver-transcript-redacted.txt.

Analysis

The first probe showed the protocol shape:

text
Level 1/50: <hex ARM code>
Register r0:

The hex decoded to little-endian ARM instructions. The first level was locally validated with Capstone and Unicorn; the validation output is stored in analysis/remote/level1-emulation-validation.txt.

The solver uses:

  • Unicorn <secret redacted> / <secret redacted>
  • a mapped code page at 0x10000
  • a mapped stack at 0x30000
  • zero-initialized registers except sp
  • emu_start(base, base + len(code))

After emulation, the requested register is read and returned as an unsigned 32-bit decimal integer. This repeated cleanly through 50 levels.

The RAG query returned no useful prior match, so it was recorded as MISSING; local protocol evidence and Unicorn validation were used as the evidence basis.

Solve

Run:

bash
Reversing/ARMs-Race/.venv/bin/python Reversing/ARMs-Race/solve/solve.py

The solver:

  1. Connects to the remote service.
  2. Reads until a level/register prompt is found.
  3. Extracts the ARM hex blob and requested register.
  4. Emulates the blob with Unicorn.
  5. Sends the register value.
  6. Repeats until the final flag is returned.

Outputs:

  • loot/flag-candidate.txt
  • loot/remote-transcript.raw
  • analysis/remote/solver-transcript-redacted.txt
  • analysis/remote/solve-summary.json

The harness captured the validated flag into loot/flag.txt.

Flag

Raw flag is stored in loot/flag.txt and intentionally not reproduced here.

Lessons

  • For remote reversing challenges that provide executable snippets, emulation is usually safer than hand-decoding or symbolic guessing.
  • Keep raw service transcripts under loot/ if a flag may appear; maintain a redacted transcript under analysis/ for writeup and audit.
  • Returning unsigned 32-bit register values matched the service format for all levels.

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: ARMs-Race
  • Category: Reversing
  • Difficulty: Easy
  • Mode: remote
  • Remote instance: <TARGET>:32727
  • Start time: 2026-06-09T10:10: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

FileSizeSHA256TypeNotes
0remote-only or no provided filesNo local artifacts found under files/

Evidence Ledger

TimeActionOutput/FileFindingConfidenceNext
2026-06-09T10:10:32Zharness initchallenge-state.jsonWorkspace initialized with deterministic state fileHighInventory artifacts
2026-06-09T10:10:32Zartifact inventoryanalysis/artifact-inventory.json0 artifact(s) inventoriedHighBuild or update hypotheses
2026-06-09T10:10:32Zhypothesis recordedhypothesis-board.mdReverse the remote multi-level ARM puzzle protocol and automate all rounds to capture the flag.MediumConnect once, save the banner/protocol transcript, identify data format and expected answer per level, then script a deterministic solver.
2026-06-09T10:10:53Zcheckpoint recordedanalysis/checkpoint-triage-20260609T101053644390Z-e708a8ee.mdCheckpoint for TRIAGEHighUse checkpoint to drive next decision
2026-06-09T10:11:23ZRAG queryanalysis/rag/rag-query-20260609T101115524950Z-cd009092.txtRAG helper exited 0; output savedMediumRecord retrieval tag and validation
2026-06-09T10:12:21ZRAG recordanalysis/rag-records.mdRetrieved memory tagged MISSINGMediumValidate or reject with live evidence
2026-06-09T10:12:22Zlocal memory recordanalysis/local-memory-records.mdPrior local notes reviewed as fallback/advisory contextMediumValidate against current evidence
2026-06-09T10:12:22Zevaluatoranalysis/evaluator-20260609T101222060911Z-4c4bb9c8.mdProceedHighRun reproducible Unicorn-based remote solver against <TARGET>:32727.
2026-06-09T10:13:51Zflag captureloot/flag.txtHTB-format flag captured; raw value kept in loot onlyHighWrite solution and run completion gate
2026-06-09T10:14:25Zcompletion gatechallenge-state.jsonCompletion gate passed; state marked COMPLETEHighOptional sanitized memory summary approval

Key Findings

  • Remote service at <TARGET>:32727 sends lines shaped like Level N/50: <hex ARM code> followed by Register rX:.
  • The first probe saved the raw banner and first challenge to analysis/remote/initial-probe.bin.
  • Level 1 contained 476 bytes of little-endian ARM mode code and requested r0.
  • Workspace-local unicorn and capstone were installed in .venv for deterministic emulation/disassembly.
  • Local validation emulated the first ARM blob successfully and produced an unsigned register value; see analysis/remote/level1-emulation-validation.txt.
  • Planned solver loop: parse each level, map requested rN to the corresponding Unicorn ARM register, emulate the blob, submit the unsigned decimal register value, and repeat through 50 levels.
  • Reproducible solver completed 50/50 levels against the remote service; see analysis/remote/solve-summary.json.
  • Raw transcript is stored in loot/remote-transcript.raw; a redacted copy is stored in analysis/remote/solver-transcript-redacted.txt.
  • Harness captured the final flag into loot/flag.txt.

RAG / Advisory Memory

RAG output is advisory only. Record evaluated retrievals with:

bash
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: Reversing
  • Challenge: ARMs-Race
  • Difficulty: Easy
  • Source workspace: <local 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

Keep no more than 3 active hypotheses on Easy/Medium and 5 on Hard unless the user explicitly asks for breadth.

RankPathEvidenceMissing ProofCheapest ValidationConfidenceStatus
1Reverse the remote multi-level ARM puzzle protocol and automate all rounds to capture the flag.Challenge is Reversing, remote-only, and scenario references an ARMs race plus a server sending mysterious data.Connect once, save the banner/protocol transcript, identify data format and expected answer per level, then script a deterministic solver.MediumActive

Closed Branches

BranchEvidence TestedFailure OutputReason ClosedRevisit Condition

Memory Summary

approval_required: true

Sanitized Memory Summary

Metadata

  • Platform: HackTheBox Challenges
  • Category: Reversing
  • Challenge: ARMs-Race
  • Difficulty: Easy
  • Source workspace: <local 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

Notes

Notes

Scope

  • Challenge: ARMs-Race
  • Category: Reversing
  • Difficulty: Easy
  • Mode: remote
  • Remote instance: <TARGET>:32727
  • Start time: 2026-06-09T10:10: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

FileSizeSHA256TypeNotes
0remote-only or no provided filesNo local artifacts found under files/

Evidence Ledger

TimeActionOutput/FileFindingConfidenceNext
2026-06-09T10:10:32Zharness initchallenge-state.jsonWorkspace initialized with deterministic state fileHighInventory artifacts
2026-06-09T10:10:32Zartifact inventoryanalysis/artifact-inventory.json0 artifact(s) inventoriedHighBuild or update hypotheses
2026-06-09T10: <REDACTED>, save the banner/protocol transcript, identify data format and expected answer per level, then script a deterministic solver.
2026-06-09T10:10:53Zcheckpoint recordedanalysis/checkpoint-triage-20260609T101053644390Z-e708a8ee.mdCheckpoint for TRIAGEHighUse checkpoint to drive next decision
2026-06-09T10:11:23ZRAG queryanalysis/rag/rag-query-20260609T101115524950Z-cd009092.txtRAG helper exited 0; output savedMediumRecord retrieval tag and validation
2026-06-09T10:12:21ZRAG recordanalysis/rag-records.mdRetrieved memory tagged MISSINGMediumValidate or reject with live evidence
2026-06-09T10:12:22Zlocal memory recordanalysis/local-memory-records.mdPrior local notes reviewed as fallback/advisory contextMediumValidate against current evidence
2026-06-09T10:12:22Zevaluatoranalysis/evaluator-20260609T101222060911Z-4c4bb9c8.mdProceedHighRun reproducible Unicorn-based remote solver against <TARGET>:32727.
2026-06-09T10: <REDACTED>
2026-06-09T10:14:25Zcompletion gatechallenge-state.jsonCompletion gate passed; state marked COMPLETEHighOptional sanitized memory summary approval

Key Findings

  • Remote service at <TARGET>:32727 sends lines shaped like Level N/50: <hex ARM code> followed by Register rX:.
  • The first probe saved the raw banner and first challenge to analysis/remote/initial-probe.bin.
  • Level 1 contained 476 bytes of little-endian ARM mode code and requested r0.
  • Workspace-local unicorn and capstone were installed in .venv for deterministic emulation/disassembly.
  • Local validation emulated the first ARM blob successfully and produced an unsigned register value; see analysis/remote/level1-emulation-validation.txt.
  • Planned solver loop: parse each level, map requested rN to the corresponding Unicorn ARM register, emulate the blob, submit the unsigned decimal register value, and repeat through 50 levels.
  • Reproducible solver completed 50/50 levels against the remote service; see analysis/remote/solve-summary.json.
  • Raw transcript is stored in loot/remote-transcript.raw; a redacted copy is stored in analysis/remote/solver-transcript-redacted.txt.
  • Harness captured the final flag into loot/flag.txt.

RAG / Advisory Memory

RAG output is advisory only. Record evaluated retrievals with:

bash
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 it like taking apart a small appliance on a workbench. You do not need every screw at once; you trace the control path and rebuild just enough logic to make it reveal the answer.

For ARMs Race, 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.