Akira decryptor and responder tools

File Purpose
akira_decrypt.py The decryptor (Python 3.8+, standard library only). Commands: decrypt (with --keys, --seeds, or the operator’s --private-key; --journal for interrupted .arika files), recover (rebuild keys from timestamps, no ransom key), info, benchmark, selftest
akira_fast.py Optional compiled search engine for recover (pip install numpy numba). It checks itself against the Python reference at load and falls back to Python if any check fails. Takes a file from about 30 min to about 25 s
collect_clock_and_times.ps1 Responder collector (read-only). Records QPC/system-time pairs, a file listing with SHA-256 and timestamps, and the operator logs. Run -Tag post on the victim on the same boot as the attack, before any reboot

SHA-256:

akira_fast.py and the collector are byte-identical to the files the blind tests ran.

Recovering a file without keys

  1. On the victim, same boot: run collect_clock_and_times.ps1 -Tag post. From the PAIR lines, take the median of filetime − (qpc_before + qpc_after)/2, skipping the first pair. That value is --qpc-offset. Each .akira file’s last-write FILETIME is --mtime.
  2. Known bytes at offset 0: PNG 89504e470d0a1a0a0000000d49484452, PDF 255044462d312e, JFIF JPEG ffd8ffe000104a46494600. For DOCX/XLSX/ZIP, rebuild the first local header from the central directory, which Spot mode leaves unencrypted. run6_blind_recover.py in analysis/…/04-dynamic/run6-blind/ does this per file type, and runs both passes for a whole folder.
  3. Pass 1: python akira_decrypt.py recover f.akira --qpc-offset … --mtime … --known-hex … --out f.
  4. Pass 2, only if pass 1 misses: add --anchor iv2 --mtime-window 2.5:0.1 --gap 8001:30000.
  5. Large PDFs: nothing extra is needed. When the generic ChaCha8 check finds nothing in a .pdf, recover retries the same window with the PDF checks: exact object headers from the xref, then continuing a page-content stream’s deflate. This took about 2–6 minutes per file in pure Python. --stage2 pdf runs only the PDF checks; --stage2 heuristic turns them off.

Limits:

The full reference, test suites and fixtures are in analysis/2026-10-11_101bd45ab673_akira-ransomware/06-decryptor/.