Challenge
- Event: Huntress CTF 2026 (AI Arena)
- Challenge ID:
script-analysis-day-01-native-signals - Modes and points: Single Solve 2, Time Trial 3 (1 task in under 8 s), Mastery (2 tasks in under 7 s)
- Challenge text:
Three PowerShell specimens are on the table, and none of them will ever run. That's fine, because you only need to read them. Classify each script's intent, map its primary ATT&CK technique, and pull out the exact indicators sitting in plain sight.
- Artifact:
power_play.zip(challenge artifact, not published) (zip passwordinfected). - How flags are issued: the Game Master in the AI Homebase VM. You submit answers under fixed answer IDs and it returns a completion code for each mode.
Artifacts
| File | Notes |
|---|---|
power_play.zip (challenge artifact, not published) | Downloaded copy of the challenge zip. It is WinZip-AES encrypted (ZIP 5.1), so stock unzip fails; use 7z x -pinfected. |
extracted/resource-sample.ps1 | Cryptominer fixture |
extracted/collection-sample.ps1 | Browser-credential collection fixture |
extracted/impact-sample.ps1 | Ransomware fixture |
Game Master assignments (SHA-256):
- Single Solve
evidence.zip(challenge artifact, not published):07e61f33b72ae646d925087de9b9e94068812fdf12f7e43613d0b2bef6f6d3e5 - Time Trial
evidence.zip(challenge artifact, not published):76980d6a5ad47ff42da017569278ceaf77bc9f226090bd5fa5d947c3caf5480e - Mastery bundle (
evidence-01.zip(challenge artifact, not published) andevidence-02.zip(challenge artifact, not published)):f96ad10b598a63dc897fd8890dd7de8cbbd9cbc1717d3f72627484d057b1b2cd
Triage
- Classification: static PowerShell triage (malware_re / scripting_data). No execution is needed. The challenge text itself says the scripts "will never run".
- Every specimen uses the same template:
- a Base64 blob is passed to
[Convert]::FromBase64String; - a
$reconstructscriptblock returns the bytes unchanged; - the bytes are decoded as UTF-8 and passed to
ConvertFrom-Json; - the script returns an object built from single-letter keys (
a,b,c, ...).
- a Base64 blob is passed to
- The intent comes from two places:
- the
$nativeTypestriad of .NET classes; - which keys appear in the decoded JSON.
- the
Investigation
1. Extract and decode without executing
7z x -pinfected -oextracted power_play.zip
for f in extracted/*.ps1; do
echo "== $f"
grep -o "FromBase64String('[^']*')" "$f" | sed "s/.*('//;s/')//" | base64 -d; echo
done
Output:
== extracted/collection-sample.ps1
{"a":"e536c782dd01","b":"https://497b6b9b43.example.invalid/3f890532dd42.dat","c":["update-497b6b9b43.dat","Login Data","Cookies"],"d":"stage-e536c782dd01.zip","e":"Global\\HuntressLab_03b15c606290","f":"Mozilla/5.0 HuntressLab/3.3"}
== extracted/impact-sample.ps1
{"a":"785244c7fdf5","b":".locked-1d685","c":"RECOVERY-1d6858b777.txt","d":"https://1d6858b777.example.invalid/a0e20204ed17.dat","e":["update-1d6858b777.dat","Login Data","Cookies"],"f":"Global\\HuntressLab_b2e257a4ea0f"}
== extracted/resource-sample.ps1
{"a":"a88bfda72dbe","b":"https://cdn-03ce326948.example.invalid/3e59094b24e2.bin","c":"wallet_d327bc1114a907589af81bba71226b77","d":"update-03ce326948.dat","e":"HKCU\\Software\\HuntressLab\\Run\\03ce326948","f":"Mozilla/5.0 HuntressLab/3.6","g":64,"h":"Global\\HuntressLab_6460b4f6aa72"}
2. Classify
| Sample | $nativeTypes | Discriminating indicators | Scenario | Accepted ATT&CK |
|---|---|---|---|---|
| resource | Diagnostics.Process, Microsoft.Win32.Registry, Net.WebClient | wallet_*, thread count 64, HKCU Run key | resource_hijacking | T1496 |
| collection | IO.File, IO.Compression.ZipFile, Net.HttpWebRequest | Login Data, Cookies, stage-*.zip, user-agent | synthetic_collection | T1555.003 |
| impact | IO.File, Security.Cryptography.Aes, IO.DirectoryInfo | .locked-*, RECOVERY-*.txt | synthetic_impact | T1486 |
Failed path: before checking with the Game Master, I mapped the collection sample to T1560 (Archive Collected Data) because of ZipFile and the staging zip. The accepted answer is T1555.003 (Credentials from Web Browsers): the browser credential stores are the primary objective, and the archive only stages them.
3. Game Master questions (Single Solve and Time Trial)
Mastery asks the same questions twice, with IDs prefixed set1. and set2..
| Answer ID | Question | Single Solve answer |
|---|---|---|
| resource-scenario | Scenario for resource-sample.ps1 | resource_hijacking |
| resource-attack | Primary ATT&CK ID | T1496 |
| resource-url | Exact URL | https://cdn-03ce326948.example.invalid/3e59094b24e2.bin |
| resource-wallet | Exact wallet | wallet_d327bc1114a907589af81bba71226b77 |
| resource-mutex | Exact mutex | Global\HuntressLab_6460b4f6aa72 |
| collection-scenario | Scenario for collection-sample.ps1 | synthetic_collection |
| collection-attack | Primary ATT&CK ID | T1555.003 |
| collection-url | Exact URL | https://497b6b9b43.example.invalid/3f890532dd42.dat |
| collection-file | First filename indicator | update-497b6b9b43.dat |
| collection-user-agent | Exact user-agent | Mozilla/5.0 HuntressLab/3.3 |
| impact-scenario | Scenario for impact-sample.ps1 | synthetic_impact |
| impact-attack | Primary ATT&CK ID | T1486 |
| impact-extension | Exact extension | .locked-1d685 |
| impact-note | Recovery-note filename | RECOVERY-1d6858b777.txt |
| impact-url | Exact URL | https://1d6858b777.example.invalid/a0e20204ed17.dat |
Key mapping (Single Solve samples):
| Sample | URL | Wallet / file | Mutex | Other |
|---|---|---|---|---|
| resource | b | wallet c | h | — |
| collection | b | first file c[0] | — | user-agent f |
| impact | d | — | — | extension b, note c |
The Time Trial and Mastery artifacts are regenerated for each attempt, so pick answers by the shape of each value (URL, wallet_, Global\, .locked-, RECOVERY-, Mozilla/) rather than by key letter.
4. Timed modes
- Timed modes were run by an agent inside the AI Homebase VM, using a one-shot solver against the Game Master proxy. The steps were:
op=start;- download the artifact;
- AES-unzip it in memory;
- regex out the Base64 and decode the JSON;
- map the values to answers;
- submit.
- Time Trial: the solver finished in 1.847 s (limit 8 s).
- Mastery:
- Two artifact sets were delivered one after the other (
evidence-01.zip(challenge artifact, not published), thenevidence-02.zip(challenge artifact, not published)). Measured processing was about 2.4 s. - The first Mastery
op=starttimed out on the client side even though the server had created the attempt. The solver recovered the attempt through the status call, renewed the expired timer, and completed it.
- Two artifact sets were delivered one after the other (
- Local helper for the same job:
scripts/triage.pydecodes the blobs and classifies by the type triad.
Flag Recovery
The Game Master returned CORRECT for all three modes. The completion codes are per-team dynamic flags:
Flag
- Single Solve Tokend24691da4c32b65c01a8b287fb73056f
- Time Trial Token606353c05c5d49836264ff51bd99bc15
- Mastery Token31cc0878e750233652db9bd7198c2ec0
Minimal Reproduction
7z x -pinfected -oextracted power_play.zip
python scripts/triage.py extracted/*.ps1
Then submit the scenario, the ATT&CK ID and the value-shape-selected indicators under the Game Master's exact answer IDs.
Lessons Learned
- Two indicators appear in both the collection and impact samples: the
Login DataandCookiesbrowser targets, and theupdate-*.datfile. Tell the samples apart with the .NET type triad and their unique keys:Aes+.locked,ZipFile, orProcess+ wallet. - ATT&CK mapping follows the objective, not the mechanism. Browser credential theft is T1555.003 even when the data is zipped (not T1560).
- The scenario answers come from a fixed list:
resource_hijacking,synthetic_collection,synthetic_impact. - The zips use WinZip AES. Use
7zorpyzipper, notunzipor Python's stdlibzipfile. - For timed modes, one script should handle start, fetch, decode and submit in a single run. Answers typed by hand cannot meet an 8 s or 7 s limit.
- On a client timeout, recover the attempt through the status call; don't start a new one blindly.