Micro Storage
Micro Storage is a sanitized challenge note from the local HTB archive, organized for quick review by category, difficulty, evidence flow, and reusable operator
Scenario
Micro Storage attack path
Micro Storage 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 Misc evidence, validation, and reusable operator lessons.
Walkthrough flow
Mapped the remote menu protocol: upload, list,...
Confirmed upload uses filename plus EOF-terminated...
Confirmed direct slash/path traversal and...
Found that filenames beginning with GNU tar options...
Uploaded a short script file and used...
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.
- Misc/Micro-Storage/writeup.md
- htb-challenge/Misc/Micro-Storage/notes.md
- htb-challenge/Misc/Micro-Storage/memory-summary.md
- htb-challenge/Misc/Micro-Storage/hypothesis-board.md
- HTB/_knowledge/exports/ctf-lightrag-latest-203412/documents/challenge__Misc__Micro-Storage__memory-summary.md.373a970972.md
- HTB/_knowledge/exports/ctf-lightrag-latest-203412/documents/challenge__Misc__Micro-Storage__notes.md.925c46b2c1.md
Technical Walkthrough
Writeup
Challenge
- Name: Micro-Storage
- Category: Misc
- Difficulty: Easy
- Mode: remote
Summary
Micro Storage is a remote temporary file-store service. The vulnerable path is its “compress and download” feature: uploaded filenames are passed to GNU tar unsafely, so filenames beginning with --checkpoint are interpreted as tar options. This allows command execution through --checkpoint-action.
Artifact Inventory
Reference analysis/artifact-inventory.json and summarize the relevant files or remote surface.
- Remote service:
<TARGET>:30254. - No local challenge files were provided.
- The service exposes upload, list, delete, print, compress/download, and quit menu actions.
Analysis
Benign probing showed that uploads take a filename and content terminated by EOF, and option 5 returns a base64-encoded tar archive. Direct traversal attempts using / or .. are rejected, and the print feature only accepts numeric file identifiers.
The useful gap is in archive creation. Filenames such as --checkpoint=1 and --checkpoint-action=exec=sh a are accepted by upload/list, but they do not appear as archive members when option 5 runs. That indicates tar is parsing them as options rather than treating them as ordinary filenames.
Uploading a short script named a then triggering compression executes the script through GNU tar checkpoint action. Running cat /flag.txt from that script reflects the flag in the service transcript before normal archive output.
Solve
Run:
python3 solve/solve.pyThe solver connects to the service, uploads:
--checkpoint=1--checkpoint-action=exec=sh aa, containing the command to print/flag.txt- a harmless seed file
It then triggers compression and extracts the HTB-format flag from the returned transcript.
Flag
Raw flag is stored in loot/flag.txt and intentionally not reproduced here.
Lessons
- Archive creation can be dangerous when filenames are passed to tar without
--or safe argument handling. - Rejections for path traversal do not rule out option injection.
- For remote menu services, first map benign behavior, then test one narrow parser surface at a time.
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: Micro-Storage
- Category: Misc
- Difficulty: Easy
- Mode: remote
- Remote instance: none
- Start time: 2026-06-10T09:18:18Z
- 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 |
|---|---|---|---|---|
| — | 0 | — | remote-only or no provided files | No local artifacts found under files/ |
Evidence Ledger
| Time | Action | Output/File | Finding | Confidence | Next |
|---|---|---|---|---|---|
| 2026-06-10T09:18:18Z | harness init | challenge-state.json | Workspace initialized with deterministic state file | High | Inventory artifacts |
| 2026-06-10T09:18:18Z | artifact inventory | analysis/artifact-inventory.json | 0 artifact(s) inventoried | High | Build or update hypotheses |
| 2026-06-10T09:18:32Z | hypothesis recorded | hypothesis-board.md | Interact with the temporary file-storage protocol, identify file read/write primitives, then test for unsafe path handling that can disclose /flag.txt. | Medium | Connect once, capture the menu/protocol, and test harmless filename behavior before attempting /flag.txt disclosure. |
| 2026-06-10T09:20:05Z | research record | analysis/research/research-records.md | Research tagged MATCHED | Medium | Validate against current evidence |
| 2026-06-10T09:20:29Z | checkpoint recorded | analysis/checkpoint-hypothesis_ready-20260610T092029716215Z-048333f5.md | Checkpoint for <secret redacted> | High | Use checkpoint to drive next decision |
| 2026-06-10T09:20:45Z | local memory record | analysis/local-memory-records.md | Prior local notes reviewed as fallback/advisory context | Medium | Validate against current evidence |
| 2026-06-10T09:20:46Z | evaluator | analysis/evaluator-20260610T092046046839Z-c9b12ffe.md | Proceed | High | Test path traversal and archive/download behavior, then use the smallest confirmed primitive to read /flag.txt. |
| 2026-06-10T09:32:05Z | flag capture | loot/flag.txt | HTB-format flag captured; raw value kept in loot only | High | Write solution and run completion gate |
| 2026-06-10T09:33:08Z | flag capture | loot/flag.txt | HTB-format flag captured; raw value kept in loot only | High | Write solution and run completion gate |
| 2026-06-10T09:33:58Z | completion gate | challenge-state.json | Completion gate passed; state marked COMPLETE | High | Optional sanitized memory summary approval |
Key Findings
- Remote target:
<TARGET>:30254. - Initial banner confirms a temporary Micro Storage service with upload, list, delete, print, compress/download, and quit actions.
- Upload flow asks for a filename, then multiline content terminated by
EOF. - Normal upload/list behavior was confirmed with
hello.txt. - Print flow asks for a numeric file identifier from
0 - 9, not a filename. - The objective is to leak
/flag.txt, so the likely exploit surface is unsafe uploaded filename handling, path traversal, archive construction, or link/file-following behavior. - Simple traversal and slash-containing filenames are rejected by the service.
- Filenames beginning with
--checkpointare accepted and are not included as archive members, proving they are interpreted as GNU tar options during compression. - Uploading
--checkpoint=1,--checkpoint-action=exec=sh a, and script fileacreates command execution when option 5 compresses files. - The final solver uses the checkpoint action to run
cat /flag.txt; stdout is reflected in the service transcript and captured by the harness.
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: Misc
- Challenge: Micro-Storage
- 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.
- Mapped the remote menu protocol: upload, list, delete, print-by-index, compress/download, quit.
- Confirmed upload uses filename plus
EOF-terminated content and option 5 returns a base64 tar archive. - Confirmed direct slash/path traversal and command-substitution-style filenames are blocked.
- Found that filenames beginning with GNU tar options such as
--checkpoint=1are accepted and then interpreted by tar during compression. - Uploaded a short script file and used
--checkpoint-action=exec=sh ato execute it during compression. - Used the checkpoint action to print the target file and captured the HTB-format flag from the service transcript.
Reusable Lessons
- File upload filters that block path traversal can still be vulnerable to option injection.
- GNU tar wildcard/argument misuse is exploitable with
--checkpointand--checkpoint-action. - For remote menu challenges, keep harmless protocol probes separate from exploit probes and preserve transcripts.
Dead Ends
- Numeric print identifier injection failed; non-numeric payloads returned the service's rejection message.
- Simple
..and slash-containing filenames are rejected. - Trying to overwrite an already tracked file during archive creation caused compression to fail and was not needed.
Tool Quirks
- Option 5 may take several seconds before returning the base64 archive.
- Raw transcripts from successful flag attempts must be sanitized if stored under
analysis/; raw flags stay inloot/.
Evidence Paths
analysis/initial-probe.txtanalysis/benign-upload-read-probe-2.txtanalysis/identifier-edge-probe.txtanalysis/filename-edge-probe-2.txtanalysis/tar-option-harmless-proof-2.txtanalysis/stdout-flag-attempt.txt(sanitized)solve/solve.pyloot/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 | Interact with the temporary file-storage protocol, identify file read/write primitives, then test for unsafe path handling that can disclose /flag.txt. | Scenario says the service stores files temporarily and asks to leak /flag.txt due to a coding mistake. | Connect once, capture the menu/protocol, and test harmless filename behavior before attempting /flag.txt disclosure. | Medium | 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: Misc
- Challenge: Micro-Storage
- 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.
- Mapped the remote menu protocol: upload, list, delete, print-by-index, compress/download, quit.
- Confirmed upload uses filename plus
EOF-terminated content and option 5 returns a base64 tar archive. - Confirmed direct slash/path traversal and command-substitution-style filenames are blocked.
- Found that filenames beginning with GNU tar options such as
--checkpoint=1are accepted and then interpreted by tar during compression. - Uploaded a short script file and used
--checkpoint-action=exec=sh ato execute it during compression. - Used the checkpoint action to print the target file and captured the HTB-format flag from the service transcript.
Reusable Lessons
- File upload filters that block path traversal can still be vulnerable to option injection.
- GNU tar wildcard/argument misuse is exploitable with
--checkpointand--checkpoint-action. - For remote menu challenges, keep harmless protocol probes separate from exploit probes and preserve transcripts.
Dead Ends
- Numeric print identifier injection failed; non-numeric payloads returned the service's rejection message.
- Simple
..and slash-containing filenames are rejected. - Trying to overwrite an already tracked file during archive creation caused compression to fail and was not needed.
Tool Quirks
- Option 5 may take several seconds before returning the base64 archive.
- Raw transcripts from successful flag attempts must be sanitized if stored under
analysis/; raw flags stay inloot/.
Evidence Paths
analysis/initial-probe.txtanalysis/benign-upload-read-probe-2.txtanalysis/identifier-edge-probe.txtanalysis/filename-edge-probe-2.txtanalysis/tar-option-harmless-proof-2.txtanalysis/stdout-flag-attempt.txt(sanitized)solve/solve.pyloot/flag.txt
Ingestion Decision
- Proposed for LightRAG: yes
- Requires user approval before ingestion: yes
Notes
Notes
Scope
- Challenge: Micro-Storage
- Category: Misc
- Difficulty: Easy
- Mode: remote
- Remote instance: none
- Start time: 2026-06-10T09:18:18Z
- 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 |
|---|---|---|---|---|
| — | 0 | — | remote-only or no provided files | No local artifacts found under files/ |
Evidence Ledger
| Time | Action | Output/File | Finding | Confidence | Next |
|---|---|---|---|---|---|
| 2026-06-10T09:18:18Z | harness init | challenge-state.json | Workspace initialized with deterministic state file | High | Inventory artifacts |
| 2026-06-10T09:18:18Z | artifact inventory | analysis/artifact-inventory.json | 0 artifact(s) inventoried | High | Build or update hypotheses |
| 2026-06-10T09: <REDACTED>, identify file read/write primitives, then test for unsafe path handling that can disclose /flag.txt. | Medium | Connect once, capture the menu/protocol, and test harmless filename behavior before attempting /flag.txt disclosure. | |||
| 2026-06-10T09:20:05Z | research record | analysis/research/research-records.md | Research tagged MATCHED | Medium | Validate against current evidence |
| 2026-06-10T09:20:29Z | checkpoint recorded | analysis/checkpoint-hypothesis_ready-20260610T092029716215Z-048333f5.md | Checkpoint for <secret redacted> | High | Use checkpoint to drive next decision |
| 2026-06-10T09:20:45Z | local memory record | analysis/local-memory-records.md | Prior local notes reviewed as fallback/advisory context | Medium | Validate against current evidence |
| 2026-06-10T09: <REDACTED>, then use the smallest confirmed primitive to read /flag.txt. | |||||
| 2026-06-10T09: <REDACTED> | |||||
| 2026-06-10T09: <REDACTED> | |||||
| 2026-06-10T09:33:58Z | completion gate | challenge-state.json | Completion gate passed; state marked COMPLETE | High | Optional sanitized memory summary approval |
Key Findings
- Remote target:
<TARGET>:30254. - Initial banner confirms a temporary Micro Storage service with upload, list, delete, print, compress/download, and quit actions.
- Upload flow asks for a filename, then multiline content terminated by
EOF. - Normal upload/list behavior was confirmed with
hello.txt. - Print flow asks for a numeric file identifier from
0 - 9, not a filename. - The objective is to leak
/flag.txt, so the likely exploit surface is unsafe uploaded filename handling, path traversal, archive construction, or link/file-following behavior. - Simple traversal and slash-containing filenames are rejected by the service.
- Filenames beginning with
--checkpointare accepted and are not included as archive members, proving they are interpreted as GNU tar options during compression. - Uploading
--checkpoint=1,--checkpoint-action=exec=sh a, and script fileacreates command execution when option 5 compresses files. - The final solver uses the checkpoint action to run
cat /flag.txt; stdout is reflected in the service transcript and captured by the harness.
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 challenge like a timed puzzle booth. If the task is too fast or repetitive for a person, the intended move is usually to write a small helper that performs the simple action perfectly.
For Micro Storage, 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.