Tactical LogHuntress CTF 2026 // team archive

Days / Day 18 / Script Analysis / Orphan Process

DAY 18//LANE: SCRIPT ANALYSIS//STATUS: CORRECT x3

Orphan Process

Script Analysis SSTTMM Modes reported CORRECT in this write-up

Day 18 - Orphan Process (script-analysis)

GM id: script-analysis-day-18-process-story | lane: script-analysis | agent: agent-1 | fields: 1194

Result - all three modes CORRECT at first contact

ModeResultTimeRankedFlag
Single SolveCORRECT3.6 snoToken9048441aa3b1c75504e57695b9de0ec0
Time TrialCORRECT4.4 syesTokenbab7fb3a300e63d454b7fd21b404b158
MasteryCORRECT10.6 syesToken67d0cdcde9c2fe494840230e7ba0efe1

Solved by the team solver. Single 1194/1194 fields accepted; Time Trial and Mastery solved from their own mutated bytes by the same extractor (no per-mode rework, no timed start by hand - AUTOSOLVE only).

GM prompt

Source code describes which process should spawn which, and native telemetry keeps its own record of events. Reconstruct the static process tree, and catch the child claiming a parent it never had.

Artifact

artifact_0.bin (challenge artifact, not published) - 119408 bytes, AES-encrypted ZIP (password infected), 132 inert script fixtures: 22 .sh, 14 .py, 12 .js, 10 .vbs, 9 .php, 8 .mjs, 5 .cmd/.lua/.pl/.rb/.gs, 4 .ps1/.bat/.mof/.ts/.au3/.applescript/.proj/.ahk. Static analysis only; nothing executed.

Today's new layer: Google Apps Script + the SPLIT fragment carrier

The whole 1194-field inventory was already covered by the banked spine except 55 ids (the AUTOSOLVE residue), all belonging to the five new .gs members:

polyglot-google_apps_script-benign-utility.gs
polyglot-google_apps_script-downloader.gs
polyglot-google_apps_script-launcher.gs
polyglot-google_apps_script-staged-chain.gs
host-google-docs-sidebar-google-apps-script.gs

11 ids each x 5 files = 55 (role, attack, adapter, campaign, url/file-path, stage-count, steps, host-profile, obfuscation, stage-profile, next-language).

Why the banked decoder missed them

Every earlier fixture carries its descriptor on the marker line itself - HUNTRESS_ANALYSIS_V1:<KIND>-<payload> (kinds B64, HEX, FRAG, HB64; 13 files each today). The .gs files carry a bare kind token with no payload:

// HUNTRESS_ANALYSIS_V1:SPLIT
const HUNTRESS_ANALYSIS_V1_SPLIT_22eaee83 = [
    "FRAG-763d337c6c616e6775616765.3d676f6f676c655f61707073.5f7363726",
    "970747c726f6c65.3d646f776e6c6f616465727c.766572646963743d7375737",
    ...
].join("");

MARK = HUNTRESS_ANALYSIS_V1:([A-Z0-9]+)-(...) requires the - after the kind, so desc_of() returned None, None and all 55 ids stayed unresolved. Nothing was submitted - the gate held the Single rather than guessing (and therefore no timed variant was spent).

The payload is fragmented twice over: split across array elements and dot-separated inside the hex, exactly the FRAG idiom. Each file carries two copies - the FRAG- prefixed one in the module-level array and a bare-hex copy in encoded_<id> inside buildAnalysisPlan_<id>().

The fix (one extension, spine untouched)

challenges/_lib/solve_poly_d8.py:

  • MARK_KIND = HUNTRESS_ANALYSIS_V1[:_]([A-Z0-9]+) - accept a marker that is only a kind token.
  • split_candidates(s) - rebuild every array-of-strings literal in the source using its own .join("<sep>") separator (default ""), drop arrays under 2 elements / 16 chars, and offer each result twice: once with a leading inner <KIND>- stripped, once whole.
  • desc_of() now carries (kind, payload) pairs through its candidate list so a per-candidate inner kind (FRAG here) can override the file-level one (SPLIT), and still keeps the existing "most complete descriptor wins" rule - so the truncated/partial copy can never beat the whole one.

