LEARN. PRACTICE. EXPLAIN.
Learning paths & interview practiceP
← All projects
GUIDED REVERSE-ENGINEERING PROJECT · 3–5 hours

Reverse engineer a binary packfile

Analyze an undocumented binary archive format, extract its payload, verify integrity checksums, and defend your parser in an interview.

Your brief

An application bundle packages assets in a custom .pack binary file. Your job is to reverse engineer the binary header, reconstruct the section offset table, decode the embedded payloads, verify checksums, and handle corrupt or truncated streams safely.

Node.js 22.12 or newer. Basic familiarity with binary buffers, endianness, and byte offsets. Review reverse-engineering foundations whenever a concept is unfamiliar.

This lab runs locally in Node.js using Buffer and Uint8Array without external dependencies. It uses a synthetic archive format with deterministic payloads so tests can verify edge cases and corrupted bytes safely without handling malicious exploits.

Download starter.mjs, sample.bin, and checks.mjs into the same empty folder. Run node starter.mjs sample.bin to test your parser.

0 / 6 steps verified by you. Checks are self-reported; this website does not execute your code.

  1. 1

    Inspect header, magic bytes, and version

    Validate the binary signature, endianness flag, and format version before reading further.

  2. 2

    Decode section table and entry offsets

    Parse the table of contents to map record names, data offsets, and payload lengths.

  3. 3

    Extract entry payloads from data slices

    Slice the raw binary bytes for each entry and return them as isolated buffers.

  4. 4

    Implement CRC32 integrity checks

    Compute and verify the CRC32 checksum for each payload slice to detect data corruption.

  5. 5

    Defend against malformed and corrupted streams

    Harden the parser against path traversal, header overlaps, and out-of-bounds entries.

  6. 6

    Explain your binary parser and trade-offs in an interview

    Rehearse presenting your reverse-engineering process, defensive design, and performance decisions.

AlifBay Prep