Challenge / Crypto

Baby Time Capsule

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

Very EasyPublished 2024-03-18Sanitized local writeup

Scenario

Baby Time Capsule attack path

Baby Time Capsule 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 Crypto evidence, validation, and reusable operator lessons.

Baby Time Capsule sanitized attack graph

Walkthrough flow

01

Challenge parameters

02

Weak assumption

03

Recovered secret state

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.

  • Crypto/Baby-Time-Capsule/writeup.md
  • htb-challenge/Crypto/Baby-Time-Capsule/notes.md
  • htb-challenge/Crypto/Baby-Time-Capsule/memory-summary.md
  • htb-challenge/Crypto/Baby-Time-Capsule/hypothesis-board.md
  • HTB/_knowledge/exports/ctf-lightrag-latest-203412/documents/challenge__Crypto__Baby-Time-Capsule__memory-summary.md.ed338f8cb1.md
  • HTB/_knowledge/exports/ctf-lightrag-latest-203412/documents/challenge__Crypto__Baby-Time-Capsule__notes.md.a4017bb2fe.md

Technical Walkthrough

Writeup

Challenge

  • Name: Baby-Time-Capsule
  • Category: Crypto
  • Difficulty: Very Easy
  • Mode: hybrid

Summary

The challenge uses textbook RSA with the same plaintext flag encrypted under fresh 1024-bit moduli and fixed public exponent e=5. Because there is no padding and the same message is reused, collecting five ciphertext/modulus pairs is enough to recover the plaintext using Håstad's broadcast attack: combine with CRT to reconstruct m^5, then take the exact integer fifth root.

Artifact Inventory

  • files/extracted/baby_time_capsule/server.py — source showing textbook RSA with fresh moduli and fixed e=5.
  • analysis/rag/rag-query-20260607T124446877345Z-057f0832.txt — advisory RAG clue confirming the attack family.
  • analysis/capsules.json — collected ciphertext/modulus pairs.
  • analysis/flag-candidate.txt — recovered flag before harness capture.
  • solve/solve.py — deterministic solver.

Reference analysis/artifact-inventory.json and summarize the relevant files or remote surface.

Analysis

server.py encrypts the same plaintext FLAG repeatedly, but with a new modulus (n) every time and a fixed exponent e=5. Since textbook RSA is deterministic and unpadded, Håstad's broadcast attack applies as soon as enough pairwise-coprime moduli are collected. Using CRT over the five ciphertexts reconstructs m^5 exactly over the product of the moduli, and because the root is exact the original plaintext is recovered by taking the integer fifth root.

Solve

The solver connects to the service, requests five capsules, parses each JSON line into (ciphertext, modulus), verifies e=5, applies manual CRT in pure Python, computes the exact integer fifth root with a binary-search routine, and decodes the resulting integer to bytes to recover the flag.

Flag

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

Lessons

When a service reuses the same plaintext under textbook RSA with a small exponent across fresh moduli, you often do not need any factorization at all. CRT plus an exact integer root is enough, and pure Python is sufficient for a clean, reproducible solve.

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: Baby-Time-Capsule
  • Category: Crypto
  • Difficulty: Very Easy
  • Mode: hybrid
  • Remote instance: <TARGET>:30442
  • Start time: 2026-06-07T12:41:05Z
  • 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/a12c73a4-17b8-4a0b-98fe-58e16b8aeea8.zip1194<hash redacted>Zip archive data, at least v1.0 to extract, compression method=storezip entries: 2 shown in artifact inventory JSON

Evidence Ledger

TimeActionOutput/FileFindingConfidenceNext
2026-06-07T12:41:05Zharness initchallenge-state.jsonWorkspace initialized with deterministic state fileHighInventory artifacts
2026-06-07T12:41:27Zartifact inventoryanalysis/artifact-inventory.json1 artifact(s) inventoriedHighBuild or update hypotheses
2026-06-07T12:41:27Zhypothesis recordedhypothesis-board.mdInspect provided Crypto artifact, identify primitive/protocol, then query the remote instance only after the offline behavior is understood.MediumUnzip with the standard HTB password if needed, read source/output files, identify the crypto primitive and remote prompt format.
2026-06-07T12:41:41Zresearch taskanalysis/research/task-20260607T124141509012Z-50c7d0f1.mdResearch task created for advisory investigationMediumRecord research output
2026-06-07T12:42:16Zcheckpoint recordedanalysis/checkpoint-hypothesis_ready-20260607T124216540996Z-72077f75.mdCheckpoint for <secret redacted>HighUse checkpoint to drive next decision
2026-06-07T12:43:57Zlocal memory recordanalysis/local-memory-records.mdPrior local notes reviewed as fallback/advisory contextMediumValidate against current evidence
2026-06-07T12:44:28Zevaluatoranalysis/evaluator-20260607T124428964148Z-21fc3919.mdProceedHighImplement solve/solve.py, collect at least five capsules from the remote service, reconstruct m^5 via CRT, take the exact fifth root, and capture the flag.
2026-06-07T12:44:59ZRAG queryanalysis/rag/rag-query-20260607T124446877345Z-057f0832.txtRAG helper exited 0; output savedMediumRecord retrieval tag and validation
2026-06-07T12:46:01ZRAG recordanalysis/rag-records.mdRetrieved memory tagged MATCHEDMediumValidate or reject with live evidence
2026-06-07T12:46:06Zflag captureloot/flag.txtHTB-format flag captured; raw value kept in loot onlyHighWrite solution and run completion gate
2026-06-07T12:46:06ZRecovered plaintext via Håstad broadcast attackfiles/extracted/baby_time_capsule/server.py, analysis/capsules.json, analysis/flag-candidate.txtThe service encrypted the same flag under fresh 1024-bit RSA moduli with fixed exponent e=5 and no padding. Collecting five ciphertext/modulus pairs, applying CRT, and taking the exact integer fifth root recovered the flag.HighCapture the flag through the harness and complete the workspace.
2026-06-07T12:46:06Zcompletion gatechallenge-state.jsonCompletion gate passed; state marked COMPLETEHighOptional sanitized memory summary approval

Key Findings

-

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: Crypto
  • Challenge: Baby-Time-Capsule
  • 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.

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
1Inspect provided Crypto artifact, identify primitive/protocol, then query the remote instance only after the offline behavior is understood.Challenge is Crypto/Very Easy with a downloadable ZIP and remote host <TARGET>:30442.Unzip with the standard HTB password if needed, read source/output files, identify the crypto primitive and remote prompt format.MediumActive

Closed Branches

BranchEvidence TestedFailure OutputReason ClosedRevisit Condition

Memory Summary

approval_required: true

Sanitized Memory Summary

Metadata

  • Platform: HackTheBox Challenges
  • Category: Crypto
  • Challenge: Baby-Time-Capsule
  • 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.

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: Baby-Time-Capsule
  • Category: Crypto
  • Difficulty: Very Easy
  • Mode: hybrid
  • Remote instance: <TARGET>:30442
  • Start time: 2026-06-07T12:41:05Z
  • 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/a12c73a4-17b8-4a0b-98fe-58e16b8aeea8.zip1194<hash redacted>Zip archive data, at least v1.0 to extract, compression method=storezip entries: 2 shown in artifact inventory JSON

Evidence Ledger

TimeActionOutput/FileFindingConfidenceNext
2026-06-07T12:41:05Zharness initchallenge-state.jsonWorkspace initialized with deterministic state fileHighInventory artifacts
2026-06-07T12:41:27Zartifact inventoryanalysis/artifact-inventory.json1 artifact(s) inventoriedHighBuild or update hypotheses
2026-06-07T12: <REDACTED>, identify primitive/protocol, then query the remote instance only after the offline behavior is understood.MediumUnzip with the standard HTB password if needed, read source/output files, identify the crypto primitive and remote prompt format.
2026-06-07T12:41:41Zresearch taskanalysis/research/task-20260607T124141509012Z-50c7d0f1.mdResearch task created for advisory investigationMediumRecord research output
2026-06-07T12:42:16Zcheckpoint recordedanalysis/checkpoint-hypothesis_ready-20260607T124216540996Z-72077f75.mdCheckpoint for <secret redacted>HighUse checkpoint to drive next decision
2026-06-07T12:43:57Zlocal memory recordanalysis/local-memory-records.mdPrior local notes reviewed as fallback/advisory contextMediumValidate against current evidence
2026-06-07T12: <REDACTED>, collect at least five capsules from the remote service, reconstruct m^5 via CRT, take the exact fifth root, and capture the flag.
2026-06-07T12:44:59ZRAG queryanalysis/rag/rag-query-20260607T124446877345Z-057f0832.txtRAG helper exited 0; output savedMediumRecord retrieval tag and validation
2026-06-07T12:46:01ZRAG recordanalysis/rag-records.mdRetrieved memory tagged MATCHEDMediumValidate or reject with live evidence
2026-06-07T12: <REDACTED>
2026-06-07T12: <REDACTED>, analysis/capsules.json, analysis/flag-candidate.txtThe service encrypted the same flag under fresh 1024-bit RSA moduli with fixed exponent `e= <REDACTED>, applying CRT, and taking the exact integer fifth root recovered the flag.HighCapture the flag through the harness and complete the workspace.
2026-06-07T12:46:06Zcompletion gatechallenge-state.jsonCompletion gate passed; state marked COMPLETEHighOptional sanitized memory summary approval

Key Findings

-

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 challenge like a locked box where the lock is mathematical but slightly flawed. The goal is not to smash the box; it is to notice which part of the lock repeats, leaks, or trusts the wrong assumption.

For Baby Time Capsule, 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.