Challenge / Mobile

Cat

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

EasyPublished 2025-01-21Sanitized local writeup

Scenario

Cat attack path

Cat 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 Mobile evidence, validation, and reusable operator lessons.

Cat sanitized attack graph

Walkthrough flow

01

Extract ZIP with the standard HTB archive credential.

02

Parse the Android Backup header and zlib-decompress...

03

Extract the tar and inspect shared media under...

04

Generate a contact sheet of the six JPEGs.

05

Inspect jpg, a non-cat photo of a person holding a...

Source coverage

High source coverage

Status: complete. This article is generated from 5 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.

  • Mobile/Cat/writeup.md
  • htb-challenge/Mobile/Cat/notes.md
  • htb-challenge/Mobile/Cat/memory-summary.md
  • htb-challenge/Mobile/Cat/hypothesis-board.md
  • HTB/_knowledge/exports/ctf-lightrag-latest-203412/documents/challenge__Mobile__Cat__notes.md.bc7de6af75.md

Technical Walkthrough

Writeup

Challenge

  • Name: Cat
  • Category: Mobile
  • Difficulty: Easy
  • Mode: file

Summary

The ZIP contained an Android Backup rather than an APK. The backup was unencrypted and compressed, so it could be converted into a tar filesystem dump. Text/database sweeps did not reveal the flag, but the shared pictures included one photo of a person holding a document. A crop of that document exposed the HTB-format flag visually.

Artifact Inventory

  • files/a12c738e-651a-4123-af7d-df2c5c9ea38d.zip: original challenge ZIP.
  • analysis/extracted/cat.ab: Android Backup, version 5, compressed, not encrypted.
  • analysis/cat-backup.tar: decompressed backup payload.
  • analysis/backup-tar/shared/0/Pictures/<secret redacted>jpg: image containing the visual leak.

Analysis

The archive listing in analysis/archive-listing.txt showed a single cat.ab artifact. The Android Backup header in analysis/android-backup-header.txt showed compression enabled and no encryption, so the payload was zlib-decompressed into analysis/cat-backup.tar and extracted under analysis/backup-tar/.

A broad leak sweep over extracted files, SQLite databases, and simple image metadata was recorded in analysis/leak-keyword-sweep.txt, analysis/sqlite-files.txt, and the image metadata outputs. That did not produce a direct text flag.

The contact sheet at analysis/pictures-contact-sheet.jpg showed five cat photos and one photo of a person holding a document. Focused crops under analysis/image-crops/ showed that the lower-left area of the document contains the HTB-format flag.

Solve

Run:

bash
cd <local workspace>
python3 solve/solve.py

The script extracts the ZIP, parses the Android Backup, decompresses the tar payload, extracts the filesystem, and regenerates analysis/reproduce/flag-proof-crop.jpg. The flag is then manually transcribed from that proof crop and captured with the harness. OCR was tested but was not reliable enough for an automatic solve because the text is angled and blurred.

Flag

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

Lessons

For Mobile challenges, do not assume APK-first. Android Backup artifacts can be directly parseable when unencrypted, and user media may be the actual leak source even when app databases and shared preferences are uninteresting.

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: Cat
  • Category: Mobile
  • Difficulty: Easy
  • Mode: file
  • Remote instance: none
  • Start time: 2026-06-10T13:03:20Z
  • 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
files/a12c738e-651a-4123-af7d-df2c5c9ea38d.zip4222847<hash redacted>Zip archive data, at least v2.0 to extract, compression method=deflatezip entries: 1 shown in artifact inventory JSON

Evidence Ledger

TimeActionOutput/FileFindingConfidenceNext
2026-06-10T13:03:20Zharness initchallenge-state.jsonWorkspace initialized with deterministic state fileHighInventory artifacts
2026-06-10T13:03:20Zartifact inventoryanalysis/artifact-inventory.json1 artifact(s) inventoriedHighBuild or update hypotheses
2026-06-10T13:03:20Zhypothesis recordedhypothesis-board.mdStatic mobile artifact leakage: recover the HTB-format flag or a decode path from APK resources/assets/manifest/decompiled code.MediumExtract the archive, identify the app artifact, decompile/list resources, and search for flag-like or encoded leaked constants without printing raw flags to chat.
2026-06-10T13:03:20Zresearch skipanalysis/research/research-skip.mdResearch intentionally skipped with recorded reasonMediumGate before exploit
2026-06-10T13:04:03ZAndroid Backup extractionanalysis/cat-backup.tar, analysis/backup-tar-list.txtZIP contained cat.ab, an unencrypted compressed Android Backup that expands to a tar filesystem dump.HighInspect app data and shared pictures
2026-06-10T13:04:35Zleak sweepanalysis/leak-keyword-sweep.txt, analysis/sqlite-files.txtNo direct text/database HTB-format hit; backup contains six shared JPEGs and minor stock app data.HighInspect image content and metadata
2026-06-10T13:05:20Zimage triageanalysis/pictures-contact-sheet.jpgOne non-cat image, <secret redacted>jpg, shows a person holding a document with visible leaked text.HighCrop and enhance the document area
2026-06-10T13:06:10Zproof cropanalysis/image-crops/imag0004-flag-bottom-enhanced.jpgThe HTB-format flag is visible on the lower-left part of the photographed document.HighCapture transcribed flag via harness
2026-06-10T13:06:28Zflag captureloot/flag.txtHTB-format flag captured; raw value kept in loot onlyHighWrite solution and run completion gate
2026-06-10T13:08:10Zreproducible solversolve/solve.py, analysis/solve-run.txtSolver extracts the Android Backup and regenerates the proof crop; manual transcription is required due blurred angled photo.HighRun completion gate
2026-06-10T13:09:23Zcompletion gatechallenge-state.jsonCompletion gate passed; state marked COMPLETEHighOptional sanitized memory summary approval

