Endianness converter and byte swapper
Swap byte order for 16-, 32-, and 64-bit values, with a big-integer preview - the conversion every memory address needs before it goes in a payload.
Open in ctfpalx86 and ARM are little-endian: the address 0xdeadbeef sits in memory as ef be ad de. Network protocols are big-endian. Every exploit that writes an address into a payload crosses that boundary, and a payload that jumps somewhere absurd is usually a byte-order mistake rather than a wrong address.
The reason this causes so much trouble is that a byte-order error is not a crash, it is a plausible-looking wrong answer. Reversed bytes still form a valid number and a valid-looking address, so the payload is accepted and simply does the wrong thing - which sends you hunting for a logic bug that was never there.
Where it bites
- Addresses in payloads - little-endian, always, on x86 and ARM.
- Values read out of a packet capture - big-endian, because the protocols say so.
- File format fields - depends on the format. PNG is big-endian, ZIP is little-endian, and the same file can contain both.
- Leaked pointers - a leak printed as text may already be in reading order or may be raw bytes; check which before you swap.
Related tools
Struct pack and unpack (p32, p64, u32, u64)
Convert integers to little-endian byte strings and back at 8, 16, 32, and 64 bits - the pwntools p32/p64 helpers without the install.
Hex to text converter
Convert hexadecimal to text and back, tolerating whitespace, commas, and `0x` prefixes. Runs entirely in your browser.
Libc base address calculator
Turn a leaked libc pointer into the library’s base address, then resolve any other symbol - the arithmetic every ret2libc exploit runs on.
Cyclic pattern generator and offset finder
Generate a de Bruijn sequence and find the exact overflow offset from a crashed register value - the pwntools cyclic workflow, in the browser.