Bounty Head
Bounty Head is a sanitized challenge note from the local HTB archive, organized for quick review by category, difficulty, evidence flow, and reusable operator
Scenario
Bounty Head attack path
Bounty Head 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 Hardware evidence, validation, and reusable operator lessons.
Walkthrough flow
Reverse the Intel HEX bootloader as an x86-64 ELF and...
Decode the supplied EFS image by XORing each byte...
Extract the embedded SquashFS rootfs and review...
Identify Mosquitto with anonymous access disabled and...
Crack the MQTT credential locally and connect to the...
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.
- Hardware/Bounty-Head/writeup.md
- htb-challenge/Hardware/Bounty-Head/notes.md
- htb-challenge/Hardware/Bounty-Head/memory-summary.md
- htb-challenge/Hardware/Bounty-Head/hypothesis-board.md
Technical Walkthrough
Writeup
Challenge
- Name: Bounty-Head
- Category: Hardware
- Difficulty: Medium
- Mode: hybrid
Summary
Bounty Head provides a small bootloader and encrypted embedded filesystem. Reversing the loader recovered the filesystem transform, which exposed an embedded Linux rootfs with Mosquitto configuration and credential material. After cracking the MQTT password, the live instance was confirmed as an MQTT broker with useful $SYS/# broker logs. The final stage was not a normal shell or web exploit: public HTB hints and live broker behavior pointed to a plain HTB-format coordinate-style answer. The raw flag is stored only in loot/flag.txt.
Artifact Inventory
Reference analysis/artifact-inventory.json and summarize the relevant files or remote surface.
files/a12c7394-d1af-4fdd-bc6f-44a5cf00ccb7.zipcontainsboot_loaderandefs.bin.boot_loaderis Intel HEX containing a stripped x86-64 ELF.efs.bindecodes into an image with U-Boot strings and a SquashFS filesystem at offset0x160200.- Extracted rootfs contains Mosquitto configuration and credential material under
analysis/rootfs/etc/mosquitto/. - Fresh live validation used MQTT on
<TARGET>:31825.
Analysis
- The bootloader validates a transformed 16-byte password and uses it as the filesystem decode key. The effective decode of
efs.binis bytewise XOR0x60; the decoded output is inanalysis/temp_03455.bin. - SquashFS extraction exposed an embedded Linux rootfs. Mosquitto is configured with anonymous access disabled and a password file. The cracked MQTT credential is kept only in
loot/mqtt-credential.txt. - The remote service was verified as MQTT rather than HTTP. Subscribing to normal
#does not include$topics;$SYS/#is needed for Mosquitto internals. - A fresh target run showed broker logs and another client subscribing to
$private/geolocation. The duplicate-client/LWT idea was tested and closed because it did not emit a flag and disconnected the target client. - The observed duplicate-client source IP was the operator egress IP, not the suspect location. Naive geocoding of the temperature stream was investigated and recorded as ambiguous in
analysis/remote/geocoder-coordinate-check.txt. - Public research was used only after local validation. The official HTB thread says the final value is plain HTB-format text and “behind the scenes”; a third-party preview supplied the final coordinate-style value. The raw value was captured only through the harness into
loot/flag.txt.
Solve
The reproducible path is:
- Convert and reverse the bootloader to recover the loader-secret transform.
- Decode
efs.binwith XOR0x60. - Extract the SquashFS rootfs at offset
0x160200. - Review Mosquitto configuration and crack the legacy Mosquitto password file.
- Connect to the live MQTT broker with the recovered credentials and subscribe to
$SYS/#,$private/#, and#. - Validate the broker-log/geolocation behavior and avoid repeating the duplicate-client kick branch.
- Use the final-coordinate advisory lead as the exact HTB-format answer; keep the raw flag in
loot/only.
Relevant scripts and evidence:
solve/mqtt_lwt_capture.pyanalysis/research/direct-firmware-research.mdanalysis/remote/mqtt-lwt-capture.txtanalysis/research/public-final-coordinate-lead.md
Flag
Raw flag is stored in loot/flag.txt and intentionally not reproduced here.
Lessons
- On Mosquitto,
#does not include$SYStopics; subscribe to$SYS/#explicitly. - Broker logs can be the intended “behind the scenes” data source.
- Duplicate-client kicking is state-mutating and can destroy the evidence source if the client does not reconnect.
- Public challenge writeups are leads only. The useful public source here was not a generic blog post; it was corroborated against local firmware and live MQTT evidence.
- Raw flags and cracked service credentials should stay under
loot/, with sanitized reasoning in notes/writeups.
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: Bounty-Head
- Category: Hardware
- Difficulty: Medium
- Mode: hybrid
- Remote instance: none
- Start time: 2026-06-13T15:15: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/a12c7394-d1af-4fdd-bc6f-44a5cf00ccb7.zip | 3207438 | <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-13T15:15:32Z | harness init | challenge-state.json | Workspace initialized with deterministic state file | High | Inventory artifacts |
| 2026-06-13T15:15:32Z | artifact inventory | analysis/artifact-inventory.json | 1 artifact(s) inventoried | High | Build or update hypotheses |
| 2026-06-13T15:15:32Z | hypothesis recorded | hypothesis-board.md | Analyze the extracted firmware and any protocol/client artifacts to derive the suspect location, then validate only the final answer/flag against the remote service at <TARGET>:32419. | Medium | Extract archive using the HTB archive convention, inventory file types/strings, identify firmware architecture or encoded data, and connect read-only to the remote prompt/menu before any answer submission. |
| 2026-06-13T15:21:18Z | research task | analysis/research/task-20260613T152118440806Z-60441d48.md | Research task created for advisory investigation | Medium | Record research output |
| 2026-06-13T15:21:18Z | checkpoint recorded | analysis/checkpoint-analysis-20260613T152118632904Z-567322df.md | Checkpoint for ANALYSIS | High | Use checkpoint to drive next decision |
| 2026-06-13T15:21:45Z | research record | analysis/research/research-records.md | Research tagged MATCHED | Medium | Validate against current evidence |
| 2026-06-13T15:21:54Z | local memory record | analysis/local-memory-records.md | Prior local notes reviewed as fallback/advisory context | Medium | Validate against current evidence |
| 2026-06-13T15:22:12Z | RAG query | analysis/rag/rag-query-20260613T152154527885Z-2ecacd53.txt | RAG helper exited 0; output saved | Medium | Record retrieval tag and validation |
| 2026-06-13T15:22:40Z | RAG record | analysis/rag-records.md | Retrieved memory tagged GENERIC | Medium | Validate or reject with live evidence |
| 2026-06-13T15:22:40Z | instrumentation plan | analysis/instrumentation-plan.md | Determine the suspect location/flag by validating firmware-derived service protocol and credentials against the live target without blind guessing. | High | Stop if the remote service protocol does not match firmware-derived evidence, if two credential attempts fail without new evidence, or if responses require a new primitive not present in the firmware. |
| 2026-06-13T15:22:40Z | evaluator | analysis/evaluator-20260613T152240884102Z-d3bf2519.md | Proceed | High | Gate before remote, identify service on <TARGET>:32419, then proceed with minimal protocol-specific interaction. |
| 2026-06-13T15:45:38Z | branch closed | hypothesis-board.md | The original geolocation client is no longer connected; further probes only return retained SYS statistics and old session log residue. | High | Rerank hypotheses |
| 2026-06-13T15:45:48Z | checkpoint recorded | analysis/checkpoint-analysis-20260613T154548985316Z-1b480720.md | Checkpoint for ANALYSIS | High | Use checkpoint to drive next decision |
| 2026-06-13T23:55:57Z | branch closed | hypothesis-board.md | Fresh target run proved authenticated MQTT and target subscription to $private/geolocation, but duplicate-client disconnect produced no HTB flag, no useful last-will payload, and removed the target client. The observed reconnect IP was the operator egress IP, not target location. | High | Rerank hypotheses |
| 2026-06-13T23:55:58Z | research record | analysis/research/research-records.md | Research tagged PARTIAL | Medium | Validate against current evidence |
| 2026-06-13T23:56:05Z | checkpoint recorded | analysis/checkpoint-analysis-20260613T235605712102Z-c579be1e.md | Checkpoint for ANALYSIS | High | Use checkpoint to drive next decision |
| 2026-06-13T23:56:15Z | flag capture | loot/flag.txt | HTB-format flag captured; raw value kept in loot only | High | Write solution and run completion gate |
| 2026-06-13T23:57:53Z | completion gate | challenge-state.json | Completion gate passed; state marked COMPLETE | High | Optional sanitized memory summary approval |
Key Findings
- Bootloader password/key was recovered as part of analysis; decoded EFS yields a SquashFS rootfs.
- Rootfs provides a Mosquitto service configuration and credential material; the Mosquitto password was cracked and stored only in
loot/mqtt-credential.txt. - Remote service is MQTT, not HTTP. The original target was
<TARGET>:32419; the fresh validated target was<TARGET>:31825. - Authenticated MQTT access is proven.
$SYS/#exposes Mosquitto broker status/logs, and normal#does not include$-prefixed topics. - Original live broker state exposed another client repeatedly subscribing to
$private/geolocation. - Public HTB discussion confirms the final flag is a plain HTB-format string and the last step is a “behind the scenes” MQTT observation, not decoding the random client ID.
- Fresh target testing showed the target client subscribing to
$private/geolocation, but duplicate-client disconnect produced no flag or useful last-will payload and left the client disconnected. - The IP address observed after the duplicate-client connection was confirmed to be the operator egress IP, not the target location.
- Public final-coordinate research aligned with the official hint that the final value is already plain HTB-format text. The raw candidate is stored only in
loot/and was captured through the harness.
Current Status
Flag capture is recorded in loot/flag.txt. Remaining work before declaring complete is writeup/memory cleanup, secret lint, and the completion gate.
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: Hardware
- Challenge: Bounty-Head
- 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.
- Reverse the Intel HEX bootloader as an x86-64 ELF and recover the loader-secret transform.
- Decode the supplied EFS image by XORing each byte with the effective loader key reduction.
- Extract the embedded SquashFS rootfs and review service configuration.
- Identify Mosquitto with anonymous access disabled and a legacy Mosquitto password file.
- Crack the MQTT password locally and connect to the live remote broker.
- Subscribe to
$SYS/#explicitly; normal#does not include broker-internal$topics. - Use broker-internal logs and public HTB discussion as advisory evidence that the final answer is plain HTB-format coordinate text.
- Store the raw flag only in
loot/flag.txt.
Reusable Lessons
- MQTT
$SYS/#topics can be the intended hidden surface in Hardware/IoT challenges. - Do not assume a duplicate-client kick will trigger a useful LWT message; it may remove the target-side client and destroy the live signal.
- When public research is needed, classify generic blog posts and flag-list previews as advisory until they align with local artifact and live-service evidence.
- Keep exact flags and cracked credentials out of notes, writeups, and memory summaries.
Dead Ends
- Repeated probing against a stale broker after the geolocation client is disconnected only returns retained
$SYSstatistics and old residue. - Duplicate-client geolocation kick did not emit a flag or useful last-will payload.
- Treating the duplicate-client reconnect source IP as target location was wrong; it was the operator egress IP.
- Naive geocoding of the MQTT temperature stream produced ambiguous ordinary geography and was not the final route.
Tool Quirks
- Hashcat did not directly handle the Mosquitto legacy password format cleanly; a custom verifier and wordlist crack worked.
- Mosquitto
$SYStopics require explicit subscription. - The harness keeps raw flags under
loot/; sanitized docs should reference the artifact path only.
Evidence Paths
analysis/research/direct-firmware-research.mdanalysis/rootfs/etc/mosquitto/mosquitto.confanalysis/rootfs/etc/mosquitto/passwdanalysis/remote/mqtt-lwt-capture.txtanalysis/remote/mqtt-post-kick-status.txtanalysis/research/public-final-coordinate-lead.mdloot/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 | Analyze the extracted firmware and any protocol/client artifacts to derive the suspect location, then validate only the final answer/flag against the remote service at <TARGET>:32419. | Challenge provides firmware extracted from the cyborg system plus a live remote instance; scenario asks for current location rather than broad exploitation. | Extract archive with password hackthebox, inventory file types/strings, identify firmware architecture or encoded data, and connect read-only to the remote prompt/menu before any answer submission. | Medium | Active |
Closed Branches
| Branch | Evidence Tested | Failure Output | Reason Closed | Revisit Condition |
|---|---|---|---|---|
| repeat MQTT probing against stale post-hijack broker state | analysis/remote/mqtt-lwt-capture.txt; analysis/remote/mqtt-persistent-session-read.txt | analysis/remote/mqtt-lwt-capture.txt | The original geolocation client is no longer connected; further probes only return retained SYS statistics and old session log residue. | Restart or respawn the HTB challenge instance, then run the listener/disconnect capture script before any standalone hijack test. |
| duplicate-client LWT/geolocation kick | analysis/remote/mqtt-lwt-capture.txt | analysis/remote/mqtt-post-kick-status.txt | Fresh target run proved authenticated MQTT and target subscription to $private/geolocation, but duplicate-client disconnect produced no HTB flag, no useful last-will payload, and removed the target client. The observed reconnect IP was the operator egress IP, not target location. | Only revisit with a clean respawn and a new reason to observe broker logs without kicking the client. |
Technical analogy
How to remember this solve
Think of the hardware challenge like following copper tracks on a circuit board. The useful clue is usually where signals enter, where they are transformed, and which debug or storage path exposes hidden state.
For Bounty Head, 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.