Little-Endian: Bytes Are Stored Backwards
- x86-64 is little-endian: the least-significant byte is stored at the lowest address.
- The 8-byte value
0x0000555555555189is stored in memory as:
Key Takeaway
When you write an address into an exploit payload, the bytes must be in little-endian order. Doing this by hand is error-prone — use a helper.