Key Findings

  • cat.ab is Android Backup version 5, compressed, and not encrypted; header is recorded in analysis/android-backup-header.txt.
  • The backup expands into shared pictures plus stock Android app data. Direct string, SQLite, and simple metadata sweeps did not expose a text flag.
  • The intended leak is visual: shared/0/Pictures/<secret redacted>jpg contains a photographed document with the HTB-format flag visible near the lower-left page edge.
  • The solved flag is stored only in 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

Cat was an Easy Mobile challenge where the downloadable ZIP contained an unencrypted compressed Android Backup (cat.ab), not an APK. The Android Backup header showed version 5, compression enabled, and encryption method none; zlib-decompressing the payload produced a tar filesystem dump.

The useful path was:

  1. Extract ZIP with the standard HTB archive password.
  2. Parse the Android Backup header and zlib-decompress the payload to tar.
  3. Extract the tar and inspect shared media under shared/0/Pictures/.
  4. Generate a contact sheet of the six JPEGs.
  5. Inspect <secret redacted>jpg, a non-cat photo of a person holding a document.
  6. Crop/enhance the lower-left area of the document; the HTB-format flag is visually leaked there.

Reusable lesson: for Mobile "leak" challenges, include Android Backup parsing and shared-media visual review before going deep on APK tooling. Direct string and SQLite sweeps may be negative even when the flag is plainly visible in backed-up user photos.

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
1Static mobile artifact leakage: recover the HTB-format flag or a decode path from APK resources/assets/manifest/decompiled code.Challenge is Mobile/Easy with scenario 'Easy leaks' and only one downloadable ZIP artifact.Extract the archive, identify the app artifact, decompile/list resources, and search for flag-like or encoded leaked constants without printing raw flags to chat.MediumActive

Closed Branches

BranchEvidence TestedFailure OutputReason ClosedRevisit Condition

Notes

Notes

Scope

  • Challenge: Cat
  • Category: Mobile
  • Difficulty: Easy
  • Mode: file
  • Remote instance: none
  • Start time: 2026-06-10T13:03:20Z
  • 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
files/a12c738e-651a-4123-af7d-df2c5c9ea38d.zip4222847<hash redacted>Zip archive data, at least v2.0 to extract, compression method=deflatezip entries: 1 shown in artifact inventory JSON

Evidence Ledger

TimeActionOutput/FileFindingConfidenceNext
2026-06-10T13:03:20Zharness initchallenge-state.jsonWorkspace initialized with deterministic state fileHighInventory artifacts
2026-06-10T13:03:20Zartifact inventoryanalysis/artifact-inventory.json1 artifact(s) inventoriedHighBuild or update hypotheses
2026-06-10T13: <REDACTED>, identify the app artifact, decompile/list resources, and search for flag-like or encoded leaked constants without printing raw flags to chat.
2026-06-10T13:03:20Zresearch skipanalysis/research/research-skip.mdResearch intentionally skipped with recorded reasonMediumGate before exploit
2026-06-10T13:04:03ZAndroid Backup extractionanalysis/cat-backup.tar, analysis/backup-tar-list.txtZIP contained cat.ab, an unencrypted compressed Android Backup that expands to a tar filesystem dump.HighInspect app data and shared pictures
2026-06-10T13:04:35Zleak sweepanalysis/leak-keyword-sweep.txt, analysis/sqlite-files.txtNo direct text/database HTB-format hit; backup contains six shared JPEGs and minor stock app data.HighInspect image content and metadata
2026-06-10T13:05:20Zimage triageanalysis/pictures-contact-sheet.jpgOne non-cat image, <secret redacted>jpg, shows a person holding a document with visible leaked text.HighCrop and enhance the document area
2026-06-10T13: <REDACTED>
2026-06-10T13: <REDACTED>
2026-06-10T13:08:10Zreproducible solversolve/solve.py, analysis/solve-run.txtSolver extracts the Android Backup and regenerates the proof crop; manual transcription is required due blurred angled photo.HighRun completion gate
2026-06-10T13:09:23Zcompletion gatechallenge-state.jsonCompletion gate passed; state marked COMPLETEHighOptional sanitized memory summary approval

Key Findings

  • cat.ab is Android Backup version 5, compressed, and not encrypted; header is recorded in analysis/android-backup-header.txt.
  • The backup expands into shared pictures plus stock Android app data. Direct string, SQLite, and simple metadata sweeps did not expose a text flag.
  • The intended leak is visual: <REDACTED>
  • The solved flag is stored only in 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 the app like a packed suitcase. You unpack it, inspect the labels and hidden pockets, then trace which local file or network call contains the useful clue.

For Cat, 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.