Static analysis: encrypted file format, .arika journal and on-disk artifacts
Address: 0x1400ae840 (per-file coroutine), 0x1400adb00 (journal), 0x1400b5a20 (footer), 0x140042420 (note)
Callers / callees: encryptor threads → FUN_1400ae840
Purpose
How an encrypted file is laid out, and what else the sample leaves on disk.
Walkthrough
Per-file sequence (FUN_1400ae840), confirmed live:
- Open the target. If it is locked, run Restart Manager unlocking and retry.
- Create the journal
<dir>\<name.ext>.arikawithCreateFileW(GENERIC_READ|GENERIC_WRITE|DELETE, share R/W, CREATE_ALWAYS, FILE_FLAG_OVERLAPPED)(FUN_1400adb00). - Write the journal header at offset 0.
- Encrypt the regions for the chosen mode. Before and after each chunk, overwrite journal bytes 0–8 with a progress record.
- Append the 512-byte RSA footer at offset = original size (
FUN_1400b5a20). - Rename the open handle to
<name.ext>.akirawithSetFileInformationByHandle(FileRenameInfo), thenDeleteFileWthe journal.
Key constants / structures
| Structure | Offset | Size | Content | |—|—|—|—| | .akira footer | S (original size) | 512 | RSA-4096 ciphertext of the 91-byte blob, 32-bit words byte-swapped | | .arika header | 0 | 1 | 0xFF at first; then 0 (chunk read and encrypted) or 1 (chunk written) | | .arika header | 1 | 8 | progress offset (end of the last processed chunk) | | .arika header | 9 | 11 | 0x01, mode, percent, original size | | .arika header | 20 | 512 | the same RSA blob as the footer (532 bytes in total) |
An encrypted file is exactly 512 bytes larger than the original. Because the journal carries the
RSA blob and the progress mark, a file caught mid-encryption by a crash or kill can still be
decrypted by the operator. The decryptor supports this with --journal.
Other artifacts:
- Ransom note:
akira_readme.txt, written withstd::ofstreaminto every folder the parsers enter (FUN_140042420). The text is plaintext at0x1400ef060; a copy is inartifacts/akira_readme.txt. - Log file:
Log-<dd>-<mm>-<YYYY>-<HH>-<MM>-<SS>.txtin the working directory (spdlog-stylefile_logger). - Process: a hidden
powershell.exespawned byWmiPrvSE.exefor shadow-copy removal.
Findings
- Real outputs from run 3 (
06-decryptor/e2e/*.akira) confirm the layout. Sizes are 0x3000+512, 0x30123+512 and 3,000,000+512; on the Part file the stripes sit exactly at 0, 360,000, 720,000 and 1,080,000.
Cross-references
- Related:
05-cryptography.md,04-dynamic/03-run3-e2e-capture.md