This is carrier-shaped, not .gs-shaped: any language that fragments the payload into a joined array literal decodes now.

Recovered descriptors (Single)

fileroleattackadapterhost_profileobfuscationstage_profilenext_languagestagessteps
polyglot benign-utilitybenign_utilitynonelocal_parserstandalonehex_base64three_stage_decode_write_launchpowershell3decode_embedded>write_file>dispatch_process
polyglot downloaderdownloaderT1105http_clientstandalonefragmented_hexcross_language_handoffjscript3profile_host>decode_configuration>dispatch_language
polyglot launcherlauncherT1059process_builderstandaloneplain_hexsingle_descriptorbatch2decode_configuration>return_configuration
polyglot staged-chainstaged_chainT1059operation_graphstandalonebase64two_stage_download_executevbscript2acquire_remote>dispatch_process
host google-docs-sidebarstaged_chainT1059operation_graphgoogle_docs_sidebarfragmented_hexcross_language_handoffjscript3profile_host>decode_configuration>dispatch_language

Campaign ids / IOCs are per-file and per-attempt (Single values): e.g. downloader campaign_id=GOOGLE_APPS_SCRIPT-f5a5483d, url=https://google_apps_script-f5a5483ddd.example.invalid/stage, file_path=/tmp/huntress-google_apps_script/.f5a5483ddd7fd918.stage; host sidebar GOOGLE_APPS_SCRIPT-29193ae3. The host file's inert Apps Script body (onOpen_*, showDecryptPanel_*, validateAccessKey_* returning accepted:false, executed:false) is theme dressing - the answers come from the descriptor, not from the UI code.

Note attack=none for the benign utility: the GM's mitre_attack_id shape permits the literal none, and the descriptor states it, so it is submitted verbatim.

Verification

  • autosolve_script.solve_fields_ext on the Single's own bytes: resolved 1194, unresolved 0 before any GM call.
  • New standalone regression challenges/Day 18/Orphan Process/scripts/solve_orphan_process.py: RESULT: PASS (real 1194/1194 + the 5 .gs descriptors + 12 synthetic SPLIT combinations + the no-payload guard).
  • A matching SPLIT ARRAY-JOIN CARRIER case was added to the lane catalog _lib/_test_autosolve_script.py; the block itself runs PASS, but the suite as a whole cannot complete on this machine: its Day 06 / Day 07 cases load _stage/*/artifact_0.bin, and those samples were deleted after their writeups (retention rule), so the suite aborts before reaching any case. Not caused by this change - flagged for the lane owner.
  • GM graded all three modes CORRECT - that grading is the verification of record.

Contract trace

  • RECOGNIZE - zip-aes -> 132 script fixtures; KB family script_inventory, 14 prior lane days.
  • BIND - challenges/Day 18/_stage/Orphan_Process/artifact_0.bin (already on disk, never refetched).
  • EXTRACT - banked spine for 1139 fields; new SPLIT array-join decoder for the 55 .gs residue ids.
  • CORRELATE - each id's polyglot-/host-<stem>-<suffix> maps to the member whose stem matches; suffix maps to a descriptor key.
  • VALIDATE - EVIDENCE: SURE. Every value is a literal field of a descriptor the fixture decodes for itself; no inference, no probing, 1194/1194 local coverage.
  • SUBMIT - one AUTOSOLVE run per mode, Single -> Time Trial -> Mastery, no hand GM calls.

Lesson for the lane

The daily twist can be a carrier shape rather than a language: the marker line may degrade to a bare kind token with the payload reassembled by the fixture's own code ([...].join("")). Match the kind token first and treat any self-joining literal in the file as a payload candidate, letting an inner <KIND>- prefix pick the codec.