$ cat writeup.md…
$ cat writeup.md…
HackTheBox
"While examining the device, we discovered that critical evidence or artifacts may have been overlooked. We believe that your expertise in mobile forensics will enable you to uncover the missing piece."
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
"While examining the device, we discovered that critical evidence or artifacts may have been overlooked. We believe that your expertise in mobile forensics will enable you to uncover the missing piece."
The challenge provides a 1.25 GB ZIP file (served over TCP) containing an Android /data partition dump with ~89,800 entries. All files are encrypted with ZipCrypto.
7z l -slt revealed all entries encrypted with ZipCrypto (weak encryption vulnerable to known-plaintext attacks)/data partition structure with ~78,990 non-empty filescom.thinkyeah.galleryvault) — file-hiding app with custom encryptionorg.thoughtcrime.securesms) — encrypted SQLCipher databasecom.topjohnwu.magisk) — device was rootednotes.notepad.checklist.calendar.todolist.notebook)ZipCrypto with Store (no compression) is vulnerable to known-plaintext attacks when at least 12 bytes of plaintext are known. Android shared_prefs XML files of exactly 65 bytes always contain identical content, providing a perfect known-plaintext source.
Gallery Vault hides files by:
>>tyfs>> / <<tyfs<< markersAndroid shared_prefs XML files of 65 bytes always contain:
<?xml version='1.0' encoding='utf-8' standalone='yes' ?> <map />
Used bkcrack to recover internal encryption keys:
# Create known plaintext file (65 bytes) printf "<?xml version='1.0' encoding='utf-8' standalone='yes' ?>\n<map />\n" > known_plaintext.bin ...
$ grep --similar