Tactical LogHuntress CTF 2026 // team archive

Days / Day 08 / Script Analysis / Lost in Translation

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

Lost in Translation

Script Analysis SSTTMM Modes reported CORRECT in this write-up

Challenge

  • Lane: script-analysis (Day 08)
  • GM id: script-analysis-day-08-cross-language-iocs
  • Modes: Single Solve, Time Trial, Mastery (all solved)
  • Prompt: "The same indicators show up in every language the campaign speaks, each with its own quoting, escaping, and encoding accent. Normalize them to their exact form and find the one that doesn't match its siblings."

Artifacts

  • evidence.zip (challenge artifact, not published) (AES, password infected) containing inert fixtures across many languages: PowerShell, JScript, batch, Python (various packer-recovered forms), PHP/HTA/WSF polyglot webshells, Bash, and Node (.mjs).
  • Mastery delivers one outer zip of nested per-set zips evidence-01.zip (challenge artifact, not published) .. evidence-05.zip (challenge artifact, not published) (each itself AES, password infected).

Triage

Day 08 extends the Day 02/03/06/07 script-inventory family (PS1 -> +JScript/batch -> +Bash -> +Node/Python-packers) with cross-language IOC normalization. 615 per-field answers (Single Solve / Time Trial); Mastery is 5 sets x 615 = 3075. Each fixture carries a self-describing Material_<id> + Codec_<id> descriptor that decodes to a v=1|feature=..|primitive=..|campaign_id=..|stage_count=..|steps=.. (or v=3|language=..|role=..) line. The banked autosolver (autosolve_script.py -> solve_poly_d8.py) handles the bulk.

Investigation

  1. GM start on the timed entries returned HTTP 503 training_rotation_invalid. This was NOT the whole timed pool being down - every other Day-08 challenge's timed start worked at the same moment. Only this challenge's rotation was wedged server-side.
  2. An explicit op=retry on script-analysis-day-08-cross-language-iocs/time_trial (which itself returns 409 start_required) followed by op=start cleared the bad rotation and returned a live, no-deadline attempt with all 615 answer_ids. That retry-then-start is the unblock for training_rotation_invalid.
  3. Time Trial: the banked solver resolved 608/615. The 7 holdouts were the array-slicing bash-advanced fixture (a .sh file inside evidence.zip). Its Codec_ was xor_hex|3e; decoding the Material gave v=1|feature=array_slicing|primitive=indexed_array_slice|campaign_id=BASHX-A5DFB46B|stage_count=1|steps=recognize_syntax,reconstruct_intent. Mapping: role=advanced_syntax, attack=T1059.004, feature/primitive/campaign/stage-count verbatim, steps joined with >. Submitted -> CORRECT.
  4. Mastery: solver resolved 3040/3075; the 35 holdouts were the bash-advanced fixtures in sets 1/3/5. Each used a DIFFERENT codec: xor_hex|<key>, percent_hex, reversed_base64, base64_literal, hex_compact. Decoded each nested per-set zip, applied the right codec per descriptor, mapped all 7 fields x 5 fixtures = 35. Submitted -> CORRECT.

Flag Recovery

Flags are the GM completion of each mode (per-field grading, not a single flag{}):

  • Single Solve flag: Token8e0983befb2b5e872c00ddf97230a8a6
  • Time Trial / Mastery: GM returned {"result":"CORRECT","solved_by":{"name":"Blandman3"}}.

Fix banked

challenges/_lib/solve_poly_d8.py -> bash_adv_desc previously only tried base64 / reversed-base64. Added bash_adv_decode(material, codec) which honors the Codec_ string: xor_hex|<hexkey>, percent_hex, reversed_base64, base64_literal, hex_compact, plus an optional trailing reverse_bytes step (legacy base64 guesses kept as fallback). Unit-tested against the live fixtures and _test_autosolve_script.py (still PASS, 0 diffs). The next bash-advanced variant now auto-solves instead of needing hand-decoding.

Minimal Reproduction

  1. retry then start the timed entry to clear training_rotation_invalid.
  2. python3 challenges/_lib/autosolve_script.py script-analysis-day-08-cross-language-iocs/time_trial (then /mastery). With the solver fix above, all fields resolve in one shot.

Lessons Learned

  • training_rotation_invalid 503 is per-challenge, not pool-wide; confirm against a sibling challenge before assuming the server is down, and clear it with retry-then-start.
  • Self-describing Material_/Codec_ fixtures: always decode per the Codec_ string rather than guessing one transform - Day 08 used five distinct codecs for the same bash-advanced family.

Additional notes (merged from writeup.md)

Lost in Translation (Day 08, script-analysis)

  • Single Solve: CORRECT (615 fields). Autosolve banked 469; the remaining 146 were new fixtures:
    • php polyglot-.php and host- (hta/wsf/php webshell) files carry HUNTRESS_ANALYSIS_V1:<KIND>-<payload> where KIND is B64, HEX, FRAG (dot-joined hex chunks) or HB64 (hex of base64). Decoded text is a v=3|language=..|role=..|attack=..|adapter=..|host_profile=..|obfuscation_profile=..|stage_profile=..|next_language=..|stage_count=..|steps=..|campaign_id=..|url=..|file_path=.. descriptor. Field suffix -> key map in solve_poly_d8.py; steps use >.
    • bash-advanced-* (associative-arrays.sh, array-slicing.sh): Material/Codec base64 (optionally reversed) v=1|feature|primitive|campaign_id|stage_count|steps; role advanced_syntax, attack T1059.004.
  • Solver: challenges/_lib/solve_poly_d8.py (hooked into autosolve_script.solve_fields_ext). Offline 615/615 resolved.
  • Time Trial / Mastery: GM start returned HTTP 503 training_rotation_invalid (server side); not attempted further. Rerun: python3 challenges/_lib/autosolve_script.py script-analysis-day-08-cross-language-iocs/time_trial (and /mastery).