cybersecurity · intermediate · ~15 min · safe pentest lab

MFT first-attribute offset

Read a little-endian 16-bit field at an offset.

Challenge

The offset to the first attribute is a little-endian 16-bit value at byte 20. Implement int mft_attr_offset(const unsigned char *b) returning b[20] | (b[21] << 8).

Starter code

int mft_attr_offset(const unsigned char *b) {
    /* TODO */
    return 0;
}

Solve this exercise in the browser editor — compile and run against the test harness, no setup required.