Same setup as the last level, but now we have to set the modified variable to a particular value.
if(modified == 0x61626364) {
printf("you have correctly got the variable to the right value\n");
} else {
printf("Try again, you got 0x%08x\n", modified);
}
We can easily build off our last answer in order to find a solution. The biggest point here is the endianess of protostar, which the level description explicitly states is little endian. This is important because modified is an integer that’s four bytes in size, and we need to know how to order those bytes. Since we have confirmed the ordering, we know where to place the most significant byte.
The source is asking us to set modified to 0x61626364, and if we break that into bytes and traslate them into characters, it’s the string “abcd”. Given that we know the byte order is little endian, we actually have to pass the string in reverse.