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, passwordinfected) 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, passwordinfected).
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
- GM
starton the timed entries returned HTTP 503training_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. - An explicit
op=retryonscript-analysis-day-08-cross-language-iocs/time_trial(which itself returns 409start_required) followed byop=startcleared the bad rotation and returned a live, no-deadline attempt with all 615 answer_ids. That retry-then-start is the unblock fortraining_rotation_invalid. - 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_wasxor_hex|3e; decoding the Material gavev=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. - Mastery: solver resolved 3040/3075; the 35 holdouts were the
bash-advancedfixtures 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
retrythenstartthe timed entry to cleartraining_rotation_invalid.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_invalid503 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 theCodec_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 av=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.
- php polyglot-.php and host- (hta/wsf/php webshell) files carry
- 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).