harbor run -t LiteCoder/decrypt-forensic-database-dumpharbor download LiteCoder/decrypt-forensic-database-dumpDecrypt a stolen corporate database dump to identify which customer records have been back-doored by an insider. You must build the full pipeline: key derivation, decryption, decompression, and database querying.
pycryptodome if needed)/app/fortress.bin — the encrypted and compressed database dump/app/forensic_notes.json — forensic metadata recovered from the USB stick/app/output.txt — the list of back-doored customer IDs/app/forensic_notes.json contains:
{
"encryption": "AES-256-CBC",
"kdf": "PBKDF2-HMAC-SHA256",
"kdf_iterations": 128000,
"salt_hex": "<hex-encoded salt>",
"password": "<plaintext password>",
"iv_prepended": true,
"compression": "zlib",
"known_plaintext_header": "SQLite format 3\\u0000"
}
salt_hex: hex-encoded salt used for PBKDF2 key derivation.password: the plaintext password used for key derivation.iv_prepended: when true, the first 16 bytes of fortress.bin are the AES-CBC initialization vector (IV). The remaining bytes are the ciphertext.compression: after decryption, the plaintext is compressed with this algorithm and must be decompressed./app/fortress.bin binary format:
[ 16-byte IV ][ AES-256-CBC encrypted payload ... ]
The encrypted payload, once decrypted and PKCS7-unpadded, is a zlib-compressed SQLite database. The decompressed content starts with the 16-byte header SQLite format 3\0.
forensic_notes.json to obtain the password, salt, iteration count, and other parameters.fortress.bin. Extract the first 16 bytes as the IV; the rest is ciphertext.SQLite format 3\0.customers table for all rows where the customer_id column ends with --bad.customer_id values to /app/output.txt.The SQLite database contains a table named customers with at least the following column:
customer_id (TEXT) — unique identifier for each customer record/app/output.txt must contain one back-doored customer_id per line, sorted in ascending lexicographic order, with no extra whitespace, headers, or blank lines.
Example:
CUST-0042--bad
CUST-1337--bad
CUST-9999--bad
python3 /app/solve.py (or equivalent single entry point).