-
ls -la
andfile
commands tell us there are three files:- An executable
col
- A C file:
col.c
- An inaccessible file:
flag
- An executable
-
cat col.c
: observing the source code tells us that the program accepts a 20-bytes cmd arg which is converted fromconst char*
toint*
, 20 chars giving 5 integers, whose sum is compared to hashcode0x21DD09EC
. -
0x21DD09EC
is not divisible by 5, so we can write it as0x06C5CEC8 * 4 + 0x06C5CECC
-
Due to little-endianness, we input the reverse of every 4 bytes:
./col `python -c "print('\xc8\xce\xc5\x06'*4+'\xcc\xce\xc5\x06')